Cloud Computing and Data Centers

Cloudflare Officially Enables Python Workers to Run Python Applications on Its Platform

Cloudflare announced the general availability of Python Workers, making Python an officially supported language within the Workers environment with direct integration with services such as Workers AI, R2, D1, and Hyperdrive. The release supports the FastAPI, Django, and Flask frameworks and artificial intelligence libraries, while compatibility with WebAssembly packages continues to expand.

2026-09-21
4 min read
12 views
فريق تحرير certi.news
Cloudflare Officially Enables Python Workers to Run Python Applications on Its Platform

Cloudflare announced the general availability (GA) of Python Workers, two years after introducing it as a way to run Python applications within the Cloudflare Workers environment. With this step, Python has become an officially supported language within the Cloudflare Developer Platform, with the ability to use well-known libraries and frameworks and connect them to Cloudflare services without writing a JavaScript integration layer.

The new environment enables the use of the FastAPI, Django, and Flask frameworks, along with other frameworks compatible with WSGI or ASGI. Cloudflare provides connectors such as workers.asgi and workers.wsgi to convert Workers requests into the structure expected by Python applications, while the Workers platform handles request reception, scaling, and load balancing.

Direct integration with Cloudflare services

One of the main practical changes is support for Cloudflare bindings directly within Python. Previously, passing Python objects to services such as Queues required manually converting them into JavaScript objects using Pyodide and JavaScript interfaces. Now, the Workers environment and Python package handle type conversion, allowing calls to be used with ordinary Python syntax.

This includes Workers AI, R2, D1, Hyperdrive, Durable Objects, Queues, and Workflows. Cloudflare also enables the creation of a Python Worker inside another Worker using Dynamic Workers.

Databases and network connections

Python applications can now use Hyperdrive to connect to PostgreSQL and MySQL databases. The lack of TCP socket support had been an obstacle to running database drivers inside WebAssembly, because these drivers typically rely on POSIX system calls for networking. According to Cloudflare, the company addressed this by implementing socket calls using the Workers connect API, allowing drivers such as aiomysql and asyncpg to work without modification or knowledge of the underlying environment’s details.

What is changing for AI developers?

It is now possible to run libraries such as openai, langchain, and mcp inside Python Workers. Cloudflare has also worked to enable HTTP clients such as requests and httpx to route requests through JavaScript fetch in WebAssembly environments. Developers can combine these libraries with Workers AI to perform inference on GPU units across the Cloudflare network, or route requests through Cloudflare AI Gateway.

The company presents examples of applications that include orchestrating AI tasks using Queues, Workflows, Workers AI, and R2; processing event streams in real time through Bluesky Jetstream and Durable Objects; as well as MCP servers and RAG systems with Vectorize.

Limitations and open questions

Python Workers relies on a Python interpreter compiled to WebAssembly using Pyodide. Therefore, packages that include native extensions written in C, C++, or Rust require a custom build for the WebAssembly platform. Cloudflare says that the PyEmscripten standard, associated with proposal PEP 783, and updated build tools will help expand the package ecosystem, but the company acknowledges that adoption of this standard is still ongoing and that some packages may not yet be supported.

certi.news analysis: The change is not merely the addition of a new programming language, but a reduction in reliance on JavaScript when building Python services distributed at the edge. This matters to development teams that have Python applications or libraries and want to connect them to Cloudflare services, but it does not eliminate the need to check package compatibility and WebAssembly limitations before moving existing applications into production. Cloudflare’s future promises to improve performance and memory efficiency and support more packages also make clear that general availability represents an important maturity milestone, not the end of work on the platform.

News source
Cloudflare Blog
Open original source ↗
ف
Author

فريق تحرير certi.news

In the same category

You may also like

View all news