Skip to main content

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:

  1. clearing screen
  2. seperating screen
  3. spacing

Text Tools

Simple but practical utilities:

  1. wrapping
  2. alignment
  3. tokenization helpers

List Tools

Operations on sequences:

  1. flattening
  2. grouping
  3. chunking
  4. transformations

Logic Tools

Small logic helpers:

  1. truth checks
  2. implication evaluation
  3. safe comparisons

Time & Zone Tools

Timezone-aware utilities using packaged JSON tzdata:

  1. Africa, America, Asia, Europe, Pacific, Australia
  2. zone alias resolution
  3. offset lookup
  4. conversions
  5. formating to fuzzy human-readable

Quick Start

  1. Console
from tuikit.console import clear

print("Hello World")
clear(sleep=2) # clears screen after 2 seconds
  1. 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))
  1. 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!")
  1. 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:

  1. force a full TUI framework,
  2. over-abstract simple tasks,
  3. or hide logic behind globals.

This toolkit does the opposite:

  1. explicit imports
  2. predictable functions
  3. small focused modules
  4. 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

tuikit-0.1.2.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

tuikit-0.1.2-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file tuikit-0.1.2.tar.gz.

File metadata

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

File hashes

Hashes for tuikit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 37f7028640a8b2aa19b616666e29d415b3083ef495e444708714c6ecb1f05aae
MD5 d7712f7ad572e836d6479e1348f99d2b
BLAKE2b-256 67a1f47c41fc32eb5ca29f886d2b2c67c6eeac7ff617246352d52c6bdeab5a66

See more details on using hashes here.

Provenance

The following attestation bundles were made for tuikit-0.1.2.tar.gz:

Publisher: publish.yml on 2kDarki/TUI-Toolkit

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

File details

Details for the file tuikit-0.1.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for tuikit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b8a9d3f394a9830332c5022b7b4eea00c9ffd20695c3e37ab8ea4ab878fbdebb
MD5 7d9c926350c3335f0469d2cfa42c222e
BLAKE2b-256 c37e716004e7d97cbc307705088cc7ab20f537077d6b4d213e31f88057bb52ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for tuikit-0.1.2-py3-none-any.whl:

Publisher: publish.yml on 2kDarki/TUI-Toolkit

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