Examples
Cloudflare has a wide range of Python examples in the Workers Example gallery.
In addition to those examples, consider the following ones that illustrate Python-specific behavior.
Parse an incoming request URL
Parse JSON from the incoming request
Emit logs from your Python Worker
Publish to a Queue
Query a D1 Database
Refer to Query D1 from Python Workers for a more in-depth tutorial that covers how to create a new D1 database and configure bindings to D1.
Next steps
- If you’re new to Workers and Python, refer to the get started guide
- Learn more about calling JavaScript methods and accessing JavaScript objects from Python
- Understand the supported packages and versions currently available to Python Workers.