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,aisearchwith instances and tokens management - Security & Compliance: New
frauddetection,brandprotectionsuite, and enhancedzerotrust.dlpcapabilities - 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.configurationscloudforceone.threatevents,d1.database,intel.indicatorfeedslogpush.edge,origintlsclientauthresources,queues.consumersradar.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.