Advanced Prompts
Project description
aprompt
Advanced Prompts replace the built-in
input()
with colored and optimized prompts.
Note that using aprompt inside an IDE will
probably not work.
Features
- text
- password
- amount
- select
- multi-select
- path (available in the future)
- custom formatter (not documented yet)
- custom prompts (not documented yet)
- repeat_while (not entirely implemented yet)
- detailed docs
Usage
import itertools
import aprompt as ap
name = ap.prompt(
"Please enter your name.",
ap.prompts.text()
)
age = ap.prompt(
"Please enter your age.",
ap.prompts.amount(
minimum = 0,
maximum = 150,
),
repeat_while = lambda x: x < 18
)
password = ap.prompt(
"Please enter your password.",
ap.prompts.text(hide = True)
)
language = ap.prompt(
"What language do you prefer?",
ap.prompts.select(
"English",
"Chinese",
"French",
"Japanese",
"German"
)
)
can_code_in = ap.prompt(
"In what languages can you code in?",
ap.prompts.select(
"c",
"c++",
"c#",
"python",
"ruby",
"javascript",
"java",
"pascal",
"haskell",
"rust",
"go",
"lua",
"swift",
"R",
"bash",
sort = True,
multiple = True,
require = itertools.count(1)
)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aprompt-1.0.0b0.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for aprompt-1.0.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73bdb07cd27874908e57e369eff4e50785cb4cfbf83beb22f8a144f397f4d885 |
|
MD5 | 8e2b98529f7e836b3d5ee8e6eb125e19 |
|
BLAKE2b-256 | 0c476d4fa96aca4ffda1d457db82d645f4308619744a101cd456bb3aa78d5710 |