Skip to main content
Chromite

Chromite

GitHub release GitHub license Pypi downloads Commit activity Repo size GitHub All Releases

✨ About

Chromite is a lightweight, zero-dependency Python library for building rich terminal user interfaces (TUI). It offers an elegant, object-oriented toolkit for styling output, handling interactive input, and rendering custom UI components.

An optimized library that simplifies writing code and helps with the tasks provided.

📦 Installation

pip install Chromite

From source

git clone https://github.com/NastyaNoTamashii/Chromite
cd Chromite
pip install -e .

🚀 Quick start

from Chromite import Color, Style, Write

Write("Hello, Chromite!", compose=[Color.Green, Style.Bold]).display()

🎨 Inline markup

Use $style$ for colors/styles and :emoji: for emoji right inside the text. $reset$ clears everything.

from Chromite import Write

Write("$bold$Build passed$reset$ :white_check_mark: $hex#FFFF00$2 warnings$reset$ :warning:").display()
Write("$bg_red$$white$ ERROR $reset$ disk is full").display()

🌈 Colors

from Chromite import Color, ColorBG, Write

Write("From HEX", compose=Color.hex("#ff5733")).display()
Write("Red background", compose=ColorBG.Red).display()
Write("256-color palette", compose=Color.x256(208)).display()

📋 Lists

from Chromite import List, Color, Style

List.numbered(
    ["Install", "Import", "Enjoy"],
    compose=Color.Cyan,
    bullet_compose=Style.Bold,
).display()

List.pointed(["fast", "no dependencies"], bullet="→", bullet_compose=Color.Green).display()

📊 Tables

from Chromite import Table

table = Table(style = Chromite.TableStyle.Rounded)

table.add_column("Name", compose=Color.Gold)
contacts = table.add_column("Contacts :tada:")
table.add_column("Email", parent=contacts)
chats = table.add_column("Messengers", parent=contacts)
table.add_column("Telegram", parent=chats)
table.add_column("WhatsApp", parent=chats)
table.add_column("Age", align="right")

table.add_row("Oleg", "oleg@gmail.com", "@oleg", "+38(098)000-00-00", 25, compose=Color.Red)
table.add_row("Natalka", "natalka@outlook.com", "@natalka", None, 31)

table.display()
╭─────────┬────────────────────────────────────────────────────┬─────╮
│         │                    Contacts 🎉                     │     │
│         ├─────────────────────┬──────────────────────────────┤     │
│  Name   │                     │          Messengers          │ Age │
│         │        Email        ├──────────┬───────────────────┤     │
│         │                     │ Telegram │     WhatsApp      │     │
├─────────┼─────────────────────┼──────────┼───────────────────┼─────┤
│ Oleg    │ oleg@gmail.com      │ @oleg    │ +38(098)000-00-00 │  25 │
│ Natalka │ natalka@outlook.com │ @natalka │                   │  31 │
╰─────────┴─────────────────────┴──────────┴───────────────────┴─────╯

⌨️ Input

from Chromite import Read, Color

name = Read("Your name > ", compose=Color.Blue, value_compose=Color.LightBlue).execute()
pin = Read("PIN > ", type="pin").execute() # also: "password", "hidden", "int"

print(f"Hi {name}!")


If a feature doesn't work, check if your console supports it.


Any question? Contact me in discord uwawuwa

Made with ❤️ by NastyaNoTamashii

⬆ Back to top

Metadata

Release files for Chromite 0.6.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Chromite 0.6.7
File Size Uploaded
chromite-0.6.7.tar.gz 43.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Chromite 0.6.7
File Interpreter ABI Platform
chromite-0.6.7-py3-none-any.whl Python 3 none any Details

Total release size: 91.4 kB

Release files / chromite-0.6.7.tar.gz

Download URL chromite-0.6.7.tar.gz
Size 43.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c716b6cdaa911bd340ddffd8569fa5d3d8cc67d2525f560060999e9751eb82e6
BLAKE2b-256 checksum
How to use checksums
ab8649f7c554b33d39856ee25348834e87986bad16bdf8c0d441697eca0f2d37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / chromite-0.6.7-py3-none-any.whl

Download URL chromite-0.6.7-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
879815b7a22d6ce7f18f66e17940181838f596307d5e1996c216f0062bada5ce
BLAKE2b-256 checksum
How to use checksums
82108db7f0aae22d6960a66073750194fc8874a87d7534d3d88f83c26e246b6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.6.7 This release

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.3

2 release files

0.6.1

2 release files

0.6.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page