--- id: django-rich version: "2.2.0" license: MIT license_treatment: permissive maintenance: active --- # django-rich — Extensions for using Rich with Django. License: permissive · Maintenance: active · Downloads: 226.9K/mo ## What it is and what it does django-rich bridges Rich, a terminal formatting library, with Django's built-in development tools. It provides three main extensions: an enhanced shell command that enables Rich's pretty-printing and auto-imports key Rich functions (on Django 5.2+), a RichCommand base class for custom management commands that adds a Rich Console to your command's output, and a RichRunner test class that replaces Django's default test runner with colorized output and Rich's traceback rendering. The package is designed to improve developer experience during local development and testing. It requires minimal setup—just add it to INSTALLED_APPS for shell integration, or point TEST_RUNNER to the RichRunner class. All features respect Django's color control flags (--no-color, --force-color), and the test runner's output width can be tuned via the COLUMNS environment variable for CI systems. Use it for: - Run Django shell with automatic Rich pretty-printing and inspect/print/pprint functions available without manual import. - Write custom management commands with colorized, formatted console output using self.console from RichCommand. - Run tests with colorized output and Rich's traceback rendering to see source code and local values per frame. - Debug test failures in CI by setting COLUMNS environment variable to control Rich's terminal width detection. - Combine RichRunner with other test runner classes for customized test output while keeping Rich's formatting. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Integrates Rich's terminal formatting and pretty-printing into Django's shell command, management commands, and test runner for colorized, readable output. Yes. django-rich is production-stable, actively maintained, has no known vulnerabilities, and adds meaningful developer experience improvements with minimal friction. Install it if you use Django's shell, write management commands, or want better test output readability—the setup is trivial and the benefits are immediate. ## Install pip install django-rich uv add django-rich poetry add django-rich ## Installing django-rich Before you install: Low install friction with only two runtime dependencies (django and rich). Actively maintained with recent releases; last commit on 2026-08-13 and production-stable status. No known vulnerabilities. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects alike. Quickstart: pip install django-rich # In settings.py, add to INSTALLED_APPS: INSTALLED_APPS = [ ..., "django_rich", ] # Or subclass RichCommand for custom management commands: from django_rich.management import RichCommand class Command(RichCommand): def handle(self, *args, **options): self.console.print("[bold]Hello[/bold]") Requires Django 4.2 to 6.0 and Python 3.9 to 3.14; features like automatic Rich imports in shell only activate on Django 5.2+. Verify before relying: - Whether the shell command integration works with IPython or only the standard Python REPL - Performance impact of colorization on large test suites or CI environments ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 226.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django shell rich formatting, django management command colors, django test runner pretty output, rich terminal integration django, django repl pretty printing, colorized django test output, django console formatting, django-extension, terminal-ui, developer-tools [View on SkillFed](https://skillfed.io/packages/django-rich) · [View on PyPI](https://pypi.org/project/django-rich/)