larztui
Pretty terminal UI — panels, tables and rules — zero dependencies.
A small, rich-style toolkit for good-looking terminal output with no dependency.
Everything is width-aware: it measures the visible width (ignoring ANSI
colour codes) so columns line up even when cells are styled — and it degrades
gracefully, switching colour off automatically when output isn't a terminal or
NO_COLOR is set.
Install
pip install larztui
Use
from larztui import panel, table, rule, style, columns
print(rule("Report"))
print(table(["Name", "Score"], [["Ada", "99"], ["Bob", "5"]],
aligns=["left", "right"], header_style={"bold": True}))
print(panel("All systems go.", title="Status", box="rounded"))
print(style("done", fg="green", bold=True))
──────────────────────── Report ─────────────────────────
┌───────┬───────┐
│ Name │ Score │
├───────┼───────┤
│ Ada │ 99 │
│ Bob │ 5 │
└───────┴───────┘
Tests
python -m unittest discover -s tests -v # 17 tests
The Larz stack
One of 60+ pure-Python, zero-dependency libraries at github.com/larz-scripter. Complements larzprogress (bars/spinners) and larzcli.
License
MIT (c) larz-scripter
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 larztui-0.1.0.tar.gz.
File metadata
- Download URL: larztui-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1656b303d2b379f53319669d878bbef552421c2eeb5913a4e5cad1f90b35033b
|
|
| MD5 |
4d6eca46c99620896601c6e45e18c9d3
|
|
| BLAKE2b-256 |
cd12dd830c84bad5491b828b2658207b1ba6adfc3523594fce9af789e7e0a7b4
|
File details
Details for the file larztui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: larztui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57a51b5138ff72c2a6b59f52eec6c0959cf8e2010c1c2bcd2d80136287265db9
|
|
| MD5 |
a43e82489491154d397c56f981481dac
|
|
| BLAKE2b-256 |
a870b4357e1e61f8c83fbb7c3e68e3113d2eda20d06f73edca260f84632f6c14
|