Track 10 · Lesson 11 of 12
Dependencies and requirements
Record a project's dependencies in requirements.txt and pyproject.toml, read version specifiers, pin versions for reproducible installs, and parse both formats with code.
You will be able to
- Read and write requirements.txt files, including comments and version specifiers
- Explain the difference between pinning exact versions and allowing a range, and when to use each
- Check whether a version satisfies a specifier such as >=2.31,<3 or ~=2.2
- Read project metadata and dependencies from pyproject.toml with tomllib
Included with a Formula Quest membership
It has 4 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.
View Formula Quest memberships
Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.