Skip to main content

🌈 Extra colorization and configuration loading for Click.

Project description

Click Extra

Last release Python versions Unittests status Documentation status Coverage status

What is Click Extra?

A collection of helpers and utilities for Click, the Python CLI framework.

It is a drop-in replacement with good defaults that saves you some boilerplate code. It also comes with workarounds and patches that have not reached upstream yet (or are unlikely to).

Example

It can transform this vanilla click CLI:

click CLI help screen

Into this:

click-extra CLI help screen

To undestrand how we ended up with the result above, go read the tutorial.

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, sets, …)
    • XML
  • Download configuration from remote URLs
  • Optional strict validation of configuration
  • Automatic search of configuration file from default user folder
  • Respect of CLI > Configuration > Environment > Defaults precedence
  • Colorization of help screens
  • -h/--help option names (see rant on other inconsistencies)
  • --color/--no-color option flag
  • Recognize the NO_COLOR environment variable convention from 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 for shell session and console output
  • Pygments styles and filters for ANSI rendering
  • Fixes 30+ bugs from other Click-related projects
  • Rely on 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:

Development

Development guidelines are the same as parent project mpm, from which click-extra originated.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

click-extra-3.0.1.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

click_extra-3.0.1-py3-none-any.whl (56.2 kB view details)

Uploaded Python 3

File details

Details for the file click-extra-3.0.1.tar.gz.

File metadata

  • Download URL: click-extra-3.0.1.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for click-extra-3.0.1.tar.gz
Algorithm Hash digest
SHA256 e9602fc6e00173065adae320173c314d0ebf716f3139f234bd206a8eed811990
MD5 e4e22bd8cda1c3975e5232c1daae55a9
BLAKE2b-256 55694696bf7f3e7fdf545fb7b6077d1ce889c3a564e6e78efc9bd272be1df73c

See more details on using hashes here.

File details

Details for the file click_extra-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: click_extra-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 56.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for click_extra-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c86fe6faf2c257ef5acecbeee5de93d68ef66cd4aeb123454396ff4fff05cd34
MD5 9fe50e77ad12db94f178bcd0e5e80c07
BLAKE2b-256 86664ada5bea66a5fc84d67513adde31801905002f85e66d7510af7ca30e7a86

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page