Skip to main content

Dependency Judgment

beginner10 min readLesson 43 of 169

Questions before importing, and keeping the tree clean.

With great package power comes great dependency judgment:

Questions before importing a package

  1. Is it maintained? (recent releases, open issue activity)
  2. Is it popular enough to have answers when you get stuck?
  3. Does the standard library already do this? (json beats half the JSON packages on PyPI.)
  4. What does it drag in? Every dependency has dependencies.

Keep the tree clean

  • .venv/ belongs to the machine, not the repo โ€” ignore it in Git.
  • requirements.txt belongs in the repo โ€” it is the recipe.
  • One venv per project, always.

This module's habits are what Intermediate will assume you have: isolated environments, pinned versions, and the reflex to check whether the standard library already solved it.

Now practice

Requirements HygieneWrite and validate a requirements file.3 challenges ยท ยท ~20 min