Packages

Last updated Sep 18, 2026 is a CLI tool for managing packages and Python Workers. It is meant as a wrapper for wrangler that sets up a full environment for you, including bundling your packages into your worker bundle on deployment.

To get started, create a pyproject.toml file with the following contents:

[project]
name = "YourProjectName"
version = "0.1.0"
description = "Add your description here"
requires-python = ">=3.13"
dependencies = [
    "fastapi"
]

[dependency-groups]
dev = [
    "workers-py",
    "workers-runtime-sdk"
]

The above will allow your worker to depend on the FastAPI ↗︎ package.

To run the worker locally:

uv run pywrangler dev

To deploy your worker:

uv run pywrangler deploy

Your dependencies will get bundled with your worker automatically on deployment.

The pywrangler CLI also supports all commands supported by the wrangler tool, for the full list of commands run uv run pywrangler --help.

Supported Libraries

Python Workers support pure and PyEmscripten ↗︎ Python packages on PyPI ↗︎. Additionally, Python Workers support packages that are included in Pyodide ↗︎.

WebAssembly support for Python packages is still in early stages, and some packages may not yet be available as PyEmscripten wheels on PyPI. If a package you would like to use is not yet available, we encourage you to reach out to the package maintainers and request PyEmscripten wheels. You can also start a thread in the Python Packages Discussions ↗︎ on the Cloudflare Workers Runtime GitHub repository — we would be happy to help you communicate with package maintainers.

Was this helpful?

YesNo

On this page

Packages - 图1Docs

{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/workers/languages/python/packages/#page","headline":"Packages","description":"Manage and use Python packages in Cloudflare Workers with Pywrangler.","url":"https://developers.cloudflare.com/workers/languages/python/packages/","inLanguage":"en","image":"https://developers.cloudflare.com/workers/languages/python/packages/og.png?v=864d364720feb755","dateModified":"2026-09-18","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Run Django on Python Workers title: Django image: https://developers.cloudflare.com/workers/languages/python/packages/django/og.png?v=e734e3def61aadd0


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/workers/llms.txt
Use this file to discover all available pages before exploring further.