Build Nice User Interfaces In The Terminal
Project description
Tools for nice user interfaces in the terminal.
Documentation
Demo
Watch the asciinema recording.
Usage
$ pip install python-cli-ui
Example:
import ui
# coloring:
ui.info("This is", ui.red, "red",
ui.reset, "and this is", ui.bold, "bold")
# enumerating:
list_of_things = ["foo", "bar", "baz"]
for i, thing in enumerate(list_of_things):
ui.info_count(i, len(list_of_things), thing)
# progress indication:
ui.info_progress("Done", 5, 20)
ui.info_progress("Done", 10, 20)
ui.info_progress("Done", 20, 20)
# reading user input:
with_sugar = ui.ask_yes_no("With sugar?", default=False)
fruits = ["apple", "orange", "banana"]
selected_fruit = ui.ask_choice("Choose a fruit", fruits)
# ... and more!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-cli-ui-0.7.2.tar.gz
(10.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python-cli-ui-0.7.2.tar.gz.
File metadata
- Download URL: python-cli-ui-0.7.2.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.11.5 CPython/3.6.6 Linux/4.17.0-3-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feccc56153c652e46aa7e27841a24985490e824ed253627efd3f96c3fd3b408e
|
|
| MD5 |
520ef4d2719fdcb3fbe74a5c96566406
|
|
| BLAKE2b-256 |
755519d40a8c37027e78d8bef8ef6ed658463fa47e5f2ce3b2a051d0551a8176
|
File details
Details for the file python_cli_ui-0.7.2-py3-none-any.whl.
File metadata
- Download URL: python_cli_ui-0.7.2-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.11.5 CPython/3.6.6 Linux/4.17.0-3-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8177fcd959ce899208ff548519c37e3afd7574f2f273675682e1c7f67ad69e01
|
|
| MD5 |
83301757ece3e4ec55e3703d7ff40852
|
|
| BLAKE2b-256 |
42817590106895c19509af927a8e6554adffd49567c26f115f8c7dcc6fd1ea33
|