$npx skillfedfor your agent

cloudflare

The official Python library for the cloudflare API

Worth itPyPI Python ModulesReleased Jul 202610.1M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cloudflare-5.6.0-py3-none-any.whl
v5.6.0 · released 2026-07-22 · Python >=3.9 · 6 runtime deps: anyio, distro, httpx, pydantic, sniffio, typing-extensions

Yes. This is the official, actively maintained Cloudflare Python client with low install friction, no known vulnerabilities, permissive licensing, and strong type support. Install it if you need to interact with Cloudflare's API from Python—it is the canonical choice for this task.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later and a valid Cloudflare API token (typically provided via environment variable).
  • Low install friction with a pure-Python wheel.
  • Actively maintained with a recent release (23 days old) and 494 repository stars.

License · maintenance · safety

Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.

last release 2026-07-22 (23 days) · last repo commit 2026-08-14 · 494 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 10,122,213 downloads/mo, #1,480 on PyPI

Verify before relying

pip install cloudflare

import os
from cloudflare import Cloudflare

client = Cloudflare(api_token=os.environ.get("CLOUDFLARE_API_TOKEN"))
zone = client.zones.create(
    account={"id": "023e105f4ecef8ad9ca31a8372d0c353"},
    name="example.com",
    type="full",
)
print(zone.id)
  • Rate limit handling and retry behavior beyond the documented default 2 retries with exponential backoff.
  • Performance characteristics of the async client with aiohttp versus httpx under high concurrency.
  • Completeness of API coverage relative to the full Cloudflare REST API surface.
Same gist for agents: .md · .json

What it is and what it does

This is the official Python client for the Cloudflare REST API, generated using Stainless. It wraps Cloudflare's full API surface—zones, accounts, DNS records, KV storage, and more—in a typed, modern Python interface. The library ships with both synchronous and asynchronous clients powered by httpx, and includes full type definitions for request parameters and response objects using Pydantic models and TypedDicts.

The client handles pagination automatically, error classification (connection errors, rate limits, authentication failures, and HTTP status codes), and retries certain transient failures by default. It supports file uploads, nested parameters, and provides helper methods on response objects for serialization. You can optionally swap the HTTP backend to aiohttp for improved async concurrency. The library targets Python 3.9+ and is actively maintained.

Use it for

  • Manage DNS records, zones, and accounts programmatically for multi-tenant or infrastructure-as-code workflows.
  • Build async applications that interact with Cloudflare's KV storage, Workers, or other edge services.
  • Automate SSL/TLS certificate provisioning, firewall rules, or DDoS protection settings.
  • Integrate Cloudflare API calls into monitoring or observability platforms with typed, autocomplete-friendly code.
  • Paginate through large lists of accounts, zones, or DNS records without manual page handling.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is the official, actively maintained Cloudflare Python client with low install friction, no known vulnerabilities, permissive licensing, and strong type support. Install it if you need to interact with Cloudflare's API from Python—it is the canonical choice for this task.

Install

cloudflare on PyPI

Before you install

Low install friction with a pure-Python wheel. Actively maintained with a recent release (23 days old) and 494 repository stars. Supports current Python versions (3.9+) and has no known vulnerabilities.

Requires Python 3.9 or later and a valid Cloudflare API token (typically provided via environment variable).

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.

Quickstart

pip install cloudflare

import os
from cloudflare import Cloudflare

client = Cloudflare(api_token=os.environ.get("CLOUDFLARE_API_TOKEN"))
zone = client.zones.create(
    account={"id": "023e105f4ecef8ad9ca31a8372d0c353"},
    name="example.com",
    type="full",
)
print(zone.id)

Verify before relying

  • Rate limit handling and retry behavior beyond the documented default 2 retries with exponential backoff.
  • Performance characteristics of the async client with aiohttp versus httpx under high concurrency.
  • Completeness of API coverage relative to the full Cloudflare REST API surface.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
anyiodistrohttpxpydanticsniffiotyping-extensions
MaintenanceActively maintained 23 days since the last release
Last repo commit
First released
Downloads10,122,213 / month, #1,480 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: cloudflare-5.6.0-py3-none-any.whl

Tags

Capabilities
cloudflare api clientcloudflare python sdkdns management pythoncdn api pythoncloudflare zones managementasync cloudflare clienttyped cloudflare api
Topics
cloudflare-apiasync-http-clienttyped-sdk

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “cloudflare api client”

  • cloudflareProvides a Python client library for the Cloudflare REST API with…
  • 2captcha-pythonA Python client for the 2Captcha API that automates captcha solving…
  • pulumi-cloudflarePulumi provider for Cloudflare that lets you define and manage…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also arcadepy · runwayml · composio-client · steel-sdk · flask-cloudflared · sambanova · kernel · postgrid-python · supermemory · glean-api-client

Further reading