Skip to main content

A modern Python library for elegant terminal output with rich formatting, colors, emoji support, and export capabilities

Project description

StyledConsole

Python >=3.10 License: Apache 2.0 Version Tests Coverage

A multi-interface Python library for elegant terminal output — use Python code, JSON/YAML configuration, or Jinja2 templates to create beautiful CLI experiences.

pip install styledconsole              # Core library
pip install styledconsole[yaml]        # + YAML support
pip install styledconsole[jinja]       # + Jinja2 templates
pip install styledconsole[all]         # Everything

Three Ways to Style Your Terminal

Python API (Full Power)

The complete API with builders, effects, gradients, themes, and export capabilities.

from styledconsole import Console, icons, EffectSpec

console = Console()
console.frame(
    f"{icons.CHECK_MARK_BUTTON} Build successful\n{icons.ROCKET} Deployed to production",
    title="Status",
    effect=EffectSpec.gradient("green", "cyan"),
)

JSON/YAML Configuration (No Code Required)

Perfect for config-driven UIs and non-programmers.

from styledconsole import Console, load_yaml

console = Console()
console.render_dict({
    "type": "frame",
    "title": "Status",
    "content": "Build successful!",
    "effect": "success"
})

Jinja2 Templates (Dynamic Content)

Generate UIs from data with loops, conditionals, and filters.

from styledconsole import Console, render_jinja

template = """
type: frame
title: Server Status
content:
  type: group
  items:
  {% for server in servers %}
    - "{{ server.status | status_icon }} {{ server.name }}: {{ server.status }}"
  {% endfor %}
"""
obj = render_jinja(template, servers=[{"name": "API", "status": "running"}])
Console().render_object(obj)

Key Features

Feature Description
Gradient Engine Rainbow and linear gradients on borders, text, banners
Smart Icons 224 icons with automatic ASCII fallback for CI/legacy terminals
Effects System 32 presets + 90 color palettes + phase animations
Builder Pattern Fluent API for complex layouts
Environment Detection Auto-adapts for NO_COLOR, CI, TERM=dumb
Export Formats HTML, PNG, WebP, GIF with full emoji support
22 Built-in Templates Ready-to-use UI patterns

Documentation

Guide Description
Python API Complete API reference — builders, effects, themes, export
Declarative Guide JSON/YAML configuration for config-driven UIs
Jinja2 Templates Dynamic templates with loops and filters
Visual Gallery Screenshots and animated demos
Migration Guide Upgrading from earlier versions
Developer Guide Architecture and contributing

Quick Links


Support

Platform Link
GitHub Sponsors github.com/sponsors/ksokolowski
Ko-fi ko-fi.com/styledconsole

Apache License 2.0 — Built on Rich, PyFiglet, and emoji.

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

styledconsole-0.10.0.tar.gz (860.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

styledconsole-0.10.0-py3-none-any.whl (233.3 kB view details)

Uploaded Python 3

File details

Details for the file styledconsole-0.10.0.tar.gz.

File metadata

  • Download URL: styledconsole-0.10.0.tar.gz
  • Upload date:
  • Size: 860.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for styledconsole-0.10.0.tar.gz
Algorithm Hash digest
SHA256 099fdaacdd26b06cf340dfe6d45c6deab53d5640bc98133d96a33403b192068b
MD5 35cc14b9f92f5a65e589c6b0cc72a1e0
BLAKE2b-256 5c3e1addea3d361a0a1f79905830ad0b9007dae7fe31d372c25edd9ae414e23c

See more details on using hashes here.

Provenance

The following attestation bundles were made for styledconsole-0.10.0.tar.gz:

Publisher: publish.yml on ksokolowski/StyledConsole

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file styledconsole-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: styledconsole-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 233.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for styledconsole-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db7e7f0c28c24c88937c93e0ff3f6104c6ea4d2bd2614d45cbc1889d32cb9b8c
MD5 1df6d69f6fd06d83f7fa30fb14fdd44c
BLAKE2b-256 c3fbb97e4b751f382f2736f5012f5c0d1ad83733c7ae3fd32e31335eb3dd2cba

See more details on using hashes here.

Provenance

The following attestation bundles were made for styledconsole-0.10.0-py3-none-any.whl:

Publisher: publish.yml on ksokolowski/StyledConsole

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page