cloudflare / cloudflare/workers-py
Script size limits are too strict for Python apps
- Dominant language
- Python
- Stars
- 103
- Forks
- 22
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 30
Description
The current size limits of 3MB (free plan) or 10MB (paid plan) for the gzipped size are too tight for Python apps because many popular Python libraries contain large binaries.
For example, when I tried to deploy an app using the following libraries, it easily hit the limit (sizes are the sums of the gzipped files of each vendored package):
- `pandas` 2.3.3: 4.22MB
- `numpy` 2.2.5: 2.90MB
- `Pillow` 11.3.0 (`PIL`): 0.99MB
- `altair` 6.0.0: 0.74MB
- `libcrypto.so`: 0.62MB
All of them were vendored from the Pyodide v0.29.3 distribution (Python 3.13), synced with `workers-py` 1.15.0 and deployed with `wrangler` 4.110.0.
I believe these libraries are very commonly used in the Python ecosystem and cannot be omitted when developing meaningful applications in certain domains.
I believe this is one of the biggest differences from the JavaScript ecosystem.
It would be great if
- the size limit were relaxed for Python Workers,
- such prepackaged/common libraries were excluded from the size calculation,
- or some other solution were provided.
Thank you.
Contributor guide
Research direction
Start by reviewing the deployment size calculation in wrangler 4.110.0 for workers-py 1.15.0, using the Pyodide v0.29.3 packages listed in the issue as examples. Compare those package sizes with the 3MB free and 10MB paid limits; done requires an agreed solution for Python Workers, whether relaxed limits, exclusions, or another approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100