← Back
Cloudflare
Cloudflare Python SDK v5.0.0-beta.1 adds 40+ new API resources with breaking changes

Major Expansion of API Resources

Cloudflare's Python SDK v5.0.0-beta.1 introduces a substantial number of new API resources and endpoints. Key additions include:

  • AI & Machine Learning: ai.tomarkdown, aigateway.dynamicrouting, aigateway.providerconfigs, aisearch with instances and tokens management
  • Security & Compliance: New fraud detection, brandprotection suite, and enhanced zerotrust.dlp capabilities
  • Data & Storage: R2 Data Catalog integration with credentials and namespace management, D1 database resources
  • Real-time Communications: Complete Real-time Kit API covering active sessions, live streams, meetings, recordings, and webhooks
  • Infrastructure: New organization management, pipeline/sink/stream configurations, and load balancer monitor groups

Breaking Changes Require Migration Planning

This is a major version bump with 15+ resources experiencing breaking changes, including:

  • abusereports, acm.totaltls, apigateway.configurations
  • cloudforceone.threatevents, d1.database, intel.indicatorfeeds
  • logpush.edge, origintlsclientauth resources, queues.consumers
  • radar.bgp, rulesets.rules, zerotrust.dlp, and more

These changes stem from OpenAPI schema accuracy improvements and codegen updates. Developers must consult the v5 Migration Guide before upgrading.

Enhanced Type System & Request Handling

The release includes significant improvements to type inference, Pydantic compatibility, and request/response handling:

  • Better Pyright type inference for TypedDict compatibility
  • Corrected multipart/form-data request handling
  • Fixed GET request headers (no Content-Type)
  • Improved discriminated union parsing in responses
  • Enhanced response body model accuracy across the board

Beta Testing Period

This is a beta release currently undergoing stability testing. Users are encouraged to test in non-production environments and report issues on GitHub. A stable v5.0.0 release is expected to follow after feedback incorporation.