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. Run your scripts from the
terminal.
Features
Prompts
- text
- password
- code
- amount
- select
- multi-select
- path (beta)
- datetime
Other
- custom formatter (not documented yet)
- custom prompts (not documented yet)
- detailed docs
Usage
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,
)
)
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? (Choose 3 or more)",
ap.prompts.select(
"c",
"c++",
"c#",
"python",
"ruby",
"javascript",
"java",
"pascal",
"haskell",
"rust",
"go",
"lua",
"swift",
"R",
"bash",
sort = True,
multiple = True,
require = lambda x: x >= 3,
)
)
...
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.0b1.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for aprompt-1.0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 866b23da130be786d394435e934cf0b229e3706f9e84b7debf7e5d0e28bb74ef |
|
MD5 | 90223e57964d257eea3314bb8a86b513 |
|
BLAKE2b-256 | 3e903be8629cab5c5aae57f3905b803bb6e2c38eb922d0cacdd84bf8d87a8e29 |