Use nice prompts in your terminal e.g. multiple choice
Project description
Nice-prompts.
Generate nice looking prompts for your cli applications.
Install from PyPi:
$ pip3 install nice-prompts
Demo (select 1, select at least 2 with max 2, select any amount):
import nice_prompts
n = nice_prompts.NicePrompt()
print(n.selection({"I like pizza": "Good taste",
"I respectfully disagree with the opinion of liking pizza": "Fair enough, good day",
"I hate pizza": "Bad sport 👎"})) # Select one from the keys, return the value
print(n.multiselection({"I like pizza": "Good taste",
"I respectfully disagree with the opinion of liking pizza": "Fair enough, good day",
"I hate pizza": "Bad sport 👎"}, amount=2, required=2)) # Select multiple from the keys, return the values. You must select 2
print(n.multiselection({"I like pizza": "Good taste",
"I respectfully disagree with the opinion of liking pizza": "Fair enough, good day",
"I hate pizza": "Bad sport 👎"}, required=0)) # Select multiple from the keys, return the values. No max, can be left blank
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
nice-prompts-0.4.2.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file nice-prompts-0.4.2.tar.gz
.
File metadata
- Download URL: nice-prompts-0.4.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fa3fb122522c0a48239ce981a290772499ce5f218f6a6b3c8909ba6fc4ab9cd |
|
MD5 | 38a6f17ae3a3fc4d2893ee2ff77e9c13 |
|
BLAKE2b-256 | 3752b9f7c54dc0b56c6d16b93d0f4bea232d547753d6dbed75e6cc0daf107156 |
File details
Details for the file nice_prompts-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: nice_prompts-0.4.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f265f7f130e4713c425f4e67004fd883c197680ff4c18d5f4c691beb7ddeaf0 |
|
MD5 | e4fa14e659cb5ce11674b4f3c945e6d3 |
|
BLAKE2b-256 | 16f37504aacb25ddbc288540c87fa451f46cfed30b5e9d35a0f919fe1ec053e3 |