JSPM

serverless-uv-requirements

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 123
  • Score
    100M100P100Q81808F
  • License MIT

Blazing-fast Python dependency management using uv for Serverless Framework

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

YasogaN

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-requirements

Setup

# 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 available

Requirements

  • uv: curl -LsSf https://astral.sh/uv/install.sh | sh
  • Serverless Framework: >=3.0.0

How it works

  1. uv resolves dependencies from pyproject.toml to requirements.txt (10-100x faster than pip)
  2. serverless-python-requirements handles Lambda packaging

License

MIT