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
- Is it maintained? (recent releases, open issue activity)
- Is it popular enough to have answers when you get stuck?
- Does the standard library already do this? (
jsonbeats half the JSON packages on PyPI.) - 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.txtbelongs 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.