Skip to main content

pycloudflare

Build Status

A Python client for CloudFlare API v4 and Host API.

It provides two levels of integration against the CloudFlare API:

  1. A low level API, with one method per API endpoint (pycloudflare.services).

  2. A high level ORM API (pycloudflare.models).

Only a subset of the CloudFlare API is currently supported:

  • Users

  • Zones

  • Zone Settings

  • DNS Records

  • Page Rules

  • User creation & authentication through CloudFlare’s partner-facing Host API.

Usage

Get all our zones at CloudFlare

>>> cf = CloudFlareService(api_key, email)
>>> for domain in cf.get_zones():
>>>     print domain['name'], domain['id']

Configuration

The Host (Partner) API service client is configured when it is instantiated and reads its configuration from configuration.json.

The configuration file should be in the format:

{
    "common": {
        "cloudflare": {
            "api_key": "HOST API KEY HERE",
         }
    }
}

Testing

Install development requirements:

pip install -r requirements.txt

Tests can then be run by doing:

nosetests

The integration tests require a host API key. They can be run with:

nosetests tests/test_integration.py

Metadata

Release files for pycloudflare 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycloudflare 4.0.0
File Size Uploaded Provenance Actions
pycloudflare-4.0.0.tar.gz 16.1 kB Without provenance Details for pycloudflare-4.0.0.tar.gz

Release files / pycloudflare-4.0.0.tar.gz

Download URL pycloudflare-4.0.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a88127fb9d1061328fae97ebbad7d25bb4f6006ab90bf380b415df4c4dd9ada6
BLAKE2b-256 checksum
How to use checksums
cc4692e7aa6682742add55949f7b1b50c3d0243180dfd860bbf985f1735147ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

Security for pycloudflare 4.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page