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 hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page