sajad torkamani

In a nutshell

pip-compile is a command-line utility (included as part of the pip-tools package) that takes a plain-text requirements.in file and output a requirements.txt file that contains all the direct and indirect dependencies of your project, including their specific versions.

Workflow: Add a new dependency

Open your requirements.in file and manually add an entry:

uvicorn >= 0.27.0

Run the below to generate a new requirements.txt:

pip-compile requirements.in

Run the below to install the dependencies:

pip install -r requirements.txt
Tagged: Python

Leave a comment

Your email address will not be published. Required fields are marked *