tui-utilities 1.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: tui_utilities
3
+ Version: 1.0.10
4
+ Summary: Personal-use console utilities library
5
+ Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Topic :: Software Development :: Libraries
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: rich
14
+ Requires-Dist: readchar
15
+ Requires-Dist: requests
16
+
17
+ # TUI Utilities
18
+
19
+ Personal-use console utilities library providing styled terminal interaction, structured menus, robust input validation, formatting helpers, and Spanish-oriented user experience.
20
+
21
+ /----------------------------------------------------------------------------------------------------/
22
+
23
+ ## Purpose
24
+
25
+ This library is designed for console-based applications that need:
26
+
27
+ - Clean TUI
28
+
29
+ - Structured Spanish-language user interaction
30
+
31
+ - Robust validation
32
+
33
+ - Consistent formatting
34
+
35
+ /----------------------------------------------------------------------------------------------------/
36
+
37
+ ## Dependencies
38
+
39
+ Standard library modules are used where possible; only external dependencies are listed:
40
+
41
+ - rich
42
+
43
+ - readchar
44
+
45
+ - requests
46
+
47
+ /----------------------------------------------------------------------------------------------------/
48
+
49
+ ## Features
50
+
51
+ /----------------------------------------------------------------------------------------------------/
52
+
53
+ ### Console Utilities (console)
54
+
55
+ Styled terminal interaction built on rich:
56
+
57
+ - print(): styled print function built on rich, supporting text styles, alignment, padding, and per-segment styling.
58
+
59
+ - input(): styled input function built on rich, supporting text styles and automatically trimming whitespaces.
60
+
61
+ - clear_console(): clears the terminal screen (Windows/Linux compatible).
62
+
63
+ - wait_for_key(): pauses execution until the user presses a key.
64
+
65
+ /----------------------------------------------------------------------------------------------------/
66
+
67
+ ### Structure Utilities (structure)
68
+
69
+ Tools for building structures in console applications:
70
+
71
+ - menu(): creates interactive selection menus with automatic numbering and special options like "Go back" and "Exit".
72
+
73
+ - confirm_exit(): confirmation dialog that exits the program safely.
74
+
75
+ - separator(): prints a styled visual separator line.
76
+
77
+ - error_message(): displays formatted error information including:
78
+
79
+ - Custom message
80
+
81
+ - Exception details
82
+
83
+ - Full traceback
84
+
85
+ /----------------------------------------------------------------------------------------------------/
86
+
87
+ ### Input Validation (validation)
88
+
89
+ Interactive validation utilities for user input.
90
+
91
+ - check_if_empty(): checks if a list is empty and displays an error screen.
92
+
93
+ - validate_string(): ensures non-empty string input.
94
+
95
+ - validate_integer(): validates integers (uses Continental European numeric format).
96
+
97
+ - validate_double(): validates decimal numbers (uses Continental European numeric format).
98
+
99
+ - validate_date(): validates date and time input (uses Day–Month–Year date format with 24-hour time).
100
+
101
+ - validate_id(): validates Argentinian national ID numbers.
102
+
103
+ - validate_cellphone_number(): validates cellphone numbers (uses Argentinian format).
104
+
105
+ - 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).
106
+
107
+ /----------------------------------------------------------------------------------------------------/
108
+
109
+ ### Formatting Helpers (format)
110
+
111
+ Utilities for applying consistent formatting:
112
+
113
+ - decimal_format(): applies Continental European numeric formatting.
114
+
115
+ - id_format(): formats Argentinian national ID numbers.
116
+
117
+ - cellphone_number_format(): formats cellphone numbers (uses Argentinian format).
118
+
119
+ /----------------------------------------------------------------------------------------------------/
120
+
121
+ ## Installation
122
+
123
+ pip install tui_utilities
124
+
125
+ /----------------------------------------------------------------------------------------------------/
126
+
127
+ ## Update
128
+
129
+ pip install -U tui_utilities
@@ -0,0 +1,113 @@
1
+ # TUI Utilities
2
+
3
+ Personal-use console utilities library providing styled terminal interaction, structured menus, robust input validation, formatting helpers, and Spanish-oriented user experience.
4
+
5
+ /----------------------------------------------------------------------------------------------------/
6
+
7
+ ## Purpose
8
+
9
+ This library is designed for console-based applications that need:
10
+
11
+ - Clean TUI
12
+
13
+ - Structured Spanish-language user interaction
14
+
15
+ - Robust validation
16
+
17
+ - Consistent formatting
18
+
19
+ /----------------------------------------------------------------------------------------------------/
20
+
21
+ ## Dependencies
22
+
23
+ Standard library modules are used where possible; only external dependencies are listed:
24
+
25
+ - rich
26
+
27
+ - readchar
28
+
29
+ - requests
30
+
31
+ /----------------------------------------------------------------------------------------------------/
32
+
33
+ ## Features
34
+
35
+ /----------------------------------------------------------------------------------------------------/
36
+
37
+ ### Console Utilities (console)
38
+
39
+ Styled terminal interaction built on rich:
40
+
41
+ - print(): styled print function built on rich, supporting text styles, alignment, padding, and per-segment styling.
42
+
43
+ - input(): styled input function built on rich, supporting text styles and automatically trimming whitespaces.
44
+
45
+ - clear_console(): clears the terminal screen (Windows/Linux compatible).
46
+
47
+ - wait_for_key(): pauses execution until the user presses a key.
48
+
49
+ /----------------------------------------------------------------------------------------------------/
50
+
51
+ ### Structure Utilities (structure)
52
+
53
+ Tools for building structures in console applications:
54
+
55
+ - menu(): creates interactive selection menus with automatic numbering and special options like "Go back" and "Exit".
56
+
57
+ - confirm_exit(): confirmation dialog that exits the program safely.
58
+
59
+ - separator(): prints a styled visual separator line.
60
+
61
+ - error_message(): displays formatted error information including:
62
+
63
+ - Custom message
64
+
65
+ - Exception details
66
+
67
+ - Full traceback
68
+
69
+ /----------------------------------------------------------------------------------------------------/
70
+
71
+ ### Input Validation (validation)
72
+
73
+ Interactive validation utilities for user input.
74
+
75
+ - check_if_empty(): checks if a list is empty and displays an error screen.
76
+
77
+ - validate_string(): ensures non-empty string input.
78
+
79
+ - validate_integer(): validates integers (uses Continental European numeric format).
80
+
81
+ - validate_double(): validates decimal numbers (uses Continental European numeric format).
82
+
83
+ - validate_date(): validates date and time input (uses Day–Month–Year date format with 24-hour time).
84
+
85
+ - validate_id(): validates Argentinian national ID numbers.
86
+
87
+ - validate_cellphone_number(): validates cellphone numbers (uses Argentinian format).
88
+
89
+ - 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).
90
+
91
+ /----------------------------------------------------------------------------------------------------/
92
+
93
+ ### Formatting Helpers (format)
94
+
95
+ Utilities for applying consistent formatting:
96
+
97
+ - decimal_format(): applies Continental European numeric formatting.
98
+
99
+ - id_format(): formats Argentinian national ID numbers.
100
+
101
+ - cellphone_number_format(): formats cellphone numbers (uses Argentinian format).
102
+
103
+ /----------------------------------------------------------------------------------------------------/
104
+
105
+ ## Installation
106
+
107
+ pip install tui_utilities
108
+
109
+ /----------------------------------------------------------------------------------------------------/
110
+
111
+ ## Update
112
+
113
+ pip install -U tui_utilities
@@ -0,0 +1,27 @@
1
+ [project]
2
+ name = "tui_utilities"
3
+ version = "1.0.10"
4
+ description = "Personal-use console utilities library"
5
+ readme = "README.md"
6
+ license = {text = "MIT"}
7
+ authors = [{name = "Guido Iván Gross", email = "grossguidoivan@gmail.com"}]
8
+ requires-python = ">=3.8"
9
+ dependencies = ["rich", "readchar", "requests"]
10
+
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+ "Operating System :: OS Independent",
14
+ "Intended Audience :: Developers",
15
+ "Topic :: Software Development :: Libraries",
16
+ ]
17
+
18
+ [build-system]
19
+ requires = ["setuptools", "wheel"]
20
+ build-backend = "setuptools.build_meta"
21
+
22
+ [tool.setuptools]
23
+ packages = ["tui_utilities"]
24
+ include-package-data = true
25
+
26
+ [tool.setuptools.package-data]
27
+ tui_utilities = ["_tlds/tlds.txt"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,21 @@
1
+ from .console import print, input, clear_console, wait_for_key
2
+ from .structure import menu, confirm_exit, separator, error_message
3
+ from .validation import (
4
+ check_if_empty,
5
+ validate_string,
6
+ validate_integer,
7
+ validate_double,
8
+ validate_date,
9
+ validate_id,
10
+ validate_cellphone_number,
11
+ validate_email,
12
+ )
13
+ from .format import decimal_format, id_format, cellphone_number_format
14
+
15
+ __all__ = [
16
+ "print", "input", "clear_console", "wait_for_key",
17
+ "menu", "confirm_exit", "separator", "error_message",
18
+ "check_if_empty", "validate_string", "validate_integer", "validate_double",
19
+ "validate_date", "validate_id", "validate_cellphone_number", "validate_email",
20
+ "decimal_format", "id_format", "cellphone_number_format",
21
+ ]