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.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cli_rack-1.0.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cli-rack-1.0.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.7.1 requests/2.26.0 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for cli-rack-1.0.0.tar.gz
Algorithm Hash digest
SHA256 57960454bc0d2d90d85f181c20a3c2718ecc43c71200443c3071df4fedf95e1a
MD5 2f078a4956459e2d775e28706438d789
BLAKE2b-256 b16037f5f413563d2d026c5b1b0ae9b312c7472359af036390d08bd4a4dfd562

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cli_rack-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.7.1 requests/2.26.0 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for cli_rack-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9446aeb42944923362d7e3f1d878cb8d669ec08c913597025c545329610b3ecd
MD5 23f7a3fca7e4a2e9557fae976e909067
BLAKE2b-256 24e660d2abf7bd5bfb11f79bbe09e4d66d2df5a03f6f2f67a5b42693e5fd3f14

See more details on using hashes here.

Supported by

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