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 hashes)
Built Distribution
Close
Hashes for nice_prompts-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f265f7f130e4713c425f4e67004fd883c197680ff4c18d5f4c691beb7ddeaf0 |
|
MD5 | e4fa14e659cb5ce11674b4f3c945e6d3 |
|
BLAKE2b-256 | 16f37504aacb25ddbc288540c87fa451f46cfed30b5e9d35a0f919fe1ec053e3 |