Registry / bullet

bullet

JSON →
library2.2.0pypypi✓ verified 85d ago

Bullet is a beautiful Python prompt library for building interactive command-line interfaces with lists, checkboxes, input prompts, and yes/no confirmations. It supports emoji, colors, and custom indicators. Current version: 2.2.0. Release cadence: low (last release was in 2020).

pip install bullet
INSTALL
IMPORT
SIG · BULLET
B
bullet
pythonv2.2.0
Install
1.7s avg
Import
21ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.022s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.020s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Bullet
from bullet import Bullet
Correct modern import path.
Check
from bullet import Check
For multi-select checklists.
YesNo
from bullet import YesNo
For yes/no prompts.
Input
from bullet import Input
For free-text input.
colors
from bullet import colors
Used for styling (foreground, background, etc.).
ScrollBar
from bullet import ScrollBar
For scrolling long lists.
client
from bullet import client
There is no 'client' module; do not import from bullet.client.
Bullet (class)
from bullet import Bullet as Bullet
Old users sometimes try 'from bullet import bullet' (lowercase) which doesn't work.

Basic single-select prompt with custom styling.

from bullet import Bullet, colors cli = Bullet( prompt="Choose a color: ", choices=["red", "green", "blue"], indent=0, align=5, margin=2, bullet="➡️", bullet_color=colors.bright(colors.foreground["cyan"]), word_color=colors.bright(colors.foreground["white"]), word_on_switch=colors.bright(colors.foreground["green"]), background_color=colors.background["black"] ) result = cli.launch() print(f"You picked {result}")
Debug
Known issues
gotchaBullet uses carriage returns to render over the same lines; it does NOT work inside IDEs (PyCharm, VS Code terminal) that don't support raw terminal mode. Run scripts directly in a real terminal.
fix
Run the script from a terminal (cmd, bash) – not the IDE's built-in console.
affects: all
gotchaThe library sets the terminal to raw mode (no line buffering, no echo). If your script crashes without cleanup, your terminal might be left in a broken state (no echo, weird keys).
fix
Wrap the prompt in a try/finally block or use context managers. The library itself restores terminal on normal exit, but not on unhandled exceptions.
affects: all
gotchaUnicode/emoji characters may not render correctly on all terminals (especially Windows cmd with chcp 437). The bullet character defaults to a simple '> ' if the chosen character is not supported.
fix
Use simple ASCII symbols if you need to support legacy terminals. Set bullet='▸' or similar.
affects: all
gotchaThe library is no longer actively maintained; last release was in 2020. Issues and pull requests are rarely addressed. Use with caution for new projects.
fix
Consider alternatives like 'questionary', 'pick', 'PyInquirer', or 'enquirer' for newer Pythons.
affects: 2.x
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'bullet'
Library not installed.
fix
Run: pip install bullet
TypeError: __init__() got an unexpected keyword argument 'params'
Using outdated or mistyped constructor arguments.
fix
Check the documentation for correct parameters: Bullet(prompt, choices, ...). Do not use 'params'.
AttributeError: module 'bullet' has no attribute 'Bullet'
Importing incorrectly. There is no 'bullet.Bullet' because 'bullet' is the package, not a module inside it.
fix
Use: from bullet import Bullet
ValueError: The truth value of a Choice is ambiguous
Using raw strings vs. custom choice objects incorrectly. The choices parameter expects strings or custom objects with __str__.
fix
Pass a list of strings, or define a class with __str__ method if custom objects are needed.
Upgrade
Version history
2.2.0latest on PyPI · released Aug 14, 2020
Audit
Dependencies
pyyamloptionalOptional: used for saving/loading config in older versions, not required for basic usage.
Agent activity
8 hits · last 30 days
node
8
Resources
bullet — pip install bullet · libregistry