pansi
Text mode rendering library
What it is and what it does
Pansi is a text-mode rendering library that abstracts ANSI escape sequences into a Python API for styling and coloring terminal output. It provides three main modules: pansi.text for text coloring and styling (with functions designed to align with CSS properties), pansi.image for rendering images in the terminal, and pansi.screen for full-screen layout handling. The library depends on pillow for image processing.
The package is positioned as a stable, production-ready tool for developers building terminal user interfaces or command-line applications that need formatted text and graphics. It supports a wide range of Python versions from 3.6 onward and is OS-independent, though terminal feature support varies—not every function works in every terminal emulator, so you should verify compatibility with your target terminal software.
Use it for:
- Build colored and styled CLI output for command-line tools and scripts without manually writing ANSI codes.
- Render images and graphics in the terminal for terminal-based dashboards or monitoring applications.
- Create full-screen terminal layouts and interactive text-mode user interfaces.
- Add visual formatting to log output or diagnostic tools running in headless or remote environments.
- Prototype terminal-based games or interactive applications with text and graphics rendering.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pansi provides a clean interface for rendering text and graphics in the terminal using ANSI escape sequences, with modules for text styling, image rendering, and full-screen layout.
Yes, if you need terminal text styling and graphics rendering in a stable, low-friction package. The Apache-2.0 license is permissive and the install is straightforward. However, note that the project is dormant (no releases in 649 days), so do not expect active maintenance, bug fixes, or updates—suitable for stable use cases but risky if you encounter bugs or need new features.
Install
pansi on PyPI
pip
pip install pansiuv
uv add pansipoetry
poetry add pansiInstalling pansi
Before you install
Low friction install with a single runtime dependency (pillow). The package is marked Production/Stable and supports Python 3.6 through 3.14, but maintenance is dormant—no releases in 649 days, so expect no active bug fixes or updates.
License in practice
Apache-2.0 is permissive, allowing commercial and private use with minimal restrictions. You may use this in proprietary projects without licensing concerns.
Quickstart
pip install pansi
from pansi.text import green
print(f"Hello, {green}world{~green}!")
Requires Python 3.6 or later; terminal must support ANSI escape sequences (most modern terminals do, but feature support varies by terminal software).
Verify before relying
- Whether the image rendering module requires additional system libraries beyond pillow.
- Current state of the GitHub repository and whether it is still maintained or has been archived.
- Compatibility with Windows terminals and whether WSL or third-party terminal emulators are needed for full feature support.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pillow |
| Maintenance | dormant — 649 days since the last release |
| First released | |
| Downloads | 97,355/month — #13,154 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pansi-2024.11.0-py2.py3-none-any.whl
Keywords: ANSI, terminal, text, graphics, unicode
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
ansiProvides ANSI escape codes for cursor movement…
permissive · top 15,000 on PyPI
asciimaticsAsciimatics provides cross-platform terminal UI…
permissive · top 15,000 on PyPI
coloredColored provides ANSI/VT100 escape sequences…
permissive · top 5,000 on PyPI
curtsiesCurtsies provides a Python library for building…
permissive · top 15,000 on PyPI
coloramaColorama makes ANSI escape sequences for…
permissive · top 100 on PyPI
strip-ansiRemoves ANSI escape sequences (color codes,…
unclear · top 15,000 on PyPI
rst2ansiConverts reStructuredText documents to…
permissive · top 15,000 on PyPI
climageConverts images to ANSI escape code sequences…
permissive · top 15,000 on PyPI
pictexPicTex generates high-quality PNG, JPEG, WebP,…
permissive · top 15,000 on PyPI
ansimarkupAnsimarkup converts XML-like markup tags into…
permissive · top 15,000 on PyPI