<p align="center">
<a href="https://github.com/kdeldycke/click-extra/">
<img src="https://raw.githubusercontent.com/kdeldycke/click-extra/main/docs/images/logo-banner.svg" alt="Click Extra">
</a>
</p>
[](https://pypi.python.org/pypi/click-extra)
[](https://pypi.python.org/pypi/click-extra)
[](https://github.com/kdeldycke/click-extra/actions/workflows/tests.yaml?query=branch%3Amain)
[](https://github.com/kdeldycke/click-extra/actions/workflows/docs.yaml?query=branch%3Amain)
[](https://codecov.io/gh/kdeldycke/click-extra/branch/main)
[](https://zenodo.org/badge/latestdoi/418402236)
## What is Click Extra?
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).
## Example
It can transform this vanilla `click` CLI:

Into this:

To undestrand how we ended up with the result above, go [read the tutorial](https://kdeldycke.github.io/click-extra/tutorial.html).
## Features
- 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`
- [`.. click:example::` and `.. click:run::` Sphinx extensions](https://kdeldycke.github.io/click-extra/sphinx.html) to document CLI source code and their execution
- [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>?`)
## Used in
Check these projects to get real-life examples of `click-extra` usage:
-  [Meta Package Manager](https://github.com/kdeldycke/meta-package-manager#readme)
\- A unifying CLI for multiple package managers.
-  [Mail Deduplicate](https://github.com/kdeldycke/mail-deduplicate#readme) - A
CLI to deduplicate similar emails.
-  [fireproxng](https://github.com/Sprocket-Security/fireproxng#readme) - A rewrite of the fireprox tool.
-  [badger-proxy](https://github.com/hugolundin/badger#readme) - An mDNS-based reverse
proxy for naming services on a local network.
-  [Molecular Dynamics Trajectory Analysis](https://github.com/tclick/mdstab#readme)
Feel free to send a PR to add your project in this list if you are relying on Click Extra in any way.
## Development
[Development guidelines](https://kdeldycke.github.io/meta-package-manager/development.html)
are the same as
[parent project `mpm`](https://github.com/kdeldycke/meta-package-manager), from
which `click-extra` originated.
Raw data
{
"_id": null,
"home_page": "https://github.com/kdeldycke/click-extra",
"name": "click-extra",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "ansi-colors,cli,cli-helper,click-help-color,click-log,cloup,colorization,configuration,console,ini,json,logging,multiplatform,pygments,pytest,python,python-tabulate,sphinx,terminal,toml,xml,yaml",
"author": "Kevin Deldycke",
"author_email": "kevin@deldycke.com",
"download_url": "https://files.pythonhosted.org/packages/0b/cf/1abe7a27233190f03099a9af1793d06201994225285a4deb14a42cd0e956/click_extra-3.8.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <a href=\"https://github.com/kdeldycke/click-extra/\">\n <img src=\"https://raw.githubusercontent.com/kdeldycke/click-extra/main/docs/images/logo-banner.svg\" alt=\"Click Extra\">\n </a>\n</p>\n\n[](https://pypi.python.org/pypi/click-extra)\n[](https://pypi.python.org/pypi/click-extra)\n[](https://github.com/kdeldycke/click-extra/actions/workflows/tests.yaml?query=branch%3Amain)\n[](https://github.com/kdeldycke/click-extra/actions/workflows/docs.yaml?query=branch%3Amain)\n[](https://codecov.io/gh/kdeldycke/click-extra/branch/main)\n[](https://zenodo.org/badge/latestdoi/418402236)\n\n## What is Click Extra?\n\nA collection of helpers and utilities for\n[Click](https://click.palletsprojects.com), the Python CLI framework.\n\nIt is a drop-in replacement with good defaults that saves lots of boilerplate code and frustration.\nIt also comes with\n[workarounds and patches](https://kdeldycke.github.io/click-extra/issues.html) that have not\nreached upstream yet (or are unlikely to).\n\n## Example\n\nIt can transform this vanilla `click` CLI:\n\n\n\nInto this:\n\n\n\nTo undestrand how we ended up with the result above, go [read the tutorial](https://kdeldycke.github.io/click-extra/tutorial.html).\n\n## Features\n\n- Configuration file loader for:\n - `TOML`\n - `YAML`\n - `JSON`, with inline and block comments (Python-style `#` and Javascript-style `//`)\n - `INI`, with extended interpolation, multi-level sections and non-native types (`list`, `set`, \u2026)\n - `XML`\n- Download configuration from remote URLs\n- Optional strict validation of configuration\n- Search of configuration file from default user folder and glob patterns\n- Respect of `CLI` > `Configuration` > `Environment` > `Defaults` precedence\n- `--show-params` option to debug parameters defaults, values, environment variables and provenance\n- Colorization of help screens\n- `-h`/`--help` option names (see [rant on other inconsistencies](https://blog.craftyguy.net/cmdline-help/))\n- `--color`/`--no-color` option flag\n- Recognize the `NO_COLOR` environment variable convention from [`no-color.org`](https://no-color.org)\n- Colored `--version` option\n- Colored `--verbosity` option and logs\n- `--time`/`--no-time` flag to measure duration of command execution\n- Platform recognition utilities (macOS, Linux and Windows)\n- New conditional markers for `pytest`:\n - `@skip_linux`, `@skip_macos` and `@skip_windows`\n - `@unless_linux`, `@unless_macos` and `@unless_windows`\n - `@destructive` and `@non_destructive`\n- [`.. click:example::` and `.. click:run::` Sphinx extensions](https://kdeldycke.github.io/click-extra/sphinx.html) to document CLI source code and their execution\n- [ANSI-capable Pygments lexers](https://kdeldycke.github.io/click-extra/pygments.html#lexers) for shell session and console output\n- Pygments styles and filters for ANSI rendering\n- [Fixes 30+ bugs](https://kdeldycke.github.io/click-extra/issues.html) from other Click-related projects\n- Rely on [`cloup`](https://github.com/janluke/cloup) to add:\n - option groups\n - constraints\n - subcommands sections\n - aliases\n - command suggestion (`Did you mean <subcommand>?`)\n\n## Used in\n\nCheck these projects to get real-life examples of `click-extra` usage:\n\n-  [Meta Package Manager](https://github.com/kdeldycke/meta-package-manager#readme)\n \\- A unifying CLI for multiple package managers.\n-  [Mail Deduplicate](https://github.com/kdeldycke/mail-deduplicate#readme) - A\n CLI to deduplicate similar emails.\n-  [fireproxng](https://github.com/Sprocket-Security/fireproxng#readme) - A rewrite of the fireprox tool.\n-  [badger-proxy](https://github.com/hugolundin/badger#readme) - An mDNS-based reverse\n proxy for naming services on a local network.\n-  [Molecular Dynamics Trajectory Analysis](https://github.com/tclick/mdstab#readme)\n\nFeel free to send a PR to add your project in this list if you are relying on Click Extra in any way.\n\n## Development\n\n[Development guidelines](https://kdeldycke.github.io/meta-package-manager/development.html)\nare the same as\n[parent project `mpm`](https://github.com/kdeldycke/meta-package-manager), from\nwhich `click-extra` originated.\n\n",
"bugtrack_url": null,
"license": "GPL-2.0-or-later",
"summary": "\ud83c\udf08 Extra colorization and configuration loading for Click.",
"version": "3.8.0",
"split_keywords": [
"ansi-colors",
"cli",
"cli-helper",
"click-help-color",
"click-log",
"cloup",
"colorization",
"configuration",
"console",
"ini",
"json",
"logging",
"multiplatform",
"pygments",
"pytest",
"python",
"python-tabulate",
"sphinx",
"terminal",
"toml",
"xml",
"yaml"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2b9ccb61475fb969419424ca36f06be7db9cb72806cef2fd333cfc681248f292",
"md5": "89d1c671390fd9c7dd75757458e8be3f",
"sha256": "d809ef3724fbca682286c1f8e729158c1f1945d347a5b0b1dac1f4f96d67eb53"
},
"downloads": -1,
"filename": "click_extra-3.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "89d1c671390fd9c7dd75757458e8be3f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 81205,
"upload_time": "2023-01-25T06:30:07",
"upload_time_iso_8601": "2023-01-25T06:30:07.237021Z",
"url": "https://files.pythonhosted.org/packages/2b/9c/cb61475fb969419424ca36f06be7db9cb72806cef2fd333cfc681248f292/click_extra-3.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0bcf1abe7a27233190f03099a9af1793d06201994225285a4deb14a42cd0e956",
"md5": "b53880a23f6d758664b60898e65c5599",
"sha256": "7f67201685034708ed241039db32f2849900ac581c8022f796b0685d0984219c"
},
"downloads": -1,
"filename": "click_extra-3.8.0.tar.gz",
"has_sig": false,
"md5_digest": "b53880a23f6d758664b60898e65c5599",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 61559,
"upload_time": "2023-01-25T06:30:08",
"upload_time_iso_8601": "2023-01-25T06:30:08.660426Z",
"url": "https://files.pythonhosted.org/packages/0b/cf/1abe7a27233190f03099a9af1793d06201994225285a4deb14a42cd0e956/click_extra-3.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-25 06:30:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "kdeldycke",
"github_project": "click-extra",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "click-extra"
}