February 2022
Intermediate to advanced
274 pages
6h 28m
English
A script or application may have dependencies—other projects that need to be installed before the script or application can run. A packaged project like Cards has a list of dependencies defined in either a pyproject.toml, setup.py, or setup.cfg file. Cards uses pyproject.toml. However, many projects don’t use packaging, and instead define dependencies in a requirements.txt file.
The dependency list in a requirements.txt file could be just a list of loose dependencies, like:
| | typer |
| | requests |
However, it’s more common for applications to “pin” dependencies by defining specific versions that are known to work:
| | typer==0.3.2 |
| | requests==2.26.0 ... |