Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

STILL UNDER DEVELOPMENT! Provides a CLI and Python wrappers for CloudFlare's REST API

Project Description

THIS PROJECT IS STILL IN ITS PLANNING STAGE!

cloudflare-python provides a CLI and Python wrappers for CloudFlare’s API.

Configuration

This assumes that you saved your configuration in ~/.cloudflare.jsonl

It should contain a single line JSON with keys email and api_key.

The key email is the email address tied to your CloudFlare account.

Your CloudFlare API key can be found here: https://www.cloudflare.com/a/account/my-account

Example:

{"email": "john@example.com", "api_key": "21d2f4a18141b891256400d40f289748f1a2b"}

Usage

# General form:
$ cloudflare <noun> <verb> <noun_instance> args...

Usage: zones

According to CloudFlare’s official API documentation, a zone is a domain name along with its subdomains and other identities.

# Add a site to your CloudFlare account:
$ cloudflare zone create example.com

# Show the basic info for a site tied to your CloudFlare account.
$ cloudflare zone show example.com

# List the sites tied to your CloudFlare account.
$ cloudflare zone list

Usage: DNS

# Show the DNS entries for a site
$ cloudflare dns show example.com

# Create a DNS entry for a site
$ cloudflare dns create subdomain.example.com 1.2.3.4 --type=A

# Update a DNS entry for a site
$ cloudflare dns update subdomain.example.com 1.2.3.4 --type=CNAME

Usage: cache

# Purge all files in a zone's cache
$ cloudflare cache purge example.com

# Purge a specific file in a zone's cache
$ cloudflare cache purge example.com --path=<url>

History

0.0.2 (2016-04-07)

  • Implement cloudflare cache purge <example.com>

0.0.1 (2015-01-11)

  • First release on PyPI.
Release History

Release History

This version
History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
cloudflare-0.0.2.tar.gz (14.6 kB) Copy SHA256 Checksum SHA256 Source Apr 7, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting