--- id: enrich version: "1.2.7" license: MIT license_treatment: permissive maintenance: active --- # enrich — enrich License: permissive · Maintenance: active · Downloads: 2.3M/mo ## 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 above — 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 pip install enrich uv add enrich 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_current - Install friction: low - Maintenance: active - Downloads: 2.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags rich console redirect stdout stderr, soft wrap terminal output, rich logging handler, ANSI escape handling console, fluid terminal text wrapping, rich console extensions, terminal-ui, logging-enhancement [View on SkillFed](https://skillfed.io/packages/enrich) · [View on PyPI](https://pypi.org/project/enrich/)