Python Projects and Tooling
Set up, structure and ship real Python projects.
Writing Python is only half of a developer's job; the other half is everything around the code. You will install packages into virtual environments, pin versions and read lock files, lay a project out with a src folder and tests, describe it in pyproject.toml with extras and console-script entry points, build command-line interfaces with argparse, replace print with logging, read settings from files and environment variables in a clear order while keeping secrets out of git, and run linters, formatters and CI checks. The course ends with a todo CLI and a CSV sales report CLI built as small, testable functions, and the project skeleton that ships them.
What you will learn
- Virtual environments
- pip and uv
- pyproject.toml
- Entry points
- Project layout
- argparse
- logging
- Configuration
- Linting and formatting
Lessons
- 1
Environments and Packages
Install packages into a virtual environment, pin them, and describe a project in pyproject.toml.
16 exercises
- 2
Project Layout
Arrange a project with a src folder, packages, tests, a README and a .gitignore, and run it with python -m.
13 exercises
- 3
pyproject.toml and Entry Points
Declare runtime dependencies and optional extras, turn a function into a terminal command, install a project in editable mode, and configure tools in [tool] tables.
12 exercises
- 4
Command-Line Interfaces with argparse
Turn scripts into real commands with positional and optional arguments, types, choices, flags and subcommands.
13 exercises
- 5
Logging and Configuration
Replace print with leveled logging, read settings from files and environment variables in a clear order, and keep secrets out of your code, your repository and your logs.
16 exercises
- 6
Linting and Formatting
Tell a linter from a formatter, read and select rule codes, suppress one finding responsibly, sort imports into groups, and run every check before commit and in CI.
13 exercises
- 7
Putting It Together
Build a todo CLI and a CSV sales report CLI from small, tested functions with argparse, logging and config, then lay out the project that ships them.
10 exercises
How you practice
You practice in the browser and every exercise gives you feedback right away. This course uses these formats:
- Code exercise: 36
- Fix the bug: 12
- Type the answer: 11
- Predict the output: 11
- Multiple choice: 8
- Fill in the blank: 6
- Match the pairs: 4
- Select all that apply: 3
- Spot the bug: 1
- Reorder lines: 1
Aligned to
- Software Development Fundamentals
- SDF-PracticesSoftware Development Practices
- Software Engineering
- SE-ToolsTools and Environments
Proto Node Labs is not affiliated with or endorsed by ACM / IEEE-CS / AAAI. Exam names are trademarks of their owners.