noahgift/functional_intro_to_python
[tutorial]A functional, Data Science focused introduction to Python
What it solves
This repository is a teaching focused introduction to Python, deliberately kept short and functional, aimed at absolute beginners with zero programming experience. It prioritizes a data-science centric path and also covers more advanced topics like machine learning, linear optimization, build systems, command line tools, recommendation engines, sentiment analysis, and cloud computing.
How it works
Lessons are provided as Jupyter notebooks under notebooks/, runnable with uv run jupyter lab after installing dependencies via make install. The toolchain is explicitly modernized: uv for environment and dependencies, ruff for linting and formatting, ty for type checking, pytest + coverage for tests (with a required 100% branch coverage), and icontract + hypothesis for contracts. A key feature is that every example can be transpiled to Rust using depyler, and the Rust output is held to clippy -D warnings and proptest parity. All quality gates are enforced via Make targets and a CI grep ensures no legacy tools like pip, pylint, black, mypy, or poetry are used.
Who it's for
Designed for learners with no programming background who want a quick, minimal path into Python for data science. It also serves programmers interested in functional programming style and those curious about how Python code can be checked with formal contracts and translated to Rust safely. The later lessons raise the difficulty, so it also suits people wanting to explore ML, optimization, and cloud topics within a Python context.
Highlights
- Intentionally brief, functional, data-science-first introduction
- Modern toolchain:
uv,ruff,ty,pytest,coverage– no legacy tools - 100% branch coverage enforced, with provable contracts via
icontractandhypothesis - Every example is transpilable to Rust via
depyler, with strict lint and property testing on the Rust side - Covers five core lessons: introductory concepts, functions, control structures, intermediate topics (classes modules libraries), and I/O
- Additional advanced sections on ML, optimization, build systems, CLI tools, recommendation engines, sentiment analysis, and cloud computing
Related
- Project
- Project
- Project
- Project