Skip to main content

Automate Purging Your File Cache On Cloudflare To Easily Update Your Webpages

Project description

flask-cfpurge

Automate Purging Your File Cache On Cloudflare To Easily Update Your Webpages

Usage

Example in flask app's init.py:

from flask_cfpurge import Purger
from flask import Flask

app = Flask(__name__)

app.cf_auth_key = os.environ.get('CF_AUTH_KEY')
app.cf_email_key = os.environ.get('CF_AUTH_EMAIL')
app.cf_zone = os.environ.get('CF_ZONE')

purger = Purger(app)
purger.purge_all(app.cf_zone)

This will run everytime you restart your flask server.

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

flask-cfpurge-0.2.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file flask-cfpurge-0.2.tar.gz.

File metadata

  • Download URL: flask-cfpurge-0.2.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for flask-cfpurge-0.2.tar.gz
Algorithm Hash digest
SHA256 cb68aaa4c76371fe5e2155f25dcd04481762119245b3b004e5eaa22f54b83c97
MD5 b3e6aa7a2c3eaaebfacb2763e84520f9
BLAKE2b-256 6020e74a841e510e3ee5ce814418ce90952ce96df04f46d68bae6c1510c23d2f

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