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 (Windows/Linux compatible).
-
wait_for_key(): pauses execution until the user presses a key.
/----------------------------------------------------------------------------------------------------/
Structure Utilities (structure)
Tools for building structures in console applications:
-
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 styled 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).
/----------------------------------------------------------------------------------------------------/
Installation
pip install tui_utilities
/----------------------------------------------------------------------------------------------------/
Update
pip install -U tui_utilities
Project details
Release history Release notifications | RSS feed
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 tui_utilities-1.0.3.tar.gz.
File metadata
- Download URL: tui_utilities-1.0.3.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc399cc4f26243940999b4117e68c703c55e185c7a1171897ce66761cf58d581
|
|
| MD5 |
29c387bda4357f24c4b4e7cd6c481db9
|
|
| BLAKE2b-256 |
67789eefa04f8f6c9a673cfea7e857edceb79977b923fcbb7c6f17c5a2ee91ac
|
File details
Details for the file tui_utilities-1.0.3-py3-none-any.whl.
File metadata
- Download URL: tui_utilities-1.0.3-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b2c25d6c577e5ddb2266542cf966bf7203bb4ead85da17bc440eaadd220c50a
|
|
| MD5 |
45aa84e2776e4f4b0d8490e06aedb602
|
|
| BLAKE2b-256 |
b516b1a0f7788b1db6cd7b563268a7d096f37dfe5654a691821ec0858e0e65e9
|