A modern Python library for elegant terminal output with rich formatting, colors, emoji support, and export capabilities
Project description
โจ StyledConsole
A modern Python library for elegant terminal output โ rich formatting, colors, emojis, gradients, and export capabilities built on top of Rich.
๐ง Early Access โ Currently available on TestPyPI. Some features may be experimental.
pip install -i https://test.pypi.org/simple/ styledconsole
๐จ Visual Gallery
See the Visual Gallery for screenshots and animated demos.
๐ Why StyledConsole?
Rich is powerful, but StyledConsole adds the finishing touches:
| Feature | What It Does | |
|---|---|---|
| ๐ | Gradient Engine | Smooth rainbows and linear gradients on borders, text, banners |
| ๐ฏ | Smart Icons | 224 icons with automatic ASCII fallback for CI/legacy terminals |
| ๐ | StyledTables | Beautiful tables with gradient borders and config-driven creation |
| ๐ง | Environment Detection | Auto-adapts for NO_COLOR, CI, TERM=dumb |
| ๐๏ธ | Frame Engine | 8 border styles, nested frames, width alignment |
| ๐ค | HTML & Image Export | Export to HTML, PNG, WebP, GIF with full emoji support |
| ๐ | Declarative Layouts | Build entire UIs from JSON/dict config |
โจ Key Features
๐ฏ Smart Icon System
Policy-aware symbols with automatic ASCII fallback โ works everywhere:
from styledconsole import icons
print(f"{icons.ROCKET} Deploying...") # ๐ in modern terminals
print(f"{icons.CHECK_MARK_BUTTON} Done!") # โ
or >>> in CI
| Environment | Output | Rendering |
|---|---|---|
| Modern Terminal | ๐ | Full emoji |
| CI / Legacy | >>> |
Colored ASCII |
๐ Gradient Frames & Borders
Smooth color transitions on any frame border:
from styledconsole import Console
console = Console()
console.frame(
"Build successful!",
title="Status",
border="rounded",
border_gradient_start="green",
border_gradient_end="cyan",
)
๐ค ASCII Art Banners
500+ fonts with integrated gradient and rainbow support:
console.banner("HELLO", font="slant", rainbow=True)
console.banner("WORLD", font="big", start_color="cyan", end_color="magenta")
๐ StyledTables
Beautiful tables with gradient borders, created from code or config:
from styledconsole.presets.tables import create_table_from_config
table = create_table_from_config(
theme={"border_style": "heavy", "gradient": {"start": "cyan", "end": "blue"}},
data={
"columns": [{"header": "Service"}, {"header": "Status"}],
"rows": [["API", "โ
Online"], ["Database", "โ
Online"]]
}
)
console.print(table)
๐ง Environment-Aware Rendering
Automatically adapts for CI/CD pipelines and restricted terminals:
from styledconsole import Console, RenderPolicy
# CI-friendly: colors preserved, ASCII symbols
console = Console(policy=RenderPolicy.ci_friendly())
# Auto-detects: NO_COLOR, FORCE_COLOR, TERM=dumb, CI, GITHUB_ACTIONS
๐ค HTML & Image Export
Record terminal sessions and export to HTML or images:
console = Console(record=True)
# ... render your UI ...
# HTML export (built-in)
console.export_html("output.html")
# Image export (pip install styledconsole[image])
console.export_png("output.png")
console.export_webp("output.webp")
console.export_gif("animation.gif") # animated!
๐ Declarative Layouts
Build complex dashboards from JSON/dict โ perfect for config-driven UIs:
from styledconsole.presets.layouts import create_layout_from_config
layout = create_layout_from_config({
"type": "panel",
"title": "DASHBOARD",
"border": "heavy",
"content": {"type": "text", "content": "Status: Online"}
})
console.print(layout)
๐ Quick Start
pip install -i https://test.pypi.org/simple/ styledconsole
from styledconsole import Console, icons
console = Console()
console.frame(
f"{icons.CHECK_MARK_BUTTON} Build successful\n"
f"{icons.ROCKET} Deployed to production",
title=f"{icons.SPARKLES} Status",
border="rounded",
border_gradient_start="green",
border_gradient_end="cyan",
)
Output:
โญโโโโโโโโ โจ Status โโโโโโโโโโฎ
โ โ
Build successful โ
โ ๐ Deployed to production โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
๐ Want more examples? Check out StyledConsole-Examples for 40+ real-world demos including CLI dashboards, progress bars, error reporters, and animated effects.
๐๏ธ Built On Giants
StyledConsole extends these excellent libraries:
| Library | Contribution |
|---|---|
| Rich | ๐ช Core rendering engine |
| emoji | ๐ 4000+ Unicode emojis |
| PyFiglet | ๐ค 500+ ASCII art fonts |
| wcwidth | ๐ Unicode width calculation |
| ansi2html | ๐พ Terminal โ HTML export |
๐ Project Status
v0.10.3 โ ๐๏ธ Early Access (TestPyPI)
| Metric | Value |
|---|---|
| ๐งช Tests | 1315 passing |
| ๐ Coverage | 82% |
| ๐ MyPy | 0 errors |
| ๐ Python | 3.10 โ 3.14 |
๐ Documentation
| Resource | Description |
|---|---|
| ๐ User Guide | Complete API reference |
| ๐๏ธ Developer Guide | Architecture & internals |
| ๐จ Visual Gallery | Screenshots & demos |
| ๐ Changelog | Version history |
| ๐ค Contributing | Development workflow |
๐ Support
If StyledConsole improves your developer experience:
| Platform | Link |
|---|---|
| ๐ GitHub Sponsors | github.com/sponsors/ksokolowski |
| โ Ko-fi | ko-fi.com/styledconsole |
๐ License
Apache License 2.0 โ See LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file styledconsole-0.10.3.tar.gz.
File metadata
- Download URL: styledconsole-0.10.3.tar.gz
- Upload date:
- Size: 894.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5240253d125ed39f4dc353cdb7d2694ac3dc5d82266944e2957c311422b3b33a
|
|
| MD5 |
c6aae1bf1b5bd987c79b21e076f4ea2e
|
|
| BLAKE2b-256 |
fda4a63449a7e01b0d8f9bbd07cce46ab893c9e7929236066d880945c43bcaee
|
Provenance
The following attestation bundles were made for styledconsole-0.10.3.tar.gz:
Publisher:
publish.yml on ksokolowski/StyledConsole
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
styledconsole-0.10.3.tar.gz -
Subject digest:
5240253d125ed39f4dc353cdb7d2694ac3dc5d82266944e2957c311422b3b33a - Sigstore transparency entry: 843390299
- Sigstore integration time:
-
Permalink:
ksokolowski/StyledConsole@f7a93dba5063a68af14fd0a4b789954412c6035d -
Branch / Tag:
refs/tags/v0.10.3 - Owner: https://github.com/ksokolowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f7a93dba5063a68af14fd0a4b789954412c6035d -
Trigger Event:
push
-
Statement type:
File details
Details for the file styledconsole-0.10.3-py3-none-any.whl.
File metadata
- Download URL: styledconsole-0.10.3-py3-none-any.whl
- Upload date:
- Size: 240.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d09592026860d09e3208a1d9f1a08289fe98c892cd0c04d412044c477b8d90d0
|
|
| MD5 |
5aef85cb8e57e0e78015ed4b1e0e4063
|
|
| BLAKE2b-256 |
c30b3b825ed3410261b3f23643e685777cc9916f14820c6ff86ee112c57a4705
|
Provenance
The following attestation bundles were made for styledconsole-0.10.3-py3-none-any.whl:
Publisher:
publish.yml on ksokolowski/StyledConsole
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
styledconsole-0.10.3-py3-none-any.whl -
Subject digest:
d09592026860d09e3208a1d9f1a08289fe98c892cd0c04d412044c477b8d90d0 - Sigstore transparency entry: 843390301
- Sigstore integration time:
-
Permalink:
ksokolowski/StyledConsole@f7a93dba5063a68af14fd0a4b789954412c6035d -
Branch / Tag:
refs/tags/v0.10.3 - Owner: https://github.com/ksokolowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f7a93dba5063a68af14fd0a4b789954412c6035d -
Trigger Event:
push
-
Statement type: