sty
String styling for your terminal
Decision gist · record as of 2026-08-14
Yes, if you need simple, zero-dependency terminal styling. Sty is lightweight, well-typed, and avoids global modifications that cause compatibility issues. The dormant maintenance status is not a blocker for stable use—the library is feature-complete and has no known vulnerabilities—but monitor the repository if you rely on it for new Python versions beyond 3.12.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.7,<4.0; legacy Windows terminal (cmd) may need a workaround for ANSI support.
- Low friction: pure Python wheel with zero runtime dependencies.
- Maintenance is dormant (last release November 2023, 991 days ago), but the repository remains active and unarchived with no recent breaking changes signaled.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 is permissive; you can use, modify, and distribute sty freely in commercial and open-source projects with minimal restrictions.
last release 2023-11-27 (991 days) · last repo commit 2023-11-27 · 218 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 243,995 downloads/mo, #8,767 on PyPI
Alternatives
Verify before relying
from sty import fg, bg, ef, rs
print(fg.red + 'Red text' + fg.rs)
print(bg.blue + 'Blue background' + bg.rs)
print(ef.bold + 'Bold text' + rs.bold)- Whether dormant maintenance (991 days since last release) poses a risk for future Python or terminal compatibility issues.
- Actual compatibility status with modern Windows terminals beyond the documented legacy cmd limitation.
What it is and what it does
Sty is a zero-dependency library for styling terminal output with colors and text effects. It decouples styling markup from color palettes and terminal implementations, letting you write color codes once and swap renderers or palettes without changing your code. It supports 3/4bit, 8bit, and 24bit (RGB) colors, effects like bold and italic, and allows you to mute all styles globally. The library is fully typed, does not modify globals like some alternatives do, and provides high-performance access to styling rules.
You apply styles by concatenating string constants (fg.red, bg.blue, ef.bold) with your text, then reset with reset codes (fg.rs, bg.rs, rs.italic). You can also create custom color registers by subclassing the built-in register classes, or use the Register class directly to define your own styling rules.
Use it for
- Add colored and bold output to CLI tools and scripts for better readability and user feedback.
- Create custom color palettes for logging or status messages without rewriting markup in your code.
- Build terminal applications that need RGB colors or effects across Unix, macOS, and modern Windows terminals.
- Mute all terminal styling globally for log files or non-interactive environments without code changes.
- Extend default color and effect registers with domain-specific styles (e.g., error red, success green).
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need simple, zero-dependency terminal styling.
Sty is lightweight, well-typed, and avoids global modifications that cause compatibility issues. The dormant maintenance status is not a blocker for stable use—the library is feature-complete and has no known vulnerabilities—but monitor the repository if you rely on it for new Python versions beyond 3.12.
Install
sty on PyPI
Before you install
Low friction: pure Python wheel with zero runtime dependencies. Maintenance is dormant (last release November 2023, 991 days ago), but the repository remains active and unarchived with no recent breaking changes signaled.
Requires Python >=3.7,<4.0; legacy Windows terminal (cmd) may need a workaround for ANSI support.
License in practice
Apache-2.0 is permissive; you can use, modify, and distribute sty freely in commercial and open-source projects with minimal restrictions.
Quickstart
from sty import fg, bg, ef, rs
print(fg.red + 'Red text' + fg.rs)
print(bg.blue + 'Blue background' + bg.rs)
print(ef.bold + 'Bold text' + rs.bold)
Verify before relying
- Whether dormant maintenance (991 days since last release) poses a risk for future Python or terminal compatibility issues.
- Actual compatibility status with modern Windows terminals beyond the documented legacy cmd limitation.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.7,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 991 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 243,995 / month, #8,767 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: PrintingTopic :: System :: ShellsTopic :: TerminalsTyping :: Typed |
Evidence: sty-1.0.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “rgb terminal colors”
- stySty provides a simple, customizable string styling markup for…
- ansiProvides ANSI escape codes for cursor movement and text styling…
- coloredColored provides ANSI/VT100 escape sequences for terminal text…
Give your agent the search over MCP, or paste the wish link into any chat.
More Terminals packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Rich renders styled text, tables, progress bars, syntax highlighting, markdown, and tracebacks to the terminal with minimal code.
Colorama makes ANSI escape sequences for colored terminal text work on Windows by intercepting and converting them to win32 API calls, while passing through unchanged on other platforms.
Install it if you need colored terminal output to work on Windows or want to use ANSI-based libraries portably; skip it only if you target non-Windows platforms…
Measures the displayed width of Unicode strings in terminals, accounting for wide characters, combining marks, and terminal escape sequences that standard Python string functions mishandle.
Install it if your application formats text for terminals and handles non-ASCII characters.
Run a subprocess in a pseudo terminal (pty) and interact with its input and output, enabling automation of interactive programs that require terminal features like password prompts or curses-style interfaces.
However, note that it is aging (last release 2020-12-28) and not actively maintained; it works well for its narrow, well-defined purpose but won't receive updates for…
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
See also pastel · pystyle · style · ansicolors · simple-colors · colorful · termcolor · terminaltexteffects · ansi · cloup