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.

Files for flask-cfpurge, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size flask-cfpurge-0.2.tar.gz (1.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page