Simple Python utility functions to save and load data
Project description
utilitz
utilitz is a versatile Python utility library designed to simplify common tasks such as data persistence, Excel table manipulation, system automation, and advanced pattern matching.
It is built with a modular approach, keeping the core library lightweight while providing powerful specialized modules through optional dependencies.
🚀 Installation
Core (Lightweight)
Installs only the essential utilities for text, JSON, and object serialization.
pip install utilitz
With Specialized Modules
Install specific modules as needed to keep your environment lean:
# For Excel and Dataframe support
pip install utilitz[office]
# For GUI automation and Activity monitoring
pip install utilitz[gui]
# For Encryption and Decryption
pip install utilitz[crypto]
# Install everything
pip install utilitz[all]
✨ Key Features
📁 Core IO Utilities
Simple functions for saving and loading data without boilerplates.
save_text/load_text: Handle lists of strings.save_json/load_json: Work with dictionary and list structures.save_object/load_object: Convenient pickle serialization.
📊 Excel & Data (Optional: [office])
read_excel_table: Intelligently reads tables from Excel files, with support for row filtering based on regex patterns and dynamic range detection.encode_column/decode_column: Convert between Excel column names (e.g., "A", "AB") and numeric indices.
🛡️ Crypto (Optional: [crypto])
encrypt/decrypt: Secure data usingcryptography(Fernet) with password-based key derivation (PBKDF2).
🖥️ System & GUI (Optional: [gui])
monitor_keep_alive: Prevent system sleep by simulating activity when no user input is detected.MonitorActivity: A simple class to track keyboard and mouse events.
🔍 Advanced Regex (utilitz.regex)
- A specialized framework for building complex, readable, and reusable regex patterns with built-in decoding for common types like integers, decimal numbers, currencies, and dates.
🗺️ Path Management (utilitz.path)
locate_project: Easily find and set the project root directory.set_source: Dynamically managesys.pathentries.
🛠 Usage Examples
Reading an Excel Table
from utilitz.excel import read_excel_table
# Read a table from an Excel file starting from column A
# and filtering rows that match a specific pattern.
df = read_excel_table("data.xlsx", checkcol="A", patterncol=r"^\d+")
Encrypting Data
from utilitz.crypto import encrypt, decrypt
secret = "My secret message"
password = "strong-password"
encrypted = encrypt(secret, password)
original = decrypt(encrypted, password)
Keeping the System Awake
from utilitz.sys import monitor_keep_alive
# Press 'ctrl' every 60 seconds if no activity is detected
monitor_keep_alive(seconds=60, key='ctrl')
📄 License
This project is licensed under the GNU General Public License v3 (GPLv3).
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 utilitz-0.8.0.tar.gz.
File metadata
- Download URL: utilitz-0.8.0.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f99e4b72f7f2415dea0800f46d8df13ff5450bfa6a666d61a4e31a854288bc9e
|
|
| MD5 |
f67b435e0193f835755663e25db718b9
|
|
| BLAKE2b-256 |
e55677b9b0c6b8883c6653de575631f98a185778c17940914be98b356e5a39cc
|
File details
Details for the file utilitz-0.8.0-py3-none-any.whl.
File metadata
- Download URL: utilitz-0.8.0-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38ee8da26219a3967fc3d63746d516e124d2f22b216e46dac5e6df291b52130a
|
|
| MD5 |
f20de3991dc23935c9d1a46caf5100e4
|
|
| BLAKE2b-256 |
bbe91c7d0aaad61dfadcd07870a99027345bfafc74bccc6d8fbd76f93e5d3040
|