enrich
enrich
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 enrichuv
uv add enrichpoetry
poetry add enrichInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
richRich renders styled text, tables, progress…
permissive · top 100 on PyPI
rich-pixelsRenders pixel images and ASCII art grids to the…
unclear · top 15,000 on PyPI
lib-log-richProvides Rich-styled colored console logging…
permissive · top 15,000 on PyPI
ansiwrapWraps and formats text while correctly handling…
permissive · top 5,000 on PyPI
coloredlogsAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
rst2ansiConverts reStructuredText documents to…
permissive · top 15,000 on PyPI
rich-clickRenders Click command-line interfaces with rich…
permissive · top 1,000 on PyPI
rich-pyfigletRenders ASCII art banners in the terminal using…
permissive · top 15,000 on PyPI
ascii-colorsUnified terminal UI library providing colored…
permissive · top 15,000 on PyPI
pansiPansi provides a clean interface for rendering…
permissive · top 15,000 on PyPI