bullet
: Beautiful Python Prompts Made Simple
๐จ Customize prompts in your Python CLI tool. Extensive support for formatting, colors, background colors, styling, and etc.
Usage
from bullet import Bullet, YesNo, Numbers, Input, Prompt
cli = Prompt(
[
YesNo("Are you a student? "),
Input("Who are you? "),
Numbers("How old are you? "),
Bullet("What is your favorite programming language? ",
choices = ["C++", "Python", "Javascript", "Not here!"]),
],
spacing = 1
)
result = cli.launch()
Bullet-lists and checkboxes
๐จ Robust support for user-defined styles.
./examples/classic.py | ./examples/colorful.py | ./examples/star.py |
---|---|---|
Vanilla checkbox | Checkbox + styles.Exam | Bullet + styles.Greece |
Bullet + styles.Ocean | Bullet + styles.Lime | Bullet + styles.Christmas |
Other input prompts
โ Passwords
๐ Yes/No Questions
๐ข Numbers
Setting up bullet
From PyPI
$ pip install bullet
Build from Source
$ git clone https://github.com/Mckinsey666/bullet.git
$ pip install .
Documentation
๐ See Documentation.
Currently supported prompts:
Bullet
,Check
,Input
,Numbers
,Password
,YesNo
,VerticalPrompt
,SlidePrompt
.
Contributing
๐ Directly send PRs! I'd also love to see your color schemes, and they can possibly be added to the default style library!
Todo
- Scrollbars