Simple Python interface for the Varnish management port
- Author:
Justin Quick <justquick@gmail.com>, Sandy Walsh <github@darksecretsoftware.com>
- Version:
0.2
pip install python-varnish==0.2.2
If you are running a version of varnish older than 3.0 then install python-varnish==0.1.2 instead.
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'), 'secret_file_content')
manager.run('ping')
manager.run('ban.url ^/articles/$')
manager.run('ban.list')
manager.run('purge.url', 'http://mydomain.com/articles/.*')
manager.close()
Testing:
python runtests.py
Metadata
Release files for python-varnishadm 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-varnishadm-0.2.2.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_varnishadm-0.2.2-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 14.8 kB
Release files / python-varnishadm-0.2.2.tar.gz
| Download URL | python-varnishadm-0.2.2.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1f28fd96a82004b0ac4e69beaeeb1742ec91bed4dbfcbb4dc1d1ff57cdc58a1
|
|
BLAKE2b-256 checksum How to use checksums |
240bdcf27d2e91e54e0710baffa5e823ad7f78b4a4e8164cf89443a807cbe980
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python_varnishadm-0.2.2-py2-none-any.whl
| Download URL | python_varnishadm-0.2.2-py2-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
5d7630a66161420d6e5d2fe2772562479d6cf10d07f6c631b6cb21e6b7afc2d7
|
|
BLAKE2b-256 checksum How to use checksums |
16d860a60e52a9b38d51c56dd9b95dfd556e2593dcfd4ffdd1a38cfc0d17da91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |