Cloudflare announced that Python Workers, first introduced two years ago, are now generally available, giving Python status as a fully supported first-class language on the Cloudflare Developer Platform.
The update removes several blockers that previously made Python awkward to use for production AI workloads on Workers. Bindings to Cloudflare's platform — including Workers AI, R2, D1, Queues, and Workflows — now work with plain Python data structures, eliminating the JavaScript conversion code developers previously had to write at the RPC boundary.
Python Workers can now also run standard web frameworks — FastAPI, Django, and Flask — through new workers.asgi and workers.wsgi connector packages, letting existing Python API code run inside the Workers runtime without a separate application server.
A more consequential change for AI applications: Cloudflare added support for low-level TCP socket operations inside the WebAssembly sandbox that Python Workers run in. This unblocks Hyperdrive integration, so Python Workers can now connect directly to PostgreSQL or MySQL databases using familiar drivers such as asyncpg or aiomysql. The same networking fix, combined with upstream contributions to HTTP clients like requests and httpx, means libraries such as openai, langchain, and mcp now work natively inside Python Workers, routing through the JavaScript fetch API under the hood.
Cloudflare also says it proposed and got accepted PEP 783, a standard for running Python in browser-style runtimes (PyEmscripten), aimed at growing the pool of Python packages that can be cross-compiled to WebAssembly and used across Pyodide-based environments, not just Cloudflare's.
The company published example patterns for what these changes enable in practice: an asynchronous image-generation pipeline chaining Queues, Workflows, Workers AI, and R2; a real-time event-stream consumer using Durable Objects; a Model Context Protocol (MCP) server built with the official Python MCP package; and a Retrieval-Augmented Generation (RAG) system built on Workers AI and Cloudflare's Vectorize database. Python code examples have also been added across Cloudflare's developer documentation alongside existing TypeScript samples.