Wasabi

1.1.3 · active · verified Sun Mar 29

Wasabi is a lightweight console printing and formatting toolkit designed by Explosion, the creators of spaCy. It aims to make console output more readable and visually appealing with minimal overhead. The library is currently at version 1.1.3 and is actively maintained, receiving regular updates often in conjunction with other Explosion projects.

Warnings

Install

Imports

Quickstart

Initializes a `Printer` instance to format and print messages with various styles (good, warn, fail, info, text) and includes dividers. It also demonstrates using the pre-initialized `msg` object.

from wasabi import Printer

# Instantiate a Printer for custom configuration
msg = Printer(pretty=True, hide_tags=False)

msg.text("Starting application...", icon="🚀")
msg.good("Configuration loaded successfully.")
msg.warn("API key not found, running in limited mode.")
msg.fail("Database connection failed.")

# Print a divider
msg.divider("Summary")

# Using the global 'msg' instance (pre-configured)
from wasabi import msg as default_msg
default_msg.info("Default printer message.")

view raw JSON →