Skip to main content

Personal-use console utilities library

Project description

TUI Utilities

Personal-use console utilities library providing styled terminal interaction, structured menus, robust input validation, formatting helpers, and Spanish-oriented user experience.

/----------------------------------------------------------------------------------------------------/

Purpose

This library is designed for console-based applications that need:

  • Clean TUI

  • Structured Spanish-language user interaction

  • Robust validation

  • Consistent formatting

/----------------------------------------------------------------------------------------------------/

Dependencies

Standard library modules are used where possible; only external dependencies are listed:

  • rich

  • readchar

  • requests

/----------------------------------------------------------------------------------------------------/

Features

/----------------------------------------------------------------------------------------------------/

Console Utilities (console)

Styled terminal interaction built on rich:

  • print(): styled print function built on rich, supporting text styles, alignment, padding, and per-segment styling.

  • input(): styled input function built on rich, supporting text styles and automatically trimming whitespaces.

  • clear_console(): clears the terminal screen.

  • wait_for_key(): pauses execution until the user presses a key.

/----------------------------------------------------------------------------------------------------/

Structure Utilities (structure)

Tools for building structures in console applications:

  • header(): prints a styled header, consisting of a title and a separator.

  • menu(): creates interactive selection menus with automatic numbering and special options like "Go back" and "Exit".

  • confirm_exit(): confirmation dialog that exits the program safely.

  • separator(): prints a fully-personalized visual separator line.

  • error_message(): displays formatted error information including:

    • Custom message

    • Exception details

    • Full traceback

/----------------------------------------------------------------------------------------------------/

Input Validation (validation)

Interactive validation utilities for user input.

  • check_if_empty(): checks if a list is empty and displays an error screen.

  • validate_string(): ensures non-empty string input.

  • validate_integer(): validates integers (uses Continental European numeric format).

  • validate_double(): validates decimal numbers (uses Continental European numeric format).

  • validate_date(): validates date and time input (uses Day–Month–Year date format with 24-hour time).

  • validate_id(): validates Argentinian national ID numbers.

  • validate_cellphone_number(): validates cellphone numbers (uses Argentinian format).

  • validate_email(): validates e-mail addresses using an official TLDs list (from IANA's website) or syntax fallback (in case of not having an internet connection or a locally imported list of TLDs).

/----------------------------------------------------------------------------------------------------/

Formatting Helpers (format)

Utilities for applying consistent formatting:

  • decimal_format(): applies Continental European numeric formatting.

  • id_format(): formats Argentinian national ID numbers.

  • cellphone_number_format(): formats cellphone numbers (uses Argentinian format).

/----------------------------------------------------------------------------------------------------/

System Utilities (system)

Helpers for interacting with the operating system console environment:

  • set_window_title(): sets the console window title.

  • maximize_window(): maximizes the console window.

  • set_locale(): configures the process locale for number, date, and cultural formatting.

/----------------------------------------------------------------------------------------------------/

Installation

pip install tui_utilities

/----------------------------------------------------------------------------------------------------/

Update

pip install -U tui_utilities

Project details


Release history Release notifications | RSS feed

This version

1.1.8

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tui_utilities-1.1.8.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

tui_utilities-1.1.8-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file tui_utilities-1.1.8.tar.gz.

File metadata

  • Download URL: tui_utilities-1.1.8.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tui_utilities-1.1.8.tar.gz
Algorithm Hash digest
SHA256 0d449ad6f247609b5cbbec4b6a6d4f19d2e287848eaa4b33e2602199e526adc0
MD5 7bf44af8a0aed271d5f9665a33da0014
BLAKE2b-256 25014bc64ecce88572690c404dae255cbbdbb5d20c75a7c2b8ab27d98bb0985a

See more details on using hashes here.

File details

Details for the file tui_utilities-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: tui_utilities-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tui_utilities-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a173622e041be222b58b9878ad2eb5cd4573a3feb7c03f5c59a69b1428cd6b26
MD5 1f7af450016ccf04dd2eea4663c68e04
BLAKE2b-256 fb6944d3b184b5588b7cf12b525033a8bccdf1d12223e3a6346921eb2ecf5048

See more details on using hashes here.

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