Package Exports
- serverless-uv-requirements
- serverless-uv-requirements/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-uv-requirements) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
serverless-uv-requirements
Fast Python dependency resolution using uv for Serverless Framework.
Generates requirements.txt from pyproject.toml using uv's fast resolver, then works with serverless-python-requirements for Lambda packaging.
Installation
npm install --save-dev serverless-uv-requirements serverless-python-requirementsSetup
# serverless.yml
plugins:
- serverless-uv-requirements
- serverless-python-requirements
custom:
uv:
mode: compile
source: pyproject.toml
output: requirements.txt
pythonRequirements:
dockerizePip: non-linux# pyproject.toml
[project]
dependencies = [
"fastapi>=0.104.0",
"pydantic>=2.0.0",
]Configuration
custom:
uv:
mode: compile # 'compile' or 'freeze'
source: pyproject.toml # Input file
output: requirements.txt # Output file
verbose: false # Enable verbose logging
skipIfMissing: false # Skip if uv not availableRequirements
- uv:
curl -LsSf https://astral.sh/uv/install.sh | sh - Serverless Framework: >=3.0.0
How it works
- uv resolves dependencies from
pyproject.tomltorequirements.txt(10-100x faster than pip) - serverless-python-requirements handles Lambda packaging
License
MIT