Python Console Utilities
This is a package containing utility functions for command-line applications.
Features
Inputting an integer, float or boolean
Selecting from a list of options (by entering an integer or character)
Goals
Simplicity: Straightforward, high-level functions with sensible defaults. Most parameters are optional, so you can hit the ground running.
Flexible: An extensive range of options are provided, making the library useful in a wide range of situations.
Installation
Install as usual:
pip install ruben-console-utilities
You may wish to create a virtual environment beforehand.
Usage
Here a few examples:
>>> import consoleutilities as cu
>>> cu.input_option_int(["Export as PDF", "Export as HTML", "Export as TeX"])
[0]: Export as PDF
[1]: Export as HTML
[2]: Export as TeX
Enter integer [0..2]: >? 0
0
>>> cu.input_int("Pick a number between 1 and 10: ", 1, 10, include_max=True)
Pick a number between 1 and 10: >? 8
8
>>> cu.input_boolean("Specify whether to trust this host")
Specify whether to trust this host [y/N]: >? abc123
False
>>> cu.input_boolean("Specify whether to enable HTTPS", default=True)
Specify whether to enable HTTPS [Y/n]: >?
True
Metadata
Release files for ruben-console-utilities 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| ruben-console-utilities-0.3.0.tar.gz | 8.2 kB | Without provenance | Details for ruben-console-utilities-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ruben_console_utilities-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for ruben_console_utilities-0.3.0-py3-none-any.whl |
Total release size: 16.9 kB
Release files / ruben-console-utilities-0.3.0.tar.gz
| Download URL | ruben-console-utilities-0.3.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2088803b9c462ce3f6fd27044adf9cffb3e2457176e1326b1b5c1ea4ef2623f6
|
|
BLAKE2b-256 checksum How to use checksums |
5e0d477c5ff38dceab311d16193fe9bfb9354c291405ba4cc2a260a679e3fad8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / ruben_console_utilities-0.3.0-py3-none-any.whl
| Download URL | ruben_console_utilities-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42263b50f64a16e7574db62fc94c9f172ab34882e11c7292cd5c523090166081
|
|
BLAKE2b-256 checksum How to use checksums |
2773ef29cd0534e2b55159a4e35edab1bd96cbacb53855cf063064535dd25577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for ruben-console-utilities 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.