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.0.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file click-prompt-0.3.0.tar.gz
.
File metadata
- Download URL: click-prompt-0.3.0.tar.gz
- Upload date:
- Size: 3.6 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 | b8356e60201bfbacb64c0dade80f5ad75f6eba7f25fafb7867eeb5f1eaf74ad3 |
|
MD5 | 087ea7b5f3b2cb492fe9391d24420958 |
|
BLAKE2b-256 | 0d27cbe174e95bc906aed2dc65842033c3036ce9ba9612fd847687aa2af0dc6e |
Provenance
File details
Details for the file click_prompt-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: click_prompt-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.7 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 | 02e90173b98ec0b73e0ef73b3c0812f3f9fa9bbf01c3d762f1e2a5777735fbbe |
|
MD5 | 9504d669fa70c7561142ed3fcd8e6469 |
|
BLAKE2b-256 | 0c4294a70de271ef344366fe08fa90df72635e3cd44879a1bf9f07f5092d762b |