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:
TOML
YAML
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 > Defaults precedence
--show-params option to debug parameters defaults, values, environment variables and provenance
Anyone who agrees with this pull request could submit an Approve review to it.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/vinta/awesome-python/pull/2241
**Author:** [@kdeldycke](https://github.com/kdeldycke)
**Created:** 11/28/2022
**Status:** ❌ Closed
**Base:** `master` ← **Head:** `add-click-extra`
---
### 📝 Commits (1)
- [`84d6edc`](https://github.com/vinta/awesome-python/commit/84d6edcee7abc57e9b28ce5a165c3a4c5163ed5c) Add click-extra.
### 📊 Changes
**1 file changed** (+1 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `README.md` (+1 -0)
</details>
### 📄 Description
## What is this Python project?
[`click-extra`](https://github.com/kdeldycke/click-extra) is a collection of helpers and utilities for [Click](https://click.palletsprojects.com/), 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](https://kdeldycke.github.io/click-extra/issues.html) 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:
- `TOML`
- `YAML`
- `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` > `Defaults` precedence
- `--show-params` option to debug parameters defaults, values, environment variables and provenance
- Colorization of help screens
- `-h`/`--help` option names (see [rant on other inconsistencies](https://blog.craftyguy.net/cmdline-help/))
- `--color`/`--no-color` option flag
- Recognize the `NO_COLOR` environment variable convention from [`no-color.org`](https://no-color.org)
- Colored `--version` option
- Colored `--verbosity` option and logs
- `--time`/`--no-time` flag to measure duration of command execution
- Platform recognition utilities (macOS, Linux and Windows)
- New conditional markers for `pytest`:
- `@skip_linux`, `@skip_macos` and `@skip_windows`
- `@unless_linux`, `@unless_macos` and `@unless_windows`
- `@destructive` and `@non_destructive`
- [ANSI-capable Pygments lexers](https://kdeldycke.github.io/click-extra/pygments.html#lexers) for shell session and console output
- Pygments styles and filters for ANSI rendering
- [Fixes 30+ bugs](https://kdeldycke.github.io/click-extra/issues.html) from other Click-related projects
- Rely on [`cloup`](https://github.com/janluke/cloup) to 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.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/vinta/awesome-python/pull/2241
Author: @kdeldycke
Created: 11/28/2022
Status: ❌ Closed
Base:
master← Head:add-click-extra📝 Commits (1)
84d6edcAdd click-extra.📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
README.md(+1 -0)📄 Description
What is this Python project?
click-extrais 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:TOMLYAMLJSON, with inline and block comments (Python-style#and Javascript-style//)INI, with extended interpolation, multi-level sections and non-native types (list,set, …)XMLCLI>Configuration>Environment>Defaultsprecedence--show-paramsoption to debug parameters defaults, values, environment variables and provenance-h/--helpoption names (see rant on other inconsistencies)--color/--no-coloroption flagNO_COLORenvironment variable convention fromno-color.org--versionoption--verbosityoption and logs--time/--no-timeflag to measure duration of command executionpytest:@skip_linux,@skip_macosand@skip_windows@unless_linux,@unless_macosand@unless_windows@destructiveand@non_destructivecloupto add:Did you mean <subcommand>?)--
Anyone who agrees with this pull request could submit an Approve review to it.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.