Cloudflare Workers provides first-class support for Python, including support for:The majority of Python’s Standard library All bindings , inclu

Write Cloudflare Workers in Python · Cloudflare Workers docs

submited by
Style Pass
2024-04-02 14:00:03

Cloudflare Workers provides first-class support for Python, including support for:The majority of Python’s Standard library All bindings , including Workers AI , Vectorize , R2 , KV , D1 , Queues , Durable Objects , Service Bindings and more.Environment Variables , and Secrets A robust foreign function interface (FFI) that lets you use JavaScript objects and functions directly from Python — including all Runtime APIs Built-in packages , including FastAPI External link icon Open external link , Langchain External link icon Open external link , httpx External link icon Open external link and more.Python Workers are in open beta.You can currently only use the built-in packages in local development. Support for deploying packages with a requirements.txt file is coming soon.You must add the python_workers compatibility flag to your Worker, while Python Workers are in open beta.We’d love your feedback. Join the #python-workers channel in the Cloudflare Developers Discord External link icon Open external link and let us know what you’d like to see next.​​ Get started

git clone https://github.com/cloudflare/python-workers-examples
cd 01-hello
npx wrangler@latest dev

You can currently only use the built-in packages in local development. Support for deploying packages with a requirements.txt file is coming soon.

Leave a Comment