Complete Python Cloudflare deployment system. PROACTIVELY activate for: (1) Python Workers with Pyodide, (2) FastAPI on Workers, (3) Cloudflare Containers for heavy compute, (4) Service bindings (RPC), (5) Environment variables in Workers, (6) Cold start optimization, (7) Workflows for durable execution, (8) GPU containers for AI. Provides: Worker code patterns, wrangler config, Dockerfile templates, FastAPI integration. Ensures edge deployment with proper architecture choices.
View on GitHubJosiahSiegel/claude-plugin-marketplace
python-master
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/JosiahSiegel/claude-plugin-marketplace/blob/main/plugins/python-master/skills/python-cloudflare/SKILL.md -a claude-code --skill python-cloudflareInstallation paths:
.claude/skills/python-cloudflare/## Quick Reference | Platform | Cold Start | Packages | Best For | |----------|------------|----------|----------| | Workers (Pyodide) | ~50ms | Limited | API endpoints | | Containers | ~10s | Any | Heavy compute, AI | | Worker Pattern | Code | |----------------|------| | Basic handler | `class Default(WorkerEntrypoint):` | | FastAPI | `await asgi.fetch(app, request, self.env)` | | Env vars | `self.env.API_KEY` | | Service binding | `await self.env.WORKER_B.method()` | | Command | Purpose | |---------|---------| | `pywrangler init` | Create Python Worker | | `pywrangler dev` | Local development | | `pywrangler deploy` | Deploy to Cloudflare | | Container vs Worker | Recommendation | |---------------------|----------------| | Simple API | Worker | | pandas/numpy | Container | | GPU/AI | Container | | <50ms latency | Worker | ## When to Use This Skill Use for **Cloudflare edge deployment**: - Deploying Python APIs to Cloudflare Workers - Running FastAPI on Cloudflare edge - Using Containers for heavy compute - Setting up service-to-service RPC - Optimizing cold starts **Related skills:** - For FastAPI: see `python-fastapi` - For async patterns: see `python-asyncio` - For Docker: see `python-github-actions` --- # Python on Cloudflare (Workers & Containers) ## Overview Cloudflare provides two ways to run Python: 1. **Python Workers** - Serverless functions using Pyodide (WebAssembly) 2. **Cloudflare Containers** - Full Docker containers (beta, June 2025) ## Python Workers ### How It Works - Python runs via **Pyodide** (CPython compiled to WebAssembly) - Executes inside V8 isolates on Cloudflare's edge network - Memory snapshots enable fast cold starts - Supports many pure Python packages ### Quick Start ```bash # Install pywrangler (Python Workers CLI) pip install pywrangler # Create new Python Worker pywrangler init my-worker cd my-worker # Project structure my-worker/ ├── src/ │ └── entry.py ├── pyproject.toml └── wrangler.toml ``` ### Basic Worke