Making dependencies reproducible
Dependency metadata tells another machine which external packages an application requires. A simple requirements.txt can list versions, while modern projects can also define metadata and dependencies in pyproject.toml.
Pinning versus flexibility
Fully unbounded dependencies can change unexpectedly, while aggressively pinning every transitive dependency can make upgrades cumbersome. Choose a strategy that supports reproducible builds and deliberate upgrades.
Development and production dependencies
Testing, formatting and linting tools may be development dependencies rather than runtime requirements. Keeping these categories clear helps produce smaller and cleaner production environments.
Practice: create dependency metadata for a small API, install it into a fresh environment and confirm the application works without global packages.