serverless-python-requirements-uv
v1.0.1
Published
Generate requirements.txt with uv before packaging with serverless-python-requirements
Downloads
351
Readme
Serverless Python Requirements uv
This plugin allows you to use uv in your Serverless Python projects. It automatically generates a requirements.txt file based on your uv.lock file.
Installation
To install the plugin, add it with your favorite package manager:
yarn add --dev serverless-python-requirements-uvThen put it in the plugins list above the serverless-python-requirements plugin in your serverless.yml:
plugins:
- serverless-python-requirements-uv
- serverless-python-requirementsYou might also want to consider adding requirements.txt to your .gitignore file,
as it will be generated automatically.
echo "/requirements.txt" >> .gitignoreUsage
Whenever your uv.lock file is changed more recently than your requirements.txt file,
the plugin will regenerate the requirements.txt file based on the contents of the uv.lock file.
To regenerate the requirements.txt file manually, you can run:
touch uv.lockThis will update the timestamp of the uv.lock file, causing the plugin to regenerate the requirements.txt file
the next time you deploy or package your service.
