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.3.0.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file nice-prompts-0.3.0.tar.gz
.
File metadata
- Download URL: nice-prompts-0.3.0.tar.gz
- Upload date:
- Size: 7.2 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 | b806a0eec526d9fe536d1fef7ea6088f36d01b02b6bb60395e2295b962230212 |
|
MD5 | 83d4ad8695affd416b785defc4b70aca |
|
BLAKE2b-256 | f65bf8d979b6c7fd622e6338bced2079f3c717069c38eef5bd1cb10de24b60ca |
File details
Details for the file nice_prompts-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: nice_prompts-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.6 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 | 56f1f6332586f6a059f6b0630d197fa0ac5c0fb72671d790cbea927af542efb3 |
|
MD5 | 0332cf7a3886bc4eb941695b14a719b6 |
|
BLAKE2b-256 | 6e85b1c794efad12bfe444be7f912824805760a5316289be251038e0fdd85199 |