Click: A Pleasure To Write, A Pleasure To Use
summary
Demonstrates building a working "ad notifier" CLI that scrapes Craigslist with BeautifulSoup, detects new listings via a simple cache (file or Redis), and sends notification emails, using click for decorator-based commands, options/flags, subcommands and environment-variable defaults. Shows how to share global settings through a context object, get automatic help and parameter validation, write unit tests with click’s test runner, and enable bash autocompletion for a pleasant, composable CLI that runs as a one-off or periodic job.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:20Terminology
- 4:38Commands
- 10:12Building a Command Line Client
- 12:41Command Line Client
- 15:36Cache Invalidation
- 16:29Flags
- 17:11Grouping
- 20:49Documentation
- 21:51Conclusion
- 23:08Questions
related talks
29mBuilding Nice Command Line Interfaces — A Look Beyond the stdlib
25mThe Hitchhiker's Guide to CLIs in Python
30mCLI Tools for All the Things
36mCLI applications & TDD: Never write scripts again
28mThe Modern Command-Line Tool Stack: Pipenv, Click, and Friends
27mCommand line programs for busy developers
02h 28mBuilding human-first and machine-friendly CLI applications
26mBuilding Great CLI Experiences in Node
