Skip to main content

Simple Python interface for the Varnish management port

Project description

Author:

Justin Quick <justquick@gmail.com>,

Version:
0.1
pip install python-varnish==0.1.2

Varnish is a state-of-the-art, high-performance HTTP accelerator. For more information checkout Varnish Site

Varnish provides a simple telnet management interface for doing things like:

  • reloading configurations

  • purging URLs from cache

  • view statistics

  • start and stop the server

This Python API takes full advantage of the available commands and can run across multiple Varnish instances. Here are the features of this python module (compared to python-varnishadm)

  • Uses telnetlib instead of raw sockets

  • Implements threading module

  • Can run commands across multiple Varnish instances

  • More comprehensive methods, closely matching the management API (purge_*, vcl_*, etc.)

  • Unittests

Example:

manager = VarnishManager( ('server1:6082', 'server2:6082') )
manager.run('purge.url', '^/$')
manager.close()

Testing:

python runtests.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-varnish-0.1.2.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file python-varnish-0.1.2.tar.gz.

File metadata

File hashes

Hashes for python-varnish-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9ac6142496dbe3ebeb68a1a38f9f5cc4252fa5f551c8fd0bc59474d00fbb2be8
MD5 b4c0610e1077f425f7e290e6b6cf3218
BLAKE2b-256 8e8ca56a327aeef42c1968f84e27cca8f684cd00dccfd62ae49a9702fa0ba960

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page