Skip to content

Releases: cloudflare/cloudflare-python

v5.0.0-beta.1

13 Feb 06:25
1ed15a7

Choose a tag to compare

v5.0.0-beta.1 Pre-release
Pre-release

5.0.0-beta.1 (2026-02-13)

Disclaimer: Please note that v5.0.0-beta.1 is in Beta and we are still testing it for stability.

Full Changelog: v4.3.1...v5.0.0-beta.1

In this release, you'll see a large number of breaking changes. This is primarily due to a change in OpenAPI definitions,
which our libraries are based off of, and codegen updates that we rely on to read those OpenAPI definitions and produce
our SDK libraries. As the codegen is always evolving and improving, so are our code bases.

There may be changes that are not captured in this changelog. Feel free to open an issue to report any inaccuracies, and we will make sure it gets into the changelog before the v5.0.0 release.

Most of the breaking changes below are caused by improvements to the accuracy of the base OpenAPI schemas, which
sometimes translates to breaking changes in downstream clients that depend on those schemas.

Please ensure you read through the list of changes below and the migration guide before moving to this version - this
will help you understand any down or upstream issues it may cause to your environments.

Breaking Changes

The following resources have breaking changes. See the v5 Migration Guide for detailed migration instructions.

  • abusereports
  • acm.totaltls
  • apigateway.configurations
  • cloudforceone.threatevents
  • d1.database
  • intel.indicatorfeeds
  • logpush.edge
  • origintlsclientauth.hostnames
  • queues.consumers
  • radar.bgp
  • rulesets.rules
  • schemavalidation.schemas
  • snippets
  • zerotrust.dlp
  • zerotrust.networks

Features

New API Resources

  • abusereports - Abuse report management
  • abusereports.mitigations - Abuse report mitigation actions
  • ai.tomarkdown - AI-powered markdown conversion
  • aigateway.dynamicrouting - AI Gateway dynamic routing configuration
  • aigateway.providerconfigs - AI Gateway provider configurations
  • aisearch - AI-powered search functionality
  • aisearch.instances - AI Search instance management
  • aisearch.tokens - AI Search authentication tokens
  • alerting.silences - Alert silence management
  • brandprotection.logomatches - Brand protection logo match detection
  • brandprotection.logos - Brand protection logo management
  • brandprotection.matches - Brand protection match results
  • brandprotection.queries - Brand protection query management
  • cloudforceone.binarystorage - CloudForce One binary storage
  • connectivity.directory - Connectivity directory services
  • d1.database - D1 database management
  • diagnostics.endpointhealthchecks - Endpoint health check diagnostics
  • fraud - Fraud detection and prevention
  • iam.sso - IAM Single Sign-On configuration
  • loadbalancers.monitorgroups - Load balancer monitor groups
  • organizations - Organization management
  • organizations.organizationprofile - Organization profile settings
  • origintlsclientauth.hostnamecertificates - Origin TLS client auth hostname certificates
  • origintlsclientauth.hostnames - Origin TLS client auth hostnames
  • origintlsclientauth.zonecertificates - Origin TLS client auth zone certificates
  • pipelines - Data pipeline management
  • pipelines.sinks - Pipeline sink configurations
  • pipelines.streams - Pipeline stream configurations
  • queues.subscriptions - Queue subscription management
  • r2datacatalog - R2 Data Catalog integration
  • r2datacatalog.credentials - R2 Data Catalog credentials
  • r2datacatalog.maintenanceconfigs - R2 Data Catalog maintenance configurations
  • r2datacatalog.namespaces - R2 Data Catalog namespaces
  • radar.bots - Radar bot analytics
  • radar.ct - Radar certificate transparency data
  • radar.geolocations - Radar geolocation data
  • realtimekit.activesession - Real-time Kit active session management
  • realtimekit.analytics - Real-time Kit analytics
  • realtimekit.apps - Real-time Kit application management
  • realtimekit.livestreams - Real-time Kit live streaming
  • realtimekit.meetings - Real-time Kit meeting management
  • realtimekit.presets - Real-time Kit preset configurations
  • realtimekit.recordings - Real-time Kit recording management
  • realtimekit.sessions - Real-time Kit session management
  • realtimekit.webhooks - Real-time Kit webhook configurations
  • tokenvalidation.configuration - Token validation configuration
  • tokenvalidation.rules - Token validation rules
  • workers.beta - Workers beta features

