Skip to main content

start-cloudflare

Github CI

Small Pydantic settings helpers for Cloudflare projects.

start-cloudflare centralizes the environment variables and header helpers that Cloudflare API clients tend to repeat: account ID, API version, account email, legacy global API key, Origin CA key, bearer token headers, and account-scoped endpoint URLs.

Install

uv add start-cloudflare

Configure

Create a .env file or export the variables in your shell:

CF_ACCT_ID=your-account-id
CF_API_VERSION=4
CF_ACCT_EMAIL=you@example.com
CF_GLOBAL_API_KEY=legacy-global-api-key
CF_ORIGIN_CA_KEY=origin-ca-key

Only CF_ACCT_ID is normally needed for URL construction. Authentication values are optional until you request the matching header helper.

Use

from start_cloudflare import CF

cf = CF()

base_url = cf.base
account_url = cf.add_account_endpoint("/zones")
auth_header = CF.set_bearer_auth("api-token")

For a default configuration, base_url is https://api.cloudflare.com/client/v4, and account_url is https://api.cloudflare.com/client/v4/accounts/zones.

Documentation

See the full documentation for field details, examples, and generated API reference.

Development

uv sync
uv run pytest
uv run zensical build

To preview the docs locally:

just docs

Release files for start-cloudflare 0.0.9

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

Source distribution (sdist)

Source distribution for start-cloudflare 0.0.9
File Size Uploaded
start_cloudflare-0.0.9.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for start-cloudflare 0.0.9
File Interpreter ABI Platform
start_cloudflare-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / start_cloudflare-0.0.9.tar.gz

Download URL start_cloudflare-0.0.9.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b9ccca775df379762c04decd6b8a3cd562e2c649b6e497cfc87e6d80ae019a7d
BLAKE2b-256 checksum
How to use checksums
dec8afa9455460d86bec6a64c965c46f41da5b467376d99429938ed1b7e3e8d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / start_cloudflare-0.0.9-py3-none-any.whl

Download URL start_cloudflare-0.0.9-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6ab1f2934e8043a362ad5e3f485acd1f80842e259c6b81b486d1bcf583a475a
BLAKE2b-256 checksum
How to use checksums
0bcc06ac017ee3831cb64f133cca1a2852f3a9eb7ba9c108daad89a12c7106a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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