Skip to content
forked from bchao1/bullet

πŸš… Beautiful Python List Prompts Made Simple.

Notifications You must be signed in to change notification settings

NawazZeeshan/bullet

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

bullet : Beautiful Python List Prompts Made Simple



🎨 Customize bullet list prompts in your Python CLI tool. Extensive support for formatting, colors, background colors, and etc.


from bullet import Bullet

cli = Bullet(...)
result = cli.launch(prompt)

Setup

$ pip install bullet

Documentation

πŸ‘· To fully customize your list prompt, you'll have to take total control of formatting and colors. Here's what you need to know.

Using bullet

from bullet import Bullet
cli = Bullet()  # Create a Bullet object
result = cli.launch()  # Launch a list prompt

Defining Choices

cli = Bullet(choices = ["first item", "second item", "thrid item"])

Customize Bullets

cli = Bullet(bullet = "β˜…")

Use Default Style Schemes

from bullet import styles
client = Bullet(**styles.Greece)

Customize Colors

from bullet import colors

🎨 The following colors are supported in bullets.

black, red, green, yellow, blue, magenta, cyan, white

🎨 Remember to specify foreground and background.

black_foreground = colors.foreground["black"]
white_background = colors.background["white"]

🎨 Define the following colors when initializing the Bullet object.

  • Use foreground colors:
    • bullet_color
    • word_color
    • word_on_switch
  • Use background colors:
    • background_color
    • background_on_switch

Formatting

πŸ“ Define the following when initializaing the Bullet object.

  • indent: distance from left-boundary to start of prompt.
  • pad_right: extended background length.
  • align: distance between bullet and start of prompt.
  • margin: distance between list item and bullets.
  • shift: number of new lines between prompt and first item.

About

πŸš… Beautiful Python List Prompts Made Simple.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%