Skip to main content

Personal-use graphical utilities library

Project description

GUI Utilities

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


Purpose

This library is designed for graphical applications that need:

  • Clean UI
  • Structured Spanish-language user interaction
  • Robust validation
  • Consistent formatting

Requirements

Dependencies

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

  • PyQt6 (6.0.0 or higher)
  • requests (2.25.0 or higher)

Python version

Python (3.9 or higher)

Operating System

Any of the following:

  • Windows (10, version 1809 or higher)
  • Linux (any modern distribution with glibc 2.34 or higher)
  • MacOS (10.14 or higher)

Google Colaboratory support

Most of this library is not compatible with Google Colaboratory, since PyQt6 graphical windows cannot run in a headless environment. However, the following modules are fully compatible:

  • Formatting Helpers (format): the entire module.
  • Input Validation (validation): the entire module except "validate_email()".
  • System Utilities (system): "get_resources_path()" only.

Features

Core Utilities (core)

Foundational functions for window management and instance control:

  • window(): creates a base window already configured with layout and initial styles.
  • switch_instance(): dynamically switches the active window instance with a new one.
  • clear_layout(): recursively clears and deletes all widgets within a layout.
  • switch_content_widget(): dynamically switches the content of the main window's internal widget.

Structure Utilities (structure)

Tools for building UI elements and structures in graphical applications:

  • menu(): creates interactive selection menus with header, scrolling, and custom buttons.
  • header(): creates a styled header layout, consisting of a title and a separator.
  • title(): creates customized titles for windows or menus.
  • label(): creates customized text labels with rich HTML formatting options.
  • button(): creates customized interactive buttons with hover and pressed styles.
  • text_box(): creates customized text inputs with placeholder text and password visibility toggles.
  • combo_box(): creates customized drop-down lists with rich text formatting.
  • check_box(): creates customized checkboxes with styled indicators.
  • table(): creates personalized tables with easy introduction of fully-styled columns and rows (with responsive resizing).

Dialogs Utilities (dialogs)

Pop-up and modal dialog management:

  • information_message_box(): creates customized information dialog boxes.
  • confirmation_message_box(): creates customized confirmation dialog boxes.
  • confirm_exit(): creates a confirmation dialog that exits the program safely (uses confirmation_message_box()).

Input Validation (validation)

Interactive validation utilities using UI dialogs for user input:

  • check_if_list_is_empty(): checks if a list is empty and displays an error dialog if it is.
  • validate_option(): validates user selection from a list of options.
  • validate_string(): ensures non-empty string input.
  • validate_integer(): validates integers (uses Continental European numeric format) with optional range validation through an advanced syntax (syntax example: "(-infinity; 0] | 5 | [10; infinity)").
  • validate_double(): validates decimal numbers (uses Continental European numeric format) with support for fractions and mathematical constants ("pi", "e", "tau", "phi") and optional range validation through an advanced syntax (syntax example: "(-infinity; 0,1] | 1/3 | [pi; infinity)").
  • validate_date_time(): validates date and time input (uses Continental European date format with 24-hour time) with selectable year, time and second inclusion.
  • 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.
  • date_time_format(): formats datetime objects (uses Continental European date format with 24-hour time) with automatic or custom year, time and second inclusion.
  • id_format(): formats Argentinian national ID numbers.
  • cellphone_number_format(): formats cellphone numbers (uses Argentinian format).
  • html_expression_format(): formats plain-text mathematical expressions (like fractions or superscripts) into HTML code for rich text rendering.
  • convert_to_double(): converts string numbers (with Continental European format) into Python floats.
  • define_equality_symbol(): returns the equality (=) or approximation (≅) symbol depending on if the number has rounding precision constraints.

System Utilities (system)

Helpers for interacting with the operating system graphical environment:

  • get_responsive_width(): calculates a responsive width based on screen size to maintain an adaptive UI.
  • get_resources_path(): returns the absolute path to a resource file, regardless of whether the program is running as a script in an IDE or as an executable.

Installation

pip install gui_utilities


Update

pip install -U gui_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

gui_utilities-1.8.0.tar.gz (55.5 kB view details)

Uploaded Source

Built Distribution

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

gui_utilities-1.8.0-py3-none-any.whl (53.5 kB view details)

Uploaded Python 3

File details

Details for the file gui_utilities-1.8.0.tar.gz.

File metadata

  • Download URL: gui_utilities-1.8.0.tar.gz
  • Upload date:
  • Size: 55.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gui_utilities-1.8.0.tar.gz
Algorithm Hash digest
SHA256 aac8454a23399fd38e24e5be04193b44417d344ae6563f9bc988dcc5246c5815
MD5 4c00a74993a254d7cd349c72f5a39baa
BLAKE2b-256 c2bc9e5efa6acaac109a2d9df89117855e76622590c9ef64cd7b47bf01f0e17c

See more details on using hashes here.

File details

Details for the file gui_utilities-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: gui_utilities-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 53.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gui_utilities-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f84522953ef661dee157d2cbc9fe3e41780c1d00126958fc55297832121dca63
MD5 98049bce3fa9cb06272a33a4b03f50de
BLAKE2b-256 0d5c45d13c989a0456c6478dff42fb108b7f14018343e064a6ce6dcd3170cade

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