click-prompt provides more beautiful interactive options for the Python click library
Project description
click-prompt
click-prompt provides more beautiful interactive options for the Python click library. The library is inspired by a post on stackoverflow.com
Usage
import click
from click_prompt import ChoiceOption
@click.command()
@click.option('--fruit',
type=click.Choice(['Apples', 'Bananas', 'Grapefruits', 'Mangoes']),
cls=ChoiceOption)
def select_fruit(fruit: str):
print(choice)
Available Parameters
for every click.Option there is also a click.Argument implementation
- ChoiceOption: Select a single item out of a list
- MultipleOption: Select multiple items out of a list
- ConfirmOption: Yes/No confirmation
- FilePathOption: Select a file path with auto completion
- AutoCompleteOption: Auto completion given a list
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
click-prompt-0.3.1.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file click-prompt-0.3.1.tar.gz
.
File metadata
- Download URL: click-prompt-0.3.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.6.9 Linux/5.4.0-125-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c98b684be22b07c9ec661ffacae3409c0d52632e6e3d97a2be46298619c7ea65 |
|
MD5 | b02d9e0ae7bd3d50e0ede3ee5c5736b9 |
|
BLAKE2b-256 | 22968b023f7dd074c273ae3a1131a1f36ef0e6d7cf554b1339528791de5d2ed1 |
Provenance
File details
Details for the file click_prompt-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: click_prompt-0.3.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.6.9 Linux/5.4.0-125-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db60861a3377c2e8983e1308b7c7f0d5a9d09e9ee722639d22cdcb5006ce5e15 |
|
MD5 | d686800154413ae12cdeb34f8c94d304 |
|
BLAKE2b-256 | 83b0a38f445cfa315209d996af1e84c2a455b1dbb899500d3c5a727f076b8d7a |