Double Click: continue building better CLIs
summary
Shows how to use Click to build a real weather CLI that actually stores an API key and fetches forecasts using two subcommands config and forecast, with a config file written to ~/weather.cfg and tests that run in an isolated temp filesystem. Demonstrates Click’s Path type for config validation, a custom Location parameter type that accepts names or numeric city IDs by overriding convert, and end to end tests with CliRunner invoking commands and prompts. Packaging uses setup entry_points to install a weather console script that works.
AI-written summary · about
