Cloudflare Takes Python Workers to General Availability With Native FastAPI, Django, and Postgres Support
Cloudflare has moved Python Workers out of beta to general availability, adding native FastAPI, Django, and Flask support plus PostgreSQL and MySQL connectivity via Hyperdrive.
Editor's Note ·
- Correction:
- The article states that AI library support for openai, langchain, and mcp is "a capability Cloudflare ties to PEP 783." The cited source does not make this connection: PEP 783 is discussed in a separate section of the post about cross-compiling native C/C++/Rust package extensions to WebAssembly generally, while AI library support is attributed by Cloudflare to upstream contributions that route HTTP clients through the JavaScript fetch API, combined with new low-level socket operations support — not to PEP 783.
Overview
Cloudflare has moved Python support on its Workers serverless platform out of beta and into general availability. “Today, Python Workers are now generally available (GA),” the company said in a blog post from engineer Dominik Picheta, adding that the milestone means “Python is now a first-class, fully supported language on the Cloudflare Developer Platform,” according to Cloudflare.
Python support on Workers began as an open beta. “Starting today, in open beta, you can now write Cloudflare Workers in Python,” Cloudflare announced on April 2, 2024, in a post credited to Garrett Gu and Dominik Picheta.
What We Know
- Framework support. “You can run popular Python frameworks like FastAPI, Django, and Flask inside Python Workers,” according to Cloudflare. The
workers.asgiandworkers.wsgiconnectors bridge JavaScript-originated requests into the WSGI and ASGI structures those frameworks expect. - Database connectivity. “If you are building a Python application using relational databases such as PostgreSQL or MySQL, you can now integrate Hyperdrive into Python Workers,” Cloudflare said, naming the
asyncpgandaiomysqldrivers as supported options. - AI library support. “You can now run AI libraries like
openai,langchain, andmcpnatively in Python Workers,” per Cloudflare, a capability Cloudflare ties to PEP 783, a proposal the company says “standardizes a platform for running Python in the browser runtimes called PyEmscripten.” - Platform integrations. The GA release brings native support for Workers AI, R2, D1, Hyperdrive, Durable Objects, Queues, and Workflows, according to Cloudflare.
- Cross-language RPC. In an August 2026 post, Cloudflare said “you can now call methods defined in a Python Worker from a JavaScript Worker and vice versa,” describing a runtime RPC system that “is able to translate across JavaScript and Python without any additional work.”
- Cold-start performance. A December 2025 post from Picheta and Mike Nomitch reported Cloudflare Python Workers starting in 1.027 seconds in benchmark testing, versus 2.502 seconds for AWS Lambda without SnapStart and 3.069 seconds for Google Cloud Run — figures the post describes as “2.4x faster than AWS Lambda without SnapStart” and “3x faster than Google Cloud Run.” The same post said a worker importing FastAPI, httpx, and Pydantic “takes around 10 seconds” to start without snapshotting, versus “it takes 1 second” with snapshots enabled.
- Dependency tooling. That December post also introduced pywrangler, described as tooling Cloudflare “built our own tooling around
uvcalled pywrangler,” which reads a worker’spyproject.tomlfile to determine dependencies and places them in apython_modulesfolder.
The Python Workers GA follows other recent expansions of the Workers platform, including inbound TCP sockets and gRPC support that Cloudflare previously reported in August.
What We Don’t Know
Cloudflare’s GA announcement does not specify which version of the underlying Pyodide WebAssembly Python interpreter now ships in production, nor does it detail any pricing changes tied to the GA milestone. No independent, third-party benchmark of the cold-start figures has been published to corroborate Cloudflare’s own testing.