wasabi
A lightweight, zero-dependency console printing and formatting toolkit for Python
Repository Health
Technical Analysis
wasabi is a small, zero-dependency toolkit for printing readable, colored, and structured output to the terminal. It was extracted from utilities that Explosion AI wrote repeatedly across spaCy, Thinc, and Prodigy, then standardized into a shared package so those tools could all print consistent, nicely formatted messages, tables, and progress output.
Rather than being a general-purpose, fully customizable formatting library, wasabi stays deliberately narrow: colored message types (good/warn/fail/info), Markdown-to-terminal rendering, simple ASCII tables, and a Printer class for consistent CLI output, all with no third-party dependencies and full Python 3.6+ support.
What You Get
- A
Printer/msgAPI for colored status messages (good,warn,fail,info,text) with consistent icons and formatting table()helper for rendering aligned, readable ASCII tables from row data- A lightweight Markdown-to-terminal renderer for formatted multi-line CLI output
- A traceback printer for cleaner, more readable error output
- Zero runtime dependencies and Jupyter notebook compatibility for consistent output in notebooks
Common Use Cases
- Printing consistent colored status/progress messages in CLI tools and build scripts
- Rendering summary tables (e.g. evaluation metrics, config values) in terminal output
- Formatting Markdown-based CLI help text or reports for terminal display
- Standardizing console output across multiple related Python packages, as Explosion does across spaCy/Thinc/Prodigy
Under The Hood
Architecture: wasabi is organized around a handful of focused modules — printer.py (the Printer/msg API and colored message logic), tables.py (ASCII table rendering), markdown.py (Markdown-to-terminal conversion), and traceback_printer.py (formatted error output) — with util.py providing shared color/formatting helpers used across all of them.
Tech Stack: Pure Python with zero runtime dependencies by design, supporting Python 3.6+; there is no compiled or native code, keeping the install footprint minimal.
Code Quality: Each module has a corresponding test file (test_printer.py, test_tables.py, test_markdown.py, test_traceback.py, test_jupyter.py, test_util.py) under wasabi/tests, with CI configured via GitHub Actions (tests.yml) and code formatted with black.
API Design: The API is intentionally narrow and opinionated rather than fully configurable — msg.good()/msg.warn() and table() require almost no setup to produce readable output, which the README explicitly frames as a tradeoff against being a general-purpose formatting library like colored or tabulate.