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.1.macosx-10.15-x86_64.tar.gz (2.1 kB view hashes)

Uploaded Source

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