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.2.0.tar.gz (32.2 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.2.0-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

Details for the file cli_rack-1.2.0.tar.gz.

File metadata

  • Download URL: cli_rack-1.2.0.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for cli_rack-1.2.0.tar.gz
Algorithm Hash digest
SHA256 6d81b31e198ec60dbca9b17ec769849597ede468887ff311ff119bf8c39405eb
MD5 9c31573ce02e25f799597cca6fe5945e
BLAKE2b-256 2dc6fe8808182a729cfe9cd7df68685d30015fce7ae6486c3aacac7fc40a815d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cli_rack-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 46.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for cli_rack-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c95ced35f89f6221318288a5a125d21be15ef3e975f30d5c279acde0f1748212
MD5 b4314ed2f643541d535aad47609f1c75
BLAKE2b-256 7f825bb17abb8eb74183f0f11b55aba4b122952797a829d673028519b1b0aa88

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