RepoPilotOpen in app →

dabeaz-course/practical-python

Practical Python Programming (course by @dabeaz)

Mixed

Slowing — last commit 5mo ago

weakest axis
Use as dependencyConcerns

non-standard license (CC-BY-SA-4.0); no CI workflows detected

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 5mo ago
  • 17 active contributors
  • CC-BY-SA-4.0 licensed
Show all 8 evidence items →
  • Tests present
  • Slowing — last commit 5mo ago
  • Concentrated ownership — top contributor handles 69% of recent commits
  • Non-standard license (CC-BY-SA-4.0) — review terms
  • No CI workflows detected
What would change the summary?
  • Use as dependency ConcernsMixed if: clarify license terms

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/dabeaz-course/practical-python?axis=fork)](https://repopilot.app/r/dabeaz-course/practical-python)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/dabeaz-course/practical-python on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: dabeaz-course/practical-python

Generated by RepoPilot · 2026-05-07 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/dabeaz-course/practical-python shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Slowing — last commit 5mo ago

  • Last commit 5mo ago
  • 17 active contributors
  • CC-BY-SA-4.0 licensed
  • Tests present
  • ⚠ Slowing — last commit 5mo ago
  • ⚠ Concentrated ownership — top contributor handles 69% of recent commits
  • ⚠ Non-standard license (CC-BY-SA-4.0) — review terms
  • ⚠ No CI workflows detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live dabeaz-course/practical-python repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/dabeaz-course/practical-python.

What it runs against: a local clone of dabeaz-course/practical-python — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in dabeaz-course/practical-python | Confirms the artifact applies here, not a fork | | 2 | License is still CC-BY-SA-4.0 | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 166 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>dabeaz-course/practical-python</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of dabeaz-course/practical-python. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/dabeaz-course/practical-python.git
#   cd practical-python
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of dabeaz-course/practical-python and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "dabeaz-course/practical-python(\\.git)?\\b" \\
  && ok "origin remote is dabeaz-course/practical-python" \\
  || miss "origin remote is not dabeaz-course/practical-python (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(CC-BY-SA-4\\.0)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"CC-BY-SA-4\\.0\"" package.json 2>/dev/null) \\
  && ok "license is CC-BY-SA-4.0" \\
  || miss "license drift — was CC-BY-SA-4.0 at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 4. Critical files exist
test -f "Notes/Contents.md" \\
  && ok "Notes/Contents.md" \\
  || miss "missing critical file: Notes/Contents.md"
test -f "Notes/01_Introduction/00_Overview.md" \\
  && ok "Notes/01_Introduction/00_Overview.md" \\
  || miss "missing critical file: Notes/01_Introduction/00_Overview.md"
test -f "Solutions/5_8/stock.py" \\
  && ok "Solutions/5_8/stock.py" \\
  || miss "missing critical file: Solutions/5_8/stock.py"
test -f "Notes/03_Program_organization/04_Modules.md" \\
  && ok "Notes/03_Program_organization/04_Modules.md" \\
  || miss "missing critical file: Notes/03_Program_organization/04_Modules.md"
test -f "Notes/04_Classes_objects/00_Overview.md" \\
  && ok "Notes/04_Classes_objects/00_Overview.md" \\
  || miss "missing critical file: Notes/04_Classes_objects/00_Overview.md"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 166 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~136d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/dabeaz-course/practical-python"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

A comprehensive, instructor-led Python programming course with 130+ hands-on exercises structured across 8 modules (Notes/01_Introduction through Notes/08_Testing_debugging). It teaches foundational Python: data types, containers, functions, modules, OOP, generators, and advanced topics—designed for professionals with prior programming experience who need practical, production-ready Python skills. The course is battle-tested across 400+ corporate training cohorts since 2007. Linear, modular curriculum structure: Notes/ root contains 8 sequential modules (01_Introduction → 08_Testing_debugging), each with numbered lessons (00_Overview.md, 01_*.md, etc.). Each module covers a distinct topic (intro basics, data structures, program organization, OOP, object model, generators, advanced topics, testing/logging). Accompanying exercises and examples (not shown in file listing) are referenced in the course. Minimal infrastructure—pure Markdown documentation with embedded code examples.

👥Who it's for

Professional scientists, engineers, and programmers transitioning to Python or deepening their Python fundamentals. Target learners have prior programming experience in another language and need to write useful scripts, manipulate data, and understand/modify existing Python codebases in corporate or research environments (traders, systems admins, astronomers, rocket scientists per the README).

