Skip to main content

CLI Rack - Lightweight set of tools for building pretty-looking CLI applications in Python

Project description

CLI Rack

CLI Rack Cover Picture

Lightweight set of tools for creating pretty-looking CLI applications in Python. This library tends to simplify and unify the approach to structuring CLI related code. At the moment it covers:

  • Managing terminal output - verbosity levels, colored output, logger configuration
  • Parsing arguments
  • Modular application design - each module could extend argument parser with own command
  • Modules discovery - scanning packages to find cli extension modules
  • Module availability support - module might declare a method to verify if environment is suitable (e.g. all dependencies are present). If not, module will be automatically excluded from CLI interface
  • Sync and Async execution manager

More details and documentation is here: https://github.com/corvis/cli-rack

Quick examples

Using unified CLI output:

from cli_rack import CLI

CLI.setup()

CLI.print_info("This is just a message to user")
CLI.print_warn("This is a warning")
CLI.print_error("This is an error message")
CLI.print_error(ValueError("This is an exception"))
CLI.print_data("This text comes to STDOUT, not STDERR")

Credits

  • Dmitry Berezovsky, author

Disclaimer

This module is licensed under MIT. This means you are free to use it in commercial projects.

The MIT license clearly explains that there is no warranty for this free software. Please see the included LICENSE file for details.

Project details


Download files

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

Source Distribution

cli-rack-1.0.6.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

cli_rack-1.0.6-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file cli-rack-1.0.6.tar.gz.

File metadata

  • Download URL: cli-rack-1.0.6.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for cli-rack-1.0.6.tar.gz
Algorithm Hash digest
SHA256 7c1398c26f09577e8ae8ab6bb26ec3e6f44f5aa092a47644d1ea905cd7603fbe
MD5 921384e6511dc658b0661f758e6d52ee
BLAKE2b-256 91a59ff7abbd8c3c97b74f68f052c5af96b08595d26129adc7f6a889b90c3391

See more details on using hashes here.

File details

Details for the file cli_rack-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: cli_rack-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for cli_rack-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 cc0dbb78446ef0e59b8fe67bae8cb7c5ce0eb97ba8d57c688d13d2b8504340ac
MD5 c4cb0656ba5319be42981d3db4431b99
BLAKE2b-256 a208d9b70cc07d26847267a4b90e86d293a60fd6079ad74068d463bd90cd1cc0

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