← All drillsBuild a Typed, Tested CLI Tool
What you'll be able to do- ✓Parse messy real-world text into typed, immutable domain objects
- ✓Process a file too large for memory with a generator pipeline, and measure the difference
- ✓Define a plugin boundary with a Protocol, and explain why it is not an ABC
- ✓Validate untrusted input once, at the boundary, and account for every rejected line instead of crashing or dropping it
- ✓Ship a packaged CLI with an exit-code contract, separate stdout and stderr, and machine-readable output
- ✓Write tests that check a known ground truth, and prove they catch real bugs
- ✓Gate a codebase with ruff, mypy --strict and pytest in CI, and run the tool against everything that should go wrong
Build the kind of small, typed, tested command-line tool a working Python engineer ships — and the package every later drill in the track turns into an API, a database-backed service and a deployed product.
⌁ Access-log analysis is what GoAccess and every observability pipeline's first stage do. The typed-package-plus-CI-gate structure is the baseline for any Python service a team maintains.
Start this internshipCreate an account to unlock the 11 sections, the workbench, and askThili.
BeginSections
1. Build a Typed, Tested CLI Tool
🔒 locked2. Lesson 1 - Parse One Line, Typed
🔒 locked3. Lesson 2 - Streaming, Not Slurping
🔒 locked4. Lesson 3 - Pluggable Formats
🔒 locked5. Lesson 4 - Validation at the Boundary
🔒 locked6. Lesson 5 - The Analyses
🔒 locked7. Lesson 6 - A Real CLI
🔒 locked8. Lesson 7 - Package It
🔒 locked9. Lesson 8 - Test It
🔒 locked10. Lesson 9 - The Gate
🔒 locked11. Lesson 10 - Failure Modes
🔒 lockedDig deeper
🔗PEP 484 — Type Hints
docs🔗PEP 544 — Protocols: Structural subtyping (static duck typing)
docs🔗PEP 561 — Distributing and Packaging Type Information
docs🔗Typer documentation
docs🔗Pydantic documentation
docs🔗Python Packaging User Guide — Writing your pyproject.toml
docs🔗thililog — the reference implementation you build in this course
code