style
🌈 Terminal string styling
What it is and what it does
style is a lightweight terminal styling library that lets you apply colors and text modifiers (bold, underline, etc.) to strings using a chainable API. You import it, chain style names together, and call the final one as a method with your text—for example, style.red.bold('text') produces bold red output. The API is modeled after the popular JavaScript chalk package, so it will feel familiar if you've used that.
The package automatically detects whether your terminal supports colors and can be toggled on or off manually. It supports standard ANSI colors, light variants, background colors, and text modifiers like bold, dim, italic, underline, inverse, hidden, and strikethrough. Styles can be nested and chained in any order, with later styles taking precedence in conflicts.
Use it for:
- Colorize CLI tool output to highlight errors, warnings, and success messages for better readability.
- Style log messages in terminal applications to distinguish log levels (error in red, warning in yellow, info in blue).
- Create visually distinct prompts and user-facing text in interactive command-line scripts.
- Format test output or build tool logs to make pass/fail status immediately obvious at a glance.
- Add visual polish to terminal-based dashboards or monitoring scripts with colored and styled text.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Applies ANSI color and text styling to terminal output using a chainable API inspired by the JavaScript chalk package.
Yes, if you need simple terminal styling for a short-lived script or tool and can tolerate the lack of maintenance. The package is stable and has no known vulnerabilities, but it has been abandoned since 2019. For new projects or long-term maintenance, consider an actively maintained alternative like colorama or rich instead.
Install
style on PyPI
pip
pip install styleuv
uv add stylepoetry
poetry add styleInstalling style
Before you install
Installation is frictionless with no runtime dependencies. However, the package is abandoned—last release was 2019-03-08 and last commit 2022-05-03, with no active maintenance.
License in practice
MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license notice.
Quickstart
pip install style
import style
print(style.red('Hello', style.bold('world') + '!'))
Verify before relying
- Whether the package works reliably on modern Python versions beyond 3.6, given the lack of recent maintenance.
- Whether color detection and terminal compatibility remain robust across current terminal emulators and environments.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,716 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 149,400/month — #10,993 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: style-1.1.6-py2.py3-none-any.whl
Keywords: style, color, ansi, terminal styling, chalk
Tags
More Terminals packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
richRich renders styled text, tables, progress…
permissive · top 100 on PyPI
coloramaColorama makes ANSI escape sequences for…
permissive · top 100 on PyPI
wcwidthMeasures the displayed width of Unicode strings…
permissive · top 1,000 on PyPI
ptyprocessRun a subprocess in a pseudo terminal (pty) and…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
simple-colorsAdds colored and styled text output to terminal…
unclear · top 15,000 on PyPI
stySty provides a simple, customizable string…
permissive · top 15,000 on PyPI
curtsiesCurtsies provides a Python library for building…
permissive · top 15,000 on PyPI
tcolorpyApplies ANSI true color and text styles (bold,…
permissive · top 5,000 on PyPI
termcolorAdds ANSI color and text formatting (bold,…
permissive · top 1,000 on PyPI
colorfulColorful applies ANSI color and text styling to…
permissive · top 5,000 on PyPI
pastelPastel adds colored text output to terminal…
permissive · top 5,000 on PyPI
ansicolorsEmbeds ANSI color and style codes into Python…
permissive · top 5,000 on PyPI
pystylePystyle provides terminal styling utilities for…
unclear · top 15,000 on PyPI
ansi2txtConverts ANSI escape sequences (color codes,…
unclear · top 15,000 on PyPI