Skip to main content

Automagically purges CloudFlare's cache when local files are updated.

Project description

Automagically purges CloudFlare’s cache when local files are updated.

This is useful for exporting a directory of files via CloudFlare. If your files are updated, cfwatch will automatically purge the corresponding URL on CloudFlare.

With cfwatch, you will no longer need to add cache busting query strings, and the direct link will always work.

Usage

$ pip install cfwatch
$ cfwatch --help
usage: cfwatch.py [-h] [-l LOG] zone prefix [dir]

Purges CloudFlare on local file change.

positional arguments:
  zone               CloudFlare zone (e.g. example.com)
  prefix             CloudFlare path prefix (e.g. http://example.com/)
  dir                directory to watch, i.e. file.txt this directory is
                     http://example.com/file.txt

optional arguments:
  -h, --help         show this help message and exit
  -l LOG, --log LOG  log file

When running cfwatch, you must set the following environment variables:

  • CFWATCH_TOKEN to your CloudFlare API token (not the legacy API key)

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

cfwatch-0.3.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

cfwatch-0.3.0-py2.py3-none-any.whl (4.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cfwatch-0.3.0.tar.gz.

File metadata

  • Download URL: cfwatch-0.3.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for cfwatch-0.3.0.tar.gz
Algorithm Hash digest
SHA256 451ee44a5b46160da3131b76fb30ade19a156c188bfc9c0ecff017985d25e3e7
MD5 41c411512d44c222a2bfa0e33d28d608
BLAKE2b-256 1be57d7ddbeaf3529433b71885fe9529d8d1bfb6650d30591e4adba7e99c5eaa

See more details on using hashes here.

File details

Details for the file cfwatch-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: cfwatch-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for cfwatch-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4f22fb28b8037b8bfcdd18d5d4c61c9618c953e45efbbd1c5018e8cbfde5eb23
MD5 bedcf17fa7c98c9917e780d1a27a1500
BLAKE2b-256 3a53af928c963720e3b3c91ec8d81b7a21b8aaa9f757df6c4950918324b48f6b

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