CLI Rack
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)
| File | Size | Uploaded | |
|---|---|---|---|
| cli_rack-1.2.0.tar.gz | 32.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|