Minimal, deterministic color-coded debugging for Python.
vizible provides a way to track execution flow by assigning a deterministic
color to each dprint call site.
dprint(*args): Prints text in a truecolor RGB value derived from the calling file name and line number. The value is stable while that call site stays at the same path and line.red, green, blue, magenta, and cyan.from vizible import blue, cyan, dprint, green, magenta, red
print("Regular print")
# Each dprint call site gets a deterministic color
dprint("Line-aware color A")
dprint("Line-aware color B")
# ANSI color helpers
red("red print")
green("green print")
blue("blue print")
magenta("magenta print")
cyan("cyan print")
This is a generated rendering of the ANSI stream emitted by the example, not a
live terminal. The two dprint lines preserve their exact emitted RGB values.
The named helpers emit standard ANSI SGR color codes (31, 32, and so on),
so their final RGB values deliberately follow your terminal’s palette; the
preview uses the xterm default palette for those lines.
When debugging loops or long log streams, visual pattern matching is faster than reading text. vizible allows you to “see” where your logs are coming from without reading file/line prefixes.