New Endpoints (Existing Resources)

acm.totaltls

  • edit() - Added endpoint: /zones/{zone_id}/acm/total_tls
  • update() - Added endpoint: /zones/{zone_id}/acm/total_tls

cloudforceone.threatevents

  • list() - Added endpoint: /accounts/{account_id}/cloudforce-one/events/targetIndustries

contentscanning

  • create() - Added endpoint: /zones/{zone_id}/content-upload-scan/settings
  • get() - Added endpoint: /zones/{zone_id}/content-upload-scan/settings
  • update() - Added endpoint: /zones/{zone_id}/content-upload-scan/settings

dns.records

  • scan_list() - Added endpoint: /zones/{zone_id}/dns_records/scan/review
  • scan_review() - Added endpoint: /zones/{zone_id}/dns_records/scan/review
  • scan_trigger() - Added endpoint: /zones/{zone_id}/dns_records/scan/trigger

intel.indicatorfeeds

  • create() - Added endpoint: /accounts/{account_id}/intel/indicator-feeds/permissions/add
  • delete() - Added endpoint: /accounts/{account_id}/intel/indicator-feeds/permissions/remove
  • list() - Added endpoint: /accounts/{account_id}/intel/indicator-feeds/permissions/view

leakedcredentialchecks.detections

  • get() - Added endpoint: /zones/{zone_id}/leaked-credential-checks/detections/{detection_id}

queues.consumers

  • list() - Added endpoint: /accounts/{account_id}/queues/{queue_id}/consumers

radar.ai

  • summary() - Added endpoint: /radar/ai/bots/summary/{dimension}
  • timeseries() - Added endpoint: /radar/ai/bots/timeseries
  • timeseries_groups() - Added endpoint: /radar/ai/bots/timeseries_groups/{dimension}

radar.bgp

  • changes() - Added endpoint: /radar/bgp/rpki/aspa/changes
  • snapshot() - Added endpoint: /radar/bgp/rpki/aspa/snapshot

workers.subdomains

  • delete() - Added endpoint: /accounts/{account_id}/workers/subdomain

zerotrust.networks

  • create() - Added endpoint: /accounts/{account_id}/zerotrust/routes/hostname
  • delete() - Added endpoint: /accounts/{account_id}/zerotrust/routes/hostname/{hostname_route_id}
  • edit() - Added endpoint: /accounts/{account_id}/zerotrust/routes/hostname/{hostname_route_id}
  • get() - Added endpoint: /accounts/{account_id}/zerotrust/routes/hostname/{hostname_route_id}
  • list() - Added endpoint: /accounts/{account_id}/zerotrust/routes/hostname

General Fixes and Improvements

Type System & Compatibility

  • Type inference improvements: Allow Pyright to properly infer TypedDict types within SequenceNotStr
  • Type completeness: Add missing types to method arguments and response models
  • Pydantic compatibility: Ensure compatibility with Pydantic versions prior to 2.8.0 when using additional fields

Request/Response Handling

  • Multipart form data: Correctly handle sending multipart/form-data requests with JSON data
  • Header handling: Do not send headers with default values set to omit
  • GET request headers: Don't send Content-Type header on GET requests
  • Response body model accuracy: Broad improvements to the correctness of models

Parsing & Data Processing

  • Discriminated unions: Correctly handle nested discriminated unions in response parsing
  • Extra field types: Parse extra field types correctly
  • Empty metadata: Ignore empty metadata fields during parsing
  • Singularization rules: Update resource name singularization rules for better consistency

v4.3.1

16 Jun 21:42
ac1ae1c

Choose a tag to compare

4.3.1 (2025-06-16)

Full Changelog: v4.3.0...v4.3.1

Bug Fixes

  • api: Update zone subscription paths (8917497)

Chores

  • internal: update conftest.py (c8ae1c4)

v4.3.0

16 Jun 18:16
d6670b6

Choose a tag to compare

4.3.0 (2025-06-16)

Full Changelog: v4.2.0...v4.3.0

Features

Bug Fixes

  • add back kv.namespaces bulk methods (5d271a4)
  • add missing properties (5777e78)
  • AI: Add explicit variant names for union types (332065c)
  • api: 'name' and 'type' are required on dns_record (d4795c5)
  • client: correctly parse binary response | stream (fceaf95)
  • config: Diagnostic errors (cb5769e)
  • DLP: Add explicit variant names (490c4a7)
  • docs/api: remove references to nonexistent types (e78bbed)
  • workers: correctly use multipart while uploading scripts (#2661) (756dc87)

Chores

  • api: Fix edge IPs variant names (fa43851)
  • api: mark some methods as deprecated (cc53052)
  • docs: remove reference to rye shell (8781542)
  • docs: remove unnecessary param examples (07f3fd3)
  • internal: codegen related update (09930a5)
  • internal: codegen related update (5fdf1d6)
  • tests: add tests for httpx client instantiation & proxies (0291352)
  • tests: run tests in parallel (cc4533e)

v4.2.0

21 May 19:18
475b534

Choose a tag to compare

4.2.0 (2025-05-21)

Full Changelog: v4.1.0...v4.2.0

Features

Bug Fixes

  • api: fix path placeholders (c8a0db8)
  • client: fix bug in Python SDK when subresource has the same name as its parent (c18a098)
  • package: support direct resource imports (7e46269)
  • urlscanner: don't unwwrap scan response (5fe7ea9)

Chores

  • ci: fix installation instructions (a9bc47f)
  • ci: upload sdks to package manager (c8af26d)
  • internal: avoid errors for isinstance checks on proxies (7b734a1)
  • internal: codegen related update (b1fdd11)

v4.1.0

18 Mar 04:42
fc6ca90

Choose a tag to compare

4.1.0 (2025-03-18)

Full Changelog: v4.0.0...v4.1.0

Features

Read more

v4.0.0

13 Jan 20:33
bf9d860

Choose a tag to compare

4.0.0 (2025-01-13)

Full Changelog: v3.1.1...v4.0.0

⚠ BREAKING CHANGES

  • addressing: reshuffle relationship in the namespace to align with the product (#2322)
  • r2: rename cf-r2-jurisdiction to more usable jurisdiction parameter (#2310)
  • r2: rename cf-r2-jurisdiction to more usable jurisdiction parameter (#2309)
  • r2: rename cf-r2-jurisdiction to more usable jurisdiction parameter (#2308)
  • loa_documents: move download subresource into parent as get (#2304)
  • addressing: move service bindings to dedicated namespace (#2303)
  • ai: move to dedicated namespace (#2269)
  • kv: move analytics under existing namespace (#2239)
  • zone_transfers: move under DNS namespace (#2234)
  • dnssec: move under DNS namespace (#2233)
  • url_scanner: swap all methods to be v2 only (#2231)
  • warp_connector: move under zero trust namespace (#2220)

Features

Read more

v3.1.0

16 Jul 23:53
0aed308

Choose a tag to compare

3.1.0 (2024-07-16)

Warning

v3.x of this library is a ground-up rewrite of the SDK, using code generation from our OpenAPI spec.

This package should be in a usable state for many projects, but expect frequent minor breaking
changes as we rename methods and types. If this isn't suitable for you project, we recommend
pinning to the 2.x releases for now.

Full Changelog: v3.0.1...v3.1.0

Features

  • api: add hash to url_scanner (28c06a7)
  • api: OpenAPI spec update via Stainless API (f0c26a0)
  • api: OpenAPI spec update via Stainless API (7850e20)
  • api: OpenAPI spec update via Stainless API (e91b45b)
  • api: OpenAPI spec update via Stainless API (a2433f4)
  • api: OpenAPI spec update via Stainless API (598836d)
  • api: OpenAPI spec update via Stainless API (512203e)
  • api: OpenAPI spec update via Stainless API (cf3b8d9)
  • api: OpenAPI spec update via Stainless API (cf6bd06)
  • api: OpenAPI spec update via Stainless API (ccaeebb)
  • api: OpenAPI spec update via Stainless API (4346909)
  • api: OpenAPI spec update via Stainless API (20e4aff)
  • api: OpenAPI spec update via Stainless API (9c895b4)
  • api: OpenAPI spec update via Stainless API (90c3186)
  • api: OpenAPI spec update via Stainless API (25951ee)
  • api: OpenAPI spec update via Stainless API (ca2bde2)
  • api: OpenAPI spec update via Stainless API (c2e0647)
  • api: OpenAPI spec update via Stainless API (74cd67c)
  • api: OpenAPI spec update via Stainless API (83cd3fd)
  • api: OpenAPI spec update via Stainless API (86075bb)
  • api: OpenAPI spec update via Stainless API (7b4ad6e)
  • api: OpenAPI spec update via Stainless API (11cfe41)
  • api: OpenAPI spec update via Stainless API (c3abf89)
  • api: OpenAPI spec update via Stainless API (1729a2c)
  • api: OpenAPI spec update via Stainless API (2516664)
  • api: OpenAPI spec update via Stainless API (2dce4af)
  • api: OpenAPI spec update via Stainless API (c08fb0d)
  • api: OpenAPI spec update via Stainless API (2fdfcf5)
  • api: OpenAPI spec update via Stainless API (c94a743)
  • api: OpenAPI spec update via Stainless API (87d6d49)
  • api: OpenAPI spec update via Stainless API (7fcc030)
  • api: OpenAPI spec update via Stainless API (64a4acd)
  • api: OpenAPI spec update via Stainless API (8607159)
  • api: OpenAPI spec update via Stainless API (e75f499)
  • api: OpenAPI spec update via Stainless API (8e5a9db)
  • api: OpenAPI spec update via Stainless API (53f952b)
  • api: OpenAPI spec update via Stainless API (9aae738)
  • api: OpenAPI spec update via Stainless API (17f284a)
  • api: OpenAPI spec update via Stainless API (1238133)
  • api: OpenAPI spec update via Stainless API (b80c95a)
  • api: OpenAPI spec update via Stainless API (1cba5a7)
  • api: OpenAPI spec update via Stainless API (852b7dc)
  • api: OpenAPI spec update via Stainless API (cf7cc16)
  • api: OpenAPI spec update via Stainless API (009cfad)
  • api: OpenAPI spec update via Stainless API (cfa4415)
  • api: OpenAPI spec update via Stainless API (c174dc7)
  • api: OpenAPI spec update via Stainless API (89d49a9)
  • api: OpenAPI spec update via Stainless API (f60b165)
  • api: OpenAPI spec update via Stainless API (93bdfad)
  • api: OpenAPI spec update via Stainless API (8110894)
  • api: OpenAPI spec update via Stainless API (74958bd)
  • api: OpenAPI spec update via Stainless API (fba0e37)
  • api: OpenAPI spec update via Stainless API (23722cc)
  • api: OpenAPI spec update via Stainless API (8236e8b)
  • api: OpenAPI spec update via Stainless API (5cf1dde)
  • api: OpenAPI spec update via Stainless API (a8cad59)
  • api: OpenAPI spec update via Stainless API (6134898)
  • api: OpenAPI spec update via Stainless API (d1df920)
  • api: OpenAPI spec update via Stainless API (03f1cd5)
  • api: OpenAPI spec update via Stainless API ([6fa0258](https://github.com/cloudflare/cloudflare-python/commit...
Read more

v3.0.1

24 Jun 22:57
087dd39

Choose a tag to compare

Merge pull request #1137 from cloudflare/release-please--branches--ma…

v3.0.0

24 Jun 22:01
7299d62

Choose a tag to compare

3.0.0 (2024-06-24)

Warning

v3.x of this library is a ground-up rewrite of the SDK, using code generation from our OpenAPI spec.

This package should be in a usable state for many projects, but expect frequent minor breaking
changes as we rename methods and types. If this isn't suitable for you project, we recommend
pinning to the 2.x releases for now.

Full Changelog: v3.0.0-beta.10...v3.0.0

Features

Read more

v3.0.0-beta.10

18 Jun 02:41
4e01b1c

Choose a tag to compare

v3.0.0-beta.10 Pre-release
Pre-release

3.0.0-beta.10 (2024-06-18)

Full Changelog: v3.0.0-beta.9...v3.0.0-beta.10

Features

  • api: OpenAPI spec update via Stainless API (#1000) (c97f907)
  • api: OpenAPI spec update via Stainless API (#1001) (2f1ef0f)
  • api: OpenAPI spec update via Stainless API (#1002) (f51ca7b)
  • api: OpenAPI spec update via Stainless API (#1003) (226559c)
  • api: OpenAPI spec update via Stainless API (#1004) (c3c6156)
  • api: OpenAPI spec update via Stainless API (#1005) (ec8a580)
  • api: OpenAPI spec update via Stainless API (#1006) (1b3c186)
  • api: OpenAPI spec update via Stainless API (#1007) (1451caa)
  • api: OpenAPI spec update via Stainless API (#1008) (6b66d16)
  • api: OpenAPI spec update via Stainless API (#1009) (cba721d)
  • api: OpenAPI spec update via Stainless API (#1010) (edf3d01)
  • api: OpenAPI spec update via Stainless API (#1012) (044d8e5)
  • api: OpenAPI spec update via Stainless API (#713) (a0eeb87)
  • api: OpenAPI spec update via Stainless API (#714) (7fb3d7e)
  • api: OpenAPI spec update via Stainless API (#715) (03f1c56)
  • api: OpenAPI spec update via Stainless API (#716) (ddb10a2)
  • api: OpenAPI spec update via Stainless API (#717) (dea253d)
  • api: OpenAPI spec update via Stainless API (#718) (49c0c0f)
  • api: OpenAPI spec update via Stainless API (#719) (457ac82)
  • api: OpenAPI spec update via Stainless API (#720) (359cd8e)
  • api: OpenAPI spec update via Stainless API (#721) (0a5e98b)
  • api: OpenAPI spec update via Stainless API (#722) (e5ba886)
  • api: OpenAPI spec update via Stainless API (#723) (014819d)
  • api: OpenAPI spec update via Stainless API (#724) (6cceaf7)
  • api: OpenAPI spec update via Stainless API (#725) (4b98eab)
  • api: OpenAPI spec update via Stainless API (#727) (5745d99)
  • api: OpenAPI spec update via Stainless API (#728) (4ca97ec)
  • api: OpenAPI spec update via Stainless API (#729) (26fd504)
  • api: OpenAPI spec update via Stainless API (#730) (45acdc0)
  • api: OpenAPI spec update via Stainless API (#731) (799f40e)
  • api: OpenAPI spec update via Stainless API (#732) (1bdd586)
  • api: OpenAPI spec update via Stainless API (#733) (5c45e6e)
  • api: OpenAPI spec update via Stainless API (#734) (5b3d98d)
  • api: OpenAPI spec update via Stainless API (#735) (45c5755)
  • api: OpenAPI spec update via Stainless API (#736) (556227a)
  • api: OpenAPI spec update via Stainless API (#737) (5a27fe1)
  • api: OpenAPI spec update via Stainless API (#738) (3258d85)
  • api: OpenAPI spec update via Stainless API (#739) (760506b)
  • api: OpenAPI spec update via Stainless API (#740) (947a9e9)
  • api: OpenAPI spec update via Stainless API (#741) (07a5624)
  • api: OpenAPI spec update via Stainless API (#742) (a730175)
  • api: OpenAPI spec update via Stainless API (#743) (0a87d13)
  • api: OpenAPI spec update via Stainless API (#744) (8353bfe)
  • api: OpenAPI spec updat...
Read more