Created by: kdeldycke
What is this Python project?
click-extra is a collection of helpers and utilities for Click, the Python CLI framework.
It is a drop-in replacement with good defaults that saves lots of boilerplate code and frustration. It also comes with workarounds and patches that have not reached upstream yet (or are unlikely to).
What's the difference between this Python project and similar ones?
This project adds the following features on top of click:
- Configuration file loader for:
TOMLYAML-
JSON, with inline and block comments (Python-style#and Javascript-style//) -
INI, with extended interpolation, multi-level sections and non-native types (list,set, …) XML
- Download configuration from remote URLs
- Optional strict validation of configuration
- Search of configuration file from default user folder and glob patterns
- Respect of
CLI>Configuration>Environment>Defaultsprecedence -
--show-paramsoption to debug parameters defaults, values, environment variables and provenance - Colorization of help screens
-
-h/--helpoption names (see rant on other inconsistencies) -
--color/--no-coloroption flag - Recognize the
NO_COLORenvironment variable convention fromno-color.org - Colored
--versionoption - Colored
--verbosityoption and logs -
--time/--no-timeflag to measure duration of command execution - Platform recognition utilities (macOS, Linux and Windows)
- New conditional markers for
pytest:-
@skip_linux,@skip_macosand@skip_windows -
@unless_linux,@unless_macosand@unless_windows -
@destructiveand@non_destructive
-
- ANSI-capable Pygments lexers for shell session and console output
- Pygments styles and filters for ANSI rendering
- Fixes 30+ bugs from other Click-related projects
- Rely on
cloupto add:- option groups
- constraints
- subcommands sections
- aliases
- command suggestion (
Did you mean <subcommand>?)
--
Anyone who agrees with this pull request could submit an Approve review to it.