A curated collection of production-ready Python utility functions designed to streamline daily development tasks. This library focuses on performance, type safety, and minimizing boilerplate code for common engineering challenges.
- Data Transformation: Robust serialization helpers for nested dictionaries and high-performance JSON processing.
- Time Utilities: Simplified timezone-aware conversions and human-readable duration formatting.
- File I/O: Streamlined context managers for batch file processing with built-in checksum verification.
- Type-Safe Helpers: A set of strict validators and data-sanitization patterns for consistent API request handling.
Install the package directly from PyPI:
pip install python-utils-24For local development or manual installation, clone the repository and run:
git clone https://github.com/Developer/python-utils-24.git
cd python-utils-24
pip install -e .Easily integrate shared utilities into your existing workflow:
from pyutils import time_format, file_manager
# Convert seconds to human-readable strings
uptime = time_format.to_human(3665)
print(f"Server Uptime: {uptime}")
# Safely read and sanitize JSON data
data = file_manager.read_json("config.json", validate=True)
print(data.get("api_key"))We welcome contributions! Please open an issue to discuss proposed changes or submit a pull request for existing features. Ensure all new code adheres to the PEP 8 standard and includes accompanying unit tests.
Distributed under the MIT License. See LICENSE for more information.