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 details)

Uploaded Source

File details

Details for the file flask-cfpurge-0.1.macosx-10.15-x86_64.tar.gz.

File metadata

  • Download URL: flask-cfpurge-0.1.macosx-10.15-x86_64.tar.gz
  • Upload date:
  • Size: 2.1 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.1.macosx-10.15-x86_64.tar.gz
Algorithm Hash digest
SHA256 a4fde5034c1ed5e9885add340dc76de874ef9a45fae688a793b357e4a19f0164
MD5 dd568156a29b2475ccd4252c5cae7e3c
BLAKE2b-256 bab480bd27c14ce835cde392fa81fd696325e8a0690bc4fb3f10845e802bcb83

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