🌱Maturity & risk

Highly mature and stable. The course ran continuously in real classrooms from 2007–2019, battle-tested across 400+ instructor-led cohorts. Now released under Creative Commons (free, no spam). No CI/test infrastructure visible in file listing (this is educational material, not a library), but the content structure is comprehensive and well-organized. No active development expected; this is a finalized, production-quality curriculum.

Minimal risk. This is educational material, not a software dependency. No external dependencies listed in the file structure. The only risk is that Python language evolution may drift from course examples if not maintained—but for Python 3.6+ fundamentals (the stated requirement), the core content remains evergreen. Single-author (David Beazley) context, but the material is mature enough that updates are infrequent.

Active areas of work

No active development. This is a finalized, released curriculum. The repository likely receives minor maintenance (typo fixes, link updates) but no structural changes. The course was 'in continual development from 2007 to 2019' and is now stable under CC license.

🚀Get running

Clone the repository and browse the course material:

git clone https://github.com/dabeaz-course/practical-python.git
cd practical-python
cat Notes/00_Setup.md  # Read setup instructions
python3 --version      # Ensure Python 3.6+ is installed

Then follow Notes/01_Introduction/00_Overview.md to begin lessons. No build step required.

Daily commands: This is not a runnable application. It is a curriculum. To engage with it: open Notes/01_Introduction/00_Overview.md in a text editor or view on GitHub Pages (https://dabeaz-course.github.io/practical-python). Write Python code in a local editor, run it with python3 yourscript.py, and compare against lesson examples.

🗺️Map of the codebase

  • Notes/Contents.md — Master table of contents that outlines the entire course structure and learning progression from basics to advanced topics.
  • Notes/01_Introduction/00_Overview.md — Entry point for the course introducing Python fundamentals; all contributors must understand the pedagogical approach.
  • Solutions/5_8/stock.py — Final capstone solution demonstrating the complete object-oriented design pattern used throughout the course exercises.
  • Notes/03_Program_organization/04_Modules.md — Defines how code is organized into modules and reusable components, foundational to understanding the solution structure.
  • Notes/04_Classes_objects/00_Overview.md — Core material on object-oriented programming that underpins the progression from procedural to class-based solutions.
  • README.md — Course mission and scope statement; essential for understanding the intended audience and learning outcomes.

🛠️How to make changes

Add a new course topic or section

  1. Create a new subdirectory under Notes/ with the section number and descriptive name (e.g., Notes/10_NewTopic) (Notes/10_NewTopic/00_Overview.md)
  2. Write the overview file explaining learning objectives and key concepts covered in this section (Notes/10_NewTopic/00_Overview.md)
  3. Create numbered markdown files for each concept (01_Concept.md, 02_Concept.md) with examples and explanations (Notes/10_NewTopic/01_FirstConcept.md)
  4. Update the master Contents.md file to include links to the new section in proper sequence (Notes/Contents.md)
  5. Create corresponding solution files in Solutions/ organized by exercise number showing progressive refinement (Solutions/X_Y/module.py)

Create a new progressive exercise solution

  1. Identify which section your exercise belongs to and find the next available exercise number (e.g., 5_10) (Solutions/5_10/)
  2. Create the solutions directory with core module files (stock.py, fileparse.py, report.py, etc.) building on previous patterns (Solutions/5_10/stock.py)
  3. In the corresponding Notes section, add an exercise reference that directs learners to implement features solved in this solution (Notes/05_Object_model/02_Classes_encapsulation.md)
  4. Ensure each solution file demonstrates the concepts from that exercise number's associated course material (Solutions/5_10/report.py)

Add a new code example or concept explanation

  1. Locate the Notes section covering the relevant topic (e.g., Notes/02_Working_with_data for data structure examples) (Notes/02_Working_with_data/06_List_comprehension.md)
  2. Edit the markdown file to add a new subsection with example code blocks, explanations, and use cases (Notes/02_Working_with_data/06_List_comprehension.md)
  3. Create a corresponding example in the nearest Solutions/ folder demonstrating practical application of the concept (Solutions/2_16/report.py)
  4. Link the example back to the course material through inline references or footnotes (Notes/02_Working_with_data/06_List_comprehension.md)

🔧Why these technologies

  • Markdown (Notes/) — Provides version-control friendly, readable documentation that scales across 50+ sections with minimal overhead
  • Pure Python (Solutions/) — Demonstrates that the course teaches core Python without external dependencies; solutions are immediately runnable
  • Git + GitHub — Enables distributed access, community contributions under Creative Commons, and hosting without signup barriers

⚖️Trade-offs already made

  • Course material stored as static Markdown rather than interactive platform

    • Why: Simplicity, portability, and no vendor lock-in align with the 'no-nonsense' philosophy and Creative Commons licensing
    • Consequence: Learners must manually run exercises; no automated grading, but encourages self-directed learning and critical thinking
  • Solutions progress incrementally with overlapping files (stock.py, report.py, fileparse.py reused across exercise versions)

    • Why: Mirrors real-world refactoring; learners see how code evolves as they learn new patterns (functions → modules → classes → generators)
    • Consequence: Requires discipline to track which solution version demonstrates which concepts; some file duplication across solution folders
  • No automated test suite included; testing taught as a concept but not enforced

    • Why: Avoids imposing a specific testing framework; keeps barrier to entry low for beginners
    • Consequence: Learners must write and validate their own tests; course material covers testing patterns but does not grade them

🚫Non-goals (don't propose these)

  • Does not provide interactive IDE, REPL, or browser-based execution environment
  • Does not include automated grading or progress tracking
  • Does not cover web frameworks, data science libraries, or domain-specific packages (explicitly mentioned as separate course: 'Advanced Programming with Python')
  • Does not enforce a specific development environment; assumes learner will set up Python locally per Notes/00_Setup.md
  • Does not provide video lectures; course is text and code based, designed for self-paced reading

🪤Traps & gotchas

No hidden traps in the typical sense. This is static educational material, not a software library. The only implicit requirement: learners must have a text editor and Python 3.6+ installed locally (stated in Notes/00_Setup.md). No services, databases, or environment variables needed. Code examples are standalone and executable. If using an older Python version (<3.6), some syntax (e.g., f-strings in later modules) may fail.

🏗️Architecture

💡Concepts to learn

  • Iteration Protocol — Notes/06_Generators/01_Iteration_protocol.md teaches how for loops call __iter__() and __next__()—essential for understanding why generators and custom iterables work, and for writing memory-efficient data pipelines.
  • Generator Functions — Notes/06_Generators/ extensively covers yield and lazy evaluation; critical for processing large datasets and avoiding memory overhead in production scripts.
  • Shallow vs. Deep Copy — Visualized in Notes/02_Working_with_data/shallow.png and references.png; understanding object reference semantics is essential to avoid subtle bugs when mutating containers and nested data structures.
  • List Comprehension — Notes/02_Working_with_data/06_List_comprehension.md teaches concise, Pythonic data transformation; this pattern is ubiquitous in production code and essential for readability.
  • Function Decorators — Notes/07_Advanced_Topics/04_Function_decorators.md and 05_Decorated_methods.md cover how decorators wrap functions; critical for understanding logging, testing fixtures, and metaprogramming in Python frameworks.
  • Exception Handling & Custom Exceptions — Notes/03_Program_organization/03_Error_checking.md and Notes/04_Classes_objects/04_Defining_exceptions.md teach defensive scripting; essential for writing robust, maintainable code in production environments.
  • Module & Package Organization — Notes/03_Program_organization/04_Modules.md and 05_Main_module.md teach how to structure reusable code; essential for scaling from one-off scripts to team-maintained libraries.
  • dabeaz-course/python-mastery — David Beazley's advanced follow-up course (Advanced Programming with Python); directly paired with practical-python for deep dives into metaprogramming, decorators, and systems-level Python.
  • pallets/flask — Web framework often taught after practical-python; learners use Flask to apply script/module/OOP lessons to HTTP services.
  • numpy/numpy — NumPy is the standard data structure library for scientists/engineers post-practical-python; practical-python's data manipulation foundation directly feeds into NumPy usage.
  • pytest-dev/pytest — De facto Python testing framework; practical-python's Notes/08_Testing_debugging module can reference pytest patterns, and learners graduate to pytest for real projects.
  • python/cpython — CPython source; practical-python teaches Python semantics and object model (Notes/05_Object_model) that require understanding CPython internals for production optimization.

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Create a comprehensive test suite for Solutions directory with pytest

The Solutions/ directory contains working code examples (mortgage.py, pcost.py, bounce.py, report.py) but lacks automated tests. Adding pytest-based tests would: (1) validate that solutions actually work as intended, (2) help students verify their own implementations against expected outputs, (3) catch regressions if solutions are updated. This is particularly valuable for a teaching repo where correctness is critical.

  • [ ] Create Tests/test_solutions.py with pytest fixtures for input data files
  • [ ] Add unit tests for Solutions/1_5/bounce.py (physics calculation verification)
  • [ ] Add unit tests for Solutions/1_10/mortgage.py and Solutions/1_27/pcost.py (CSV parsing and financial calculations)
  • [ ] Add unit tests for Solutions/2_11/report.py (data processing and formatting)
  • [ ] Document how to run tests in a new Testing.md guide or update Notes/08_Testing_debugging/01_Testing.md with this repo's own test examples

Add data files (CSV/text) referenced in course exercises to the repo

The Notes sections reference working with real data files (e.g., portfolio data in pcost.py, mortgage scenarios in mortgage.py) but these input files are not visible in the repo structure. Students cannot run the solutions or exercises without them. Adding sample data files would: (1) make examples immediately runnable, (2) provide students with realistic test data, (3) enable the proposed test suite to function properly.

  • [ ] Create Data/ directory at repo root
  • [ ] Add sample portfolio CSV (stocks.csv or similar) with columns: symbol, shares, price
  • [ ] Add sample mortgage input file (mortgages.csv) with: principal, rate, months
  • [ ] Add sample bounce/physics data file if referenced in Notes/01_Introduction/
  • [ ] Document data schema in Data/README.md and update Solutions README to reference correct file paths
  • [ ] Update solution code if necessary to use relative paths to Data/ directory

Create an Exercises/ directory with stub files and expected output for each chapter

The Notes/ directory contains comprehensive lessons (01_Introduction through 09_Packages) but students need a structured way to practice. Creating an Exercises/ directory parallel to Solutions/ would: (1) provide clear starting points for learners, (2) show expected outputs so students can self-verify, (3) make the repo more interactive and suitable for self-paced learning. This mirrors how many coding courses structure their materials.

  • [ ] Create Exercises/ directory with subdirectories: 1_10/, 1_27/, 1_33/, 2_11/, etc. (matching Solutions/)
  • [ ] Add stub files (e.g., Exercises/1_5/bounce.py with docstring and pass) for each exercise
  • [ ] Create Exercises/1_5/expected_output.txt showing sample runs of bounce.py
  • [ ] Create Exercises/2_11/expected_output.txt for report.py with sample formatted output
  • [ ] Add Exercises/README.md explaining how to use these stubs and how they relate to Notes/
  • [ ] Update Notes/Contents.md or create a new Notes/99_Exercises.md linking exercises to specific lesson sections

🌿Good first issues

  • Add a 'Quick Reference' cheat sheet document (Notes/Quick_Reference.md) summarizing syntax and common patterns from all 8 modules—useful for learners returning after time away.
  • Create a Notes/09_Common_Pitfalls.md lesson documenting frequent mistakes students make (e.g., mutable default arguments, shallow vs. deep copy confusion visible in references.png/shallow.png)—directly useful for accelerating learner debugging.
  • Expand Notes/08_Testing_debugging/01_Testing.md with concrete unittest and pytest examples matching the stock portfolio data structure taught in Notes/02_Working_with_data/—currently vague on practical assertions.

Top contributors

Click to expand
  • @dabeaz — 69 commits
  • @bid0uille — 8 commits
  • [@sina hosseinizad](https://github.com/sina hosseinizad) — 7 commits
  • @arf — 2 commits
  • @dlitvakb — 2 commits

📝Recent commits

Click to expand
  • 93dca85 — Changed discussion link (dabeaz)
  • 7c82e8a — Merge pull request #167 from kavun/output-types (dabeaz)
  • d426db7 — Fixed Issue #192 (dabeaz)
  • 151729e — Fixed tab issue. Issue #187 (dabeaz)
  • a761bd2 — Fixed indentation. Issue #161 (dabeaz)
  • 2d36223 — Incorporated issue #157 (dabeaz)
  • c267c45 — Output correct types in example (kavun)
  • 3c00ff8 — Added course link (dabeaz)
  • d454b8e — minor edits (dabeaz)
  • 897e642 — Added note about API being broken (dabeaz)

🔒Security observations

This repository is a Python educational course with minimal security concerns. No production-grade vulnerabilities detected. The codebase consists of tutorial materials, markdown documentation, and sample code intended for learning purposes. No sensitive credentials, hardcoded secrets, external dependencies, or infrastructure configurations were identified. The repository follows best practices for educational content distribution.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · dabeaz-course/practical-python — RepoPilot