Cloudflare Ships Python Workers GA With FastAPI, MCP, Hyperdrive
TL;DR
- Cloudflare declared Python Workers generally available, with FastAPI, Django and Flask now runnable on the same edge runtime as JavaScript Workers.
- The openai, langchain and mcp libraries now run natively, and a langchain-cloudflare package points chains at Workers AI without JavaScript glue.
- New TCP socket support through the Workers Connect API lets aiomysql and asyncpg reach PostgreSQL and MySQL through Hyperdrive.
Two years after Cloudflare introduced Python Workers as a beta, the company declared them generally available, saying Python is now "a first-class, fully supported language on the Cloudflare Developer Platform."
The pitch: you run FastAPI, Django, or Flask on the same edge runtime that already hosts JavaScript Workers, and reach the platform's bindings (Workers AI, R2, D1, Hyperdrive, Durable Objects, Queues, Workflows) directly from Python. "This allows you to utilize all Cloudflare bindings in a Pythonic way without writing a single line of JavaScript code," writes Dominik Picheta in the announcement.
The AI hook is that openai, langchain and mcp now run natively. Cloudflare ships a langchain-cloudflare package for pointing chains at its own inference. Its example gallery includes a Bluesky Jetstream WebSocket consumer wired to a Durable Object, an image-to-image generator that drops requests "into a Cloudflare Queue" and uses Workflows to orchestrate Workers AI, and a RAG system on Vectorize.
The database change is the other unlock. "Previously, Python Workers didn't support TCP sockets, making database drivers unavailable," Picheta writes. That is now fixed through the Workers Connect API: aiomysql and asyncpg reach Postgres and MySQL through Hyperdrive.
The runtime itself is Pyodide, the WebAssembly build of CPython. To make that story portable beyond Cloudflare, the company proposed PEP 783, which "standardizes a platform for running Python in browser runtimes called PyEmscripten"; the PEP was accepted after more than a year of discussion. The post does not publish cold-start, package-size, or memory numbers. It lands during a busy week for edge infrastructure in our AI infrastructure tracker.
Shared on Bluesky by 1 AI expert
-
We're excited to announce that today Python Workers are generally available (GA). It means Python is now a first-class, fully supported language on the Cloudflare Developer Platform. Read everything about it: https://cfl…
View on Bluesky →
Originally reported by blog.cloudflare.com
Read the original article →Original headline: Cloudflare Python Workers Hit GA With Native AI Orchestration for FastAPI, LangChain and MCP