cloudflare-python-workers

Installation
Summary

Build Python serverless APIs on Cloudflare Workers with async-only execution, external package support, and multi-step workflow automation.

  • Deploy Python APIs using the WorkerEntrypoint class pattern with pywrangler CLI; supports all Cloudflare bindings (D1, KV, R2, Workers AI, Durable Objects, Queues)
  • Requires async-only code: use httpx or aiohttp for HTTP calls, avoid sync libraries like requests and native C extensions
  • Python Workflows enable durable multi-step DAG automation with automatic retries using @step.do() decorators and asyncio.gather() for concurrent execution
  • Prevents 11 documented errors including legacy handler patterns, sync I/O blocking, missing compatibility flags, and PRNG initialization during module load
  • Cold starts ~1 second with Wasm memory snapshots (Dec 2025), roughly 2x slower than JavaScript Workers but 10x faster than pre-snapshot Python Workers
SKILL.md

Cloudflare Python Workers

Status: Beta (requires python_workers compatibility flag) Runtime: Pyodide (Python 3.12+ compiled to WebAssembly) Package Versions: workers-py@1.7.0, workers-runtime-sdk@0.3.1, wrangler@4.58.0 Last Verified: 2026-01-21

Quick Start (5 Minutes)

1. Prerequisites

Ensure you have installed:

  • uv - Python package manager
  • Node.js - Required for Wrangler

2. Initialize Project

# Create project directory
Related skills
Installs
321
GitHub Stars
776
First Seen
Jan 20, 2026