Python FoundationsBeginner7 modules~3.5 hours hands-on3 learning modes
Build a Real CLI Tool in Python
Build and install a real command-line task manager - the todo command - with argparse subcommands, JSON persistence, error handling, tests, and a pyproject entry point.
// What you'll be able to do- Prerequisites, scope, and honest expectations
- Scaffold the todo package
- argparse subcommands and dispatch
- Read and write the JSON data file
7 modules, built to run
Every module ships runnable code. Expand any one to see what's inside.
00IntroductionThe todo command you'll build and install30 min
Questions this module answers
- How do you see the real todo command you'll install by the end of the course?
- How do you choose the learning path that fits you?
Start moduleFree preview
01OrientationPrerequisites, scope, and honest expectations30 min
Questions this module answers
- How do you confirm you have Python and a terminal ready?
- What should you know about what a CLI tool is at a conceptual level before building one?
02Project SetupScaffold the todo package30 min
Questions this module answers
- How do you create the todo package directory structure?
- What should you know about what makes a folder an importable Python package?
03Parsing Commandsargparse subcommands and dispatch30 min
Questions this module answers
- How argparse turns raw arguments into a structured command?
- How do you build a parser with add, list, and done subcommands?
04Persisting TasksRead and write the JSON data file30 min
Questions this module answers
- How do you build a storage layer that loads and saves tasks to a JSON file?
- How do you wire real persistence into the add, list, and done handlers?
05Robust and TestedError handling and a pytest suite30 min
Questions this module answers
- How do you handle the unhappy path with a custom error and clean exit codes?
- How do you guard against a corrupt data file?
06See It RunPackage it so pip install gives a real todo command30 min
Questions this module answers
- What should you know about what an entry point is and how it creates a command?
- How do you write pyproject.toml with a console_scripts entry point?
Ready to start Build a Real CLI Tool in Python?
Start with the free Module 0, then unlock the full course on a Pro plan.