A curated collection of production-ready Python utility functions designed to streamline daily development tasks. This library focuses on performance, readability, and minimizing boilerplate code for common data manipulation and system operations.
- Robust File Operations: Simplified wrappers for recursive directory traversal and atomic file writing with automated backups.
- Performance Decorators: Lightweight decorators for function execution timing and memory-efficient caching strategies.
- Data Validation: A flexible set of schema-less validation helpers for nested JSON structures and environment variables.
- String Sanitization: Optimized text cleaning utilities for handling irregular whitespace, Unicode normalization, and pattern-based redaction.
Install the package via pip:
pip install python-utils-24For development or local testing, clone the repository and install dependencies:
git clone https://github.com/Developer/python-utils-24.git
cd python-utils-24
pip install -r requirements.txtEasily integrate core utilities into your scripts to reduce repetitive code:
from pyutils24.file_ops import atomic_write
from pyutils24.decorators import time_execution
@time_execution
def process_data(data):
# Process your data efficiently
return [d.strip().lower() for d in data]
# Write to file safely
atomic_write("output.txt", "Task completed successfully.")Distributed under the MIT License. See LICENSE for more information.