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-0.0.3.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-0.0.3-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cli-rack-0.0.3.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.0 CPython/3.8.11

File hashes

Hashes for cli-rack-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5faddcae455fcf063679935cf38cab366398415856faf4f5b7c214d501a9f8d5
MD5 128248e3af0c236b8667a547a6219d7e
BLAKE2b-256 25c545ed2940b533406be4618c561f2831c5916ec7de48d422a1a49bc0e21da8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cli_rack-0.0.3-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.0 CPython/3.8.11

File hashes

Hashes for cli_rack-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 995065a7884033e9bc339c041d1fa0a90e1caf472632e52c4aad1548d1bbc6ad
MD5 13f1166dc8aab1b5065846f4b7610c2f
BLAKE2b-256 7c162b00057d6bcb9302db14d2b62139e15a56aad1012c2e778d65c4c5fb8fba

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