Lightweight TUI utilities: console, text, lists, timezones and logic helpers.
Project description
TUI-Toolkit
A compact set of terminal-focused utilities: console helpers, text processing, list tools, logic evaluators, and timezone utilities backed by bundled JSON tzdata.
Designed as a library, not a framework. No global state, no magic, no TUI “engine”—just focused primitives.
Installation
pip install tuikit
Features
Console Utilities
Structured terminal output helpers:
- clearing screen
- seperating screen
- spacing
Text Tools
Simple but practical utilities:
- wrapping
- alignment
- tokenization helpers
List Tools
Operations on sequences:
- flattening
- grouping
- chunking
- transformations
Logic Tools
Small logic helpers:
- truth checks
- implication evaluation
- safe comparisons
Time & Zone Tools
Timezone-aware utilities using packaged JSON tzdata:
- Africa, America, Asia, Europe, Pacific, Australia
- zone alias resolution
- offset lookup
- conversions
- formating to fuzzy human-readable
Quick Start
- Console
from tuikit.console import clear
print("Hello World")
clear(sleep=2) # clears screen after 2 seconds
- Lists
from tuikit.listools import flatten
nested = [1, [2, 3, [4, 5, 6], [7], 8], [9]]
flat = flatten(nested)
```Text
from tuikit.textools import wrap
print(wrap("Long text here...", width=40))
- Logic
from tuikit.logictools import any_in
nested = [1, [2, 3, [4, 5, 6], [7], 8], [9]]
a_list = ["Hello", "World", "by Darki", 2, 5]
if any_in(a_list, eq=nested):
print("Hell yeah!")
- Time & Zones
from tuikit.zonetools import Timezone
from tuikit.timetools import timestamp
from datetime import datetime
zone = Timezone("Africa/Harare")
print(zone.offset)
now = datetime.now().isoformat()
print(timestamp(now))
Package Structure
tuikit/ console.py exceptions.py listools.py logictools.py textools.py timetools.py zonetools.py tzdata/ Africa.json America.json ...
Why This Exists
Most libraries either:
- force a full TUI framework,
- over-abstract simple tasks,
- or hide logic behind globals.
This toolkit does the opposite:
- explicit imports
- predictable functions
- small focused modules
- timezone data bundled locally
License
MIT. See LICENSE for more 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 tuikit-0.2.3.tar.gz.
File metadata
- Download URL: tuikit-0.2.3.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d547bf6b1c2bc2d5611463e03360b694cadf7e2a2fd45960426239910868e8
|
|
| MD5 |
c779436e45ba8ddcd27bce40391d7d8e
|
|
| BLAKE2b-256 |
b8f8f82bac8204808d08bc6ff133ced6ddcd66919a41ed9229b67fe2baf23446
|
Provenance
The following attestation bundles were made for tuikit-0.2.3.tar.gz:
Publisher:
publish.yml on 2kDarki/TUI-Toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tuikit-0.2.3.tar.gz -
Subject digest:
97d547bf6b1c2bc2d5611463e03360b694cadf7e2a2fd45960426239910868e8 - Sigstore transparency entry: 761504938
- Sigstore integration time:
-
Permalink:
2kDarki/TUI-Toolkit@d7e344e1756cc089c1c3c6fee4e1f5ce94681b66 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/2kDarki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d7e344e1756cc089c1c3c6fee4e1f5ce94681b66 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tuikit-0.2.3-py3-none-any.whl.
File metadata
- Download URL: tuikit-0.2.3-py3-none-any.whl
- Upload date:
- Size: 29.8 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 |
07bf522b58e96e01a26cab85bb65b0ce465cd1c10eb3251c390436abf8c1bf14
|
|
| MD5 |
af8579ac98302d8a7ee828cc8f2762bf
|
|
| BLAKE2b-256 |
c597db519f54aa6371e318e96de62d97e81197b988874c4c08798443636d28cf
|
Provenance
The following attestation bundles were made for tuikit-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on 2kDarki/TUI-Toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tuikit-0.2.3-py3-none-any.whl -
Subject digest:
07bf522b58e96e01a26cab85bb65b0ce465cd1c10eb3251c390436abf8c1bf14 - Sigstore transparency entry: 761504944
- Sigstore integration time:
-
Permalink:
2kDarki/TUI-Toolkit@d7e344e1756cc089c1c3c6fee4e1f5ce94681b66 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/2kDarki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d7e344e1756cc089c1c3c6fee4e1f5ce94681b66 -
Trigger Event:
push
-
Statement type: