A tool for building simple CLIs
Project description
CLI Forge
A tool for building simple CLIs
Installation
pip install pick
Input
Basic
from cli-forge import cli_prompt
basic_input = cli_prompt("What is your name?")
Select
from cli-forge import cli_prompt
select_input = cli_prompt("What currency will you be using?", options=["£", "$"], select=True)
Multi-select
from cli-forge import cli_prompt
multi_select_input = cli_prompt("Which languages would you like to include?", options=["English", "Italian", "Spanish"], options_format=["EN", "IT", "ES"], multiselect=True)
Options
prompt
: prompt above the optionsoptions
: (optional) list of optionsselect
: (optional) if True, allows you select an optionmultiselect
: (optional) if True, allows you to select multiple optionsoptions_format
: (optional) allows you to format your output for use in your program
Input
Usage
from cli-forge import cli_progress
cli_progress(10, 1, "Fetching data...")
# function
cli_progress(10, 2, "Fetching data...")
# ...
Options
length
: number of progress unitsprogress
: progress level (out of length)prefix
: text before the progress barsize
: (optional) progress bar size on screenend
: (optional) if True, allows you to end the progress bar before it completes
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
cli_forge-0.0.2.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for cli_forge-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b99784f4c2cc57440286db77d7beede5985598edc68c2464b1c0e851f1a3151 |
|
MD5 | 2cef70f6368e9d6a42b322c1374f8b75 |
|
BLAKE2b-256 | 63e0e99bcd57bcae591c67cf9fc1506b55bb3083fa5655c372edf3a7007828f0 |