Python Workers Examples
This is a collection of examples for writing Cloudflare Workers in Python. Use these examples to learn how Python Workers work.
Get started
git clone https://github.com/cloudflare/python-workers-examplescd hellonpx wrangler@latest dev- Press the
bkey to open a browser tab, and make a request to your Worker
You can run npx wrangler@latest dev in any example project directory to run a local development server using Wrangler, the CLI for Cloudflare Workers. This local development server is powered by workerd, the open-source Workers runtime.
Need to deploy your Worker to Cloudflare? Python Workers are in open beta and have a few limitations.
Examples
01-hello/— the most basic Python Worker02-binding/— shows how bindings work in Python Workers. Put a key into Workers KV, and then read it.03-fastapi/— demonstrates how to use the FastAPI package with Python Workers04-langchain/— demonstrates how to use the LangChain package with Python Workers
Open Beta and Limits
- Python Workers are in open beta. Currently, you can only deploy Python Workers that use the standard library. Packages cannot be deployed and will only work in local development for the time being.
- You must add the
python_workerscompatibility 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 and let us know what you’d like to see next.
License
The Apache 2.0 license.
Metadata
Release files for mtmdb 0.0.802
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mtmdb-0.0.802.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mtmdb-0.0.802-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.6 kB
Release files / mtmdb-0.0.802.tar.gz
| Download URL | mtmdb-0.0.802.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78c531b744403900bbcf087308cc195167d7d11dd0a5455a03850398e17f21f3
|
|
BLAKE2b-256 checksum How to use checksums |
d01cfde068106e19515ece7756cd26d91aec874ee346c855dd90237c13ac9dd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.6 Linux/6.1.91-060191-generic
|
Release files / mtmdb-0.0.802-py3-none-any.whl
| Download URL | mtmdb-0.0.802-py3-none-any.whl |
|---|---|
| Size | 2.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81111f015d2c44dd93ac32d11bb106d15f556a63c460e0bcf940b198072fbd2a
|
|
BLAKE2b-256 checksum How to use checksums |
36a1122a2918443b58c6aace7778b431b30a3bb56383a0956ffc71f041b4de5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.6 Linux/6.1.91-060191-generic
|