- Standard library only: Lessons in
ultimatepython/strictly use the Python standard library. No external runtime dependencies, external services, or network calls. - Lesson structure: Docstring, helper definitions, parameterless idempotent
main()with assertions for verification, andif __name__ == "__main__": main(). - Runner discovery:
runner.pydynamically discovers modules underultimatepython/and executesmain(). - Web UI (
ui/): An Astro + TypeScript application for browsing lessons. Lessons are parsed byui/parse_lessons.py.
Run ./pre-commit.sh to run the full Python verification suite:
- Lint & Format:
ruff checkandruff format - Type Checking:
mypy ultimatepython check_readmes.py runner.py - README Sync:
python check_readmes.py(verifies header hierarchy and lesson links) - Tests & Coverage:
coverage run runner.pyandcoverage report(target >= 80%) - Single Lesson:
python ultimatepython/<category>/<module>.py - UI Checks:
npm run lint(astro check) andnpm run buildinui/