Skip to main content

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.

Metadata

Release files for cli-rack 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cli-rack 1.2.0
File Size Uploaded
cli_rack-1.2.0.tar.gz 32.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cli-rack 1.2.0
File Interpreter ABI Platform
cli_rack-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 78.7 kB

Release files / cli_rack-1.2.0.tar.gz

Download URL cli_rack-1.2.0.tar.gz
Size 32.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6d81b31e198ec60dbca9b17ec769849597ede468887ff311ff119bf8c39405eb
BLAKE2b-256 checksum
How to use checksums
2dc6fe8808182a729cfe9cd7df68685d30015fce7ae6486c3aacac7fc40a815d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Release files / cli_rack-1.2.0-py3-none-any.whl

Download URL cli_rack-1.2.0-py3-none-any.whl
Size 46.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c95ced35f89f6221318288a5a125d21be15ef3e975f30d5c279acde0f1748212
BLAKE2b-256 checksum
How to use checksums
7f825bb17abb8eb74183f0f11b55aba4b122952797a829d673028519b1b0aa88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page