skillfed

pansi

Text mode rendering library

pansi v2024.11.0 97.4K downloads/30d#13,154 on PyPI
Permissive license Apache-2.0 DORMANT released

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 pansi

uv

uv add pansi

poetry

poetry add pansi

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: Console :: CursesIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: System :: Console FontsTopic :: System :: ShellsTopic :: TerminalsTopic :: Terminals :: Terminal Emulators/X TerminalsTopic :: Text ProcessingTopic :: Text Processing :: MarkupTopic :: Utilities

Tags

terminal text coloring and stylingANSI escape sequences libraryterminal graphics renderingtext mode terminal UIterminal image displayconsole text formattingterminal layout and screen handling
terminal-uiansi-renderingcli-graphics

More Software Development packages