Skip to content

Changelog

New updates and improvements at Cloudflare.

hero image

Cloudflare Python SDK v5.0.0 Released

Full Changelog: v4.3.1...v5.0.0

This is a major release of the Cloudflare Python SDK. It drops support for Python 3.8, adds 11 new API services, introduces optional aiohttp backend support for improved async concurrency, and includes hundreds of type and method updates across the entire API surface.

Please review the breaking changes below before upgrading. A migration guide is available at v5.0.0 Migration Guide.

Breaking Changes

  • Python 3.8 is no longer supported. The minimum required version is now Python 3.9.
  • typing-extensions minimum version bumped from >=4.10 to >=4.14.

The following resources have breaking changes. See the v5.0.0 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

aiohttp Backend Support

The async client now supports an optional aiohttp HTTP backend for improved concurrency performance. Install with pip install cloudflare[aiohttp] and use DefaultAioHttpClient() as the http_client parameter.

Python 3.13 and 3.14 Support

Python 3.13 and 3.14 are now tested and supported.

New Services

The following top-level resources are new in this release:

ResourceClient PathDescription
AI SearchaisearchAI-powered search capabilities
ConnectivityconnectivityConnectivity testing and diagnostics
Email Sendingemail_sendingEmail send and send_raw endpoints
FraudfraudFraud detection and prevention
Google Tag Gatewaygoogle_tag_gatewayGoogle Tag Gateway management
OrganizationsorganizationsOrganization audit logs and management
R2 Data Catalogr2_data_catalogR2 Data Catalog operations
Realtime Kitrealtime_kitRealtime communication (Calls/TURN)
Resource Taggingresource_taggingResource tagging and labeling
Token Validationtoken_validationToken validation configuration and rules
Vulnerability Scannervulnerability_scannerVulnerability scanning, credential sets, and target environments

New Endpoints on Existing Services

  • api_gateway: Labels endpoints
  • billing: Billable usage PayGo endpoint
  • brand_protection: v2 endpoints
  • browser_rendering: DevTools methods
  • cache: Origin cloud regions resource
  • custom_origin_trust_store: Custom origin trust store
  • dns: dns_records/usage endpoints
  • email_security: Phishguard reports endpoint
  • iam: User groups and user group members resources
  • radar: Botnet Threat Feed and Post-Quantum endpoints
  • workers: Observability Destinations resources
  • zero_trust: Access Users, DEX rules, Device IP Profile, Device Subnet, WARP Connector connections and failover, WARP Subnet, Gateway PAC files
  • zones: Zone environments endpoints

Bug Fixes

  • Fixed polymorphic_serialization parameter in model_dump overrides
  • Added BaseModel base to response SchemaFieldStruct/SchemaFieldList stubs in Pipelines
  • Added missing model_rebuild/update_forward_refs for SharedEntryCustomEntry classes in DLP
  • Made RunQueryParametersNeedleValue a BaseModel with arbitrary_types_allowed in Workers
  • Removed duplicate notification_url field in webhook response types for Stream
  • Resolved pre-existing codegen type errors
  • Fixed type: ignore[call-arg] placement for mypy compatibility in Radar

Deprecations

Resources with @deprecated annotations on some methods include: accounts, addressing, ai-gateway, aisearch, api-gateway, billing, cloudforce-one, dns, email-routing, email-security, filters, firewall, images, intel, kv, logpush, origin-tls-client-auth, pages, pipelines, radar, rate-limits, registrar, rulesets, ssl, user, workers, workers-for-platforms, zero-trust, zones

Get started