Skip to content
Cloudflare Blog·

🚀Python Workers Now Generally Available on Cloudflare

Python devs, your API scaling just got easier

TL;DR

Python Workers are now generally available on Cloudflare, enabling Python developers to build and scale APIs globally without JavaScript. FastAPI, Django, and Flask can be used directly in Python Workers.

Python Workers are now generally available on Cloudflare, allowing Python developers to build and scale APIs globally without the need for JavaScript. This means you can use popular frameworks like FastAPI, Django, and Flask directly in Cloudflare Workers. The workers.asgi and workers.wsgi packages translate incoming requests into WSGI/ASGI structures, making it easy to run synchronous and asynchronous web applications. PostgreSQL and MySQL can also be integrated via Hyperdrive, thanks to the socket bridge that translates Python socket operations into JavaScript calls. If you're building APIs with Python, this is a game-changer for global scalability and performance.

Python Workers Now Generally Available on Cloudflare — Cloudflare Blog

Key Points

1

Python Workers are now generally available on Cloudflare, supporting FastAPI, Django, and Flask.

2

The workers.asgi package translates incoming requests into ASGI structures for asynchronous web apps.

3

The workers.wsgi package handles synchronous web applications, translating requests into WSGI structures.

4

Hyperdrive integration allows PostgreSQL and MySQL database use in Python Workers.

5

The socket bridge translates Python socket operations into JavaScript calls for seamless integration.

Why It Matters

If you're building APIs with Python, Python Workers on Cloudflare means instant global scalability without JavaScript. FastAPI, Django, and Flask can be used directly, and Hyperdrive integration with PostgreSQL and MySQL is a plus. This is a big deal for teams looking to deploy Python-based APIs quickly and efficiently.

pythoncloudflareworkersapiscalability

Comments

Subscribe to join the conversation...

Be the first to comment

Enjoyed this article?

Get it daily. 7am. Free. Reads in 5 minutes.

Join 3,483 builders reading daily.

Also get