Shipping Python means pinned dependencies, venv or containers, logging instead of bare print(), tests in CI, and type checking—not just "works on my laptop."
Checklist
- Pin dependencies in
requirements.txtorpyproject.toml - Use venv or Docker for reproducible environments
- Run
pytestand optionallymypyin CI - Use the
loggingmodule in services—not print in production - Handle secrets via environment variables, never commit
.env - Web concerns (ORM, auth, deployment) live in the Django track
Important interview questions and answers
- Q: Why pin pip versions?
A: Reproducible builds—surprise upgrades break CI and production deploys. - Q: logging vs print?
A: Logging supports levels, handlers, and structured output for observability; print is for dev debugging.
Self-check
- What file pins Python package versions?
- Why separate language track from Django track?
- Name the test runner used in this curriculum.
Track summary
You covered Python language fundamentals: syntax, data structures, OOP, stdlib modules, modern features, tooling, and interview context. Continue with local venv projects and advance to the Django track for HTTP, ORM, and deployment—or compare patterns with JavaScript, Java, and C# tracks.
Next steps
- Create a venv project with pytest and type hints locally
- Practice exercism.org or Advent of Code in Python
- Build a CLI tool using argparse and pathlib
- Advance to Django for web backends
Tip: Use logging not print in production—this lesson closes the track; next stop: Django.
Interview prep
- Why pin dependencies?
Reproducible CI and deploys—unpinned pip installs can break production on fresh install.
- logging vs print?
Logging supports levels, handlers, rotation—essential for production observability.
- What to practice next?
Local venv projects with pytest, then continue to the Django track for web backends.