← Back to Tech Radar
Hacker News tech

Python Workers are now generally available

Trending on Hacker News: Python Workers are now generally available (156 points / 25 comments, via blog.cloudflare.com)

In one line

Python Workers allow developers to run Python web frameworks and AI orchestration libraries natively in the Cloudflare Workers runtime. You can seamlessly integrate with Cloudflare’s ecosystem including D1, R2, and Workers AI without writing any JavaScript glue code.

Opening excerpt

We introduced Python Workers two years ago, providing a way to run Python applications in the Cloudflare Workers runtime. Our goal was to make it as simple to write Workers in Python as it is in TypeScript, and to make the ecosystem of Python packages and frameworks “just work”.

What does GA mean? It means Python is now a first-class, fully supported language on the Cloudflare Developer Platform. You can bring the Python code, libraries, and design patterns you already know and connect them seamlessly to Workers AI, R2, D1, Hyperdrive, Durable Objects, Queues, Workflows, and the rest of the Cloudflare platform. You can also run popular Python frameworks like FastAPI, Django, and Flask inside Python Workers. You can even create a Python Worker inside another Worker using Dynamic Workers .

from fastapi import FastAPI, Request from workers import asgi, WorkerEntrypoint app = FastAPI() @app.get ( ”/” ) async def root (request: Request): env = request.scope[ “env” ] return await env.

(Excerpted from the original; full article via the source link below.)

This story hit the Hacker News front page today (156 points / 25 comments, via blog.cloudflare.com). Our Tech Radar aggregates daily signals on AI engineering, backend architecture and DevOps — browse the related services and further reading below, or get in touch with our team.

Source: Hacker News

Related Services

Related Reading