skillfed

enrich

enrich

enrich v1.2.7 2.3M downloads/30d#3,133 on PyPI40
Permissive license MIT Active released

What it is and what it does

Enrich is a set of extensions to the rich library that add features rejected or not yet accepted upstream. It provides an enhanced Console class with two key capabilities: stream redirection (capturing sys.stdout and sys.stderr via a FileProxy) and soft text wrapping (allowing the client terminal to decide where to break lines rather than the application). It also extends Console to handle ANSI escape sequences in already-formatted text, and provides a RichHandler for logging that uses soft wrapping by default instead of pre-wrapping output to a fixed console width.

The package targets developers building terminal applications or logging systems where output needs to adapt to the client's display constraints rather than being pre-formatted. It depends only on rich and supports Python 3.6 and later.

Use it for:

  • Capture and record terminal output from sys.stdout/stderr while displaying it live using Console redirect mode.
  • Build terminal UIs that reflow text based on the user's terminal width rather than a fixed application width.
  • Log application output that will be displayed on web pages or terminals with unknown widths using RichHandler.
  • Process and display output from subprocesses that contain ANSI escape codes without breaking formatting.
  • Create logging configurations where log lines remain unwrapped and let the viewer decide line breaks.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Extends the rich library with a Console class that supports stream redirection and soft text wrapping, plus a logging handler that preserves client-side wrapping decisions.

Yes, if you use rich and need stream redirection or client-side text wrapping. The package is stable (MIT, no vulnerabilities, active repository) and has low install friction. However, note that the last release was 2022-01-10; verify compatibility with your current rich version before adopting.

Install

enrich on PyPI

pip

pip install enrich

uv

uv add enrich

poetry

poetry add enrich

Installing enrich

Before you install

Low install friction; single dependency on rich. Repository is active with recent commits, though the package itself has not been released since 2022-01-10.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.

Quickstart

pip install enrich

from enrich.console import Console
console = Console(redirect=True, soft_wrap=True)
console.print("Text that wraps client-side")

Verify before relying

  • Whether the redirect and soft_wrap features work correctly with all rich versions currently in use.
  • Current compatibility with Python versions beyond 3.10, given the last release was 2022-01-10.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — rich
Maintenance actively maintained — 1,677 days since the last release
Last repo commit
First released
Downloads 2,329,339/month — #3,133 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: enrich-1.2.7-py3-none-any.whl

Keywords: console, logging, rich

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Systems AdministrationTopic :: Utilities

Tags

rich console redirect stdout stderrsoft wrap terminal outputrich logging handlerANSI escape handling consolefluid terminal text wrappingrich console extensions
terminal-uilogging-enhancement

More Utilities packages