Wynd: build and deploy Python Workers
Wynd builds, runs and deploys
Cloudflare Python Workers.
It replaces pywrangler and keeps your project layout: pyproject.toml, a
Wrangler config and code in src/. Packages go in .wynd/. Run it with
uvx wynd; it runs Wrangler 4.129.0 for you. Wynd can also read configuration
from cloudflare.config.py.
uvx wynd init # write a new crosswind-workers project
uvx wynd dev # install packages for the Worker's Python, then wrangler dev
uvx wynd deploy # prune unused packages, then wrangler deploy
uvx wynd tail # anything else goes to Wrangler unchanged
What it does
For wynd dev, Wynd reads your Wrangler config, or compiles
cloudflare.config.py into one, picks the Python version the
Worker will run on, installs your dependencies for that version into
.wynd/run/python_modules/, and starts Wrangler's dev server.
For wynd deploy, wynd versions upload and wynd preview, Wynd also:
- Follows the imports from your entry module through every installed package.
- Copies your source and the package files those imports can reach into
.wynd/build/. It leaves out tests, docs, type stubs and modules nothing imports, and strips comments and docstrings from the package modules it keeps. - Runs Wrangler on that copy.
Every other command, such as wynd login, wynd tail or
wynd kv namespace create, goes straight to Wrangler.
How it differs from pywrangler
| Behaviour | pywrangler | Wynd |
|---|---|---|
| Unused vendored files | Uploaded | Dropped before upload |
Python version with --env or --config |
Read from the top level of the default config | Read from the environment and config you pass |
| Reinstall after a compatibility date change | Only with sync --force |
Automatic |
| Runtime SDK | Always adds workers-runtime-sdk |
Installs the one you declare, crosswind-workers or workers-runtime-sdk |
| Typed bindings | TypeScript types converted to Python | wynd types writes a Python Env class for crosswind-workers |
| Editor environment | A separate .venv-workers |
Your normal .venv from uv sync |
| New projects | pywrangler init |
wynd init, with a cloudflare.config.py |
| Config file | Wrangler's | Wrangler's, or cloudflare.config.py |
What pruning saves
Warning
The pruner is in early alpha, and its rules will change often between releases. Prune the upload says what it handles well today and what it doesn't do.
Pruning drops Python files that nothing imports, plus tests, docs and type stubs. It strips comments and docstrings from the package modules it keeps, and keeps compiled extensions and data files whole. How much it saves depends on your packages. These figures come from Wynd 0.3.0 with a Python 3.14 target:
| Worker | python_modules/ |
After pruning | Saved |
|---|---|---|---|
wynd init's project, crosswind-workers 0.2.0 only |
130,629 bytes | 84,128 bytes | 36% |
| workers-runtime-sdk only | 113,809 bytes | 62,897 bytes | 45% |
| FastAPI and pydantic on workers-runtime-sdk | 9,376,122 bytes | 7,872,724 bytes | 16% |
In the FastAPI Worker, pydantic-core's compiled extension is 4,689,616 of the
bytes after pruning, and Wynd keeps it whole. wynd deploy --dry-run prints
the numbers for your Worker. See Prune the upload.
When to use it
Use Wynd for any Python Worker built with crosswind-workers, which doesn't run under pywrangler.
Start a new project with uvx wynd init, which writes a crosswind-workers
Worker configured in cloudflare.config.py.
On the stock SDK, Wynd is worth switching to if you deploy with --env or
more than one config, if you change compatibility dates, or if you want to see
what each upload contains. Switch from pywrangler moves
an existing project.
Install
Wynd needs no install step. uvx wynd downloads the latest release and runs
it, as in uvx wynd dev. To pin a version, run uvx wynd@<version>. To put
wynd on your PATH, install it as a uv tool:
uv tool install wynd
Requirements
- uv 0.13.4 or later on
PATH. - Node.js on
PATH, fornpx. - Linux or macOS. Windows is untested.
Status
Wynd is pre-1.0, and its commands and options may change between minor
releases. It has no --upgrade flag for sync, and wynd dev always runs
the full python_modules/, never the pruned tree. Wynd is an
independent community project, not an official Cloudflare tool.
Next steps
- Switch from pywrangler moves an existing project to Wynd.
- Write config in Python creates a project with
wynd initand configures it incloudflare.config.py. - Commands and configuration lists every command, flag and setting.