python-utils-50 is a curated collection of high-performance Python utility functions designed to streamline repetitive coding tasks. This library focuses on efficiency and readability, providing ready-to-use snippets for data processing, file handling, and system automation.
- Robust File Operations: Advanced wrappers for bulk file renaming, path validation, and recursive directory synchronization.
- Performance Decorators: Built-in tools for function execution timing and multi-level caching to optimize heavy computation.
- Data Transformation: Efficient helpers for flattening nested JSON structures and converting complex objects into standard formats.
- System Diagnostics: Utilities for retrieving hardware metadata, network connectivity status, and cross-platform environmental variables.
Install the package via pip:
pip install python-utils-50For development mode, clone the repository and run:
git clone https://github.com/Developer/python-utils-50.git
cd python-utils-50
pip install -e .Import the required modules to leverage the utility set:
from pyutils50.file_ops import bulk_rename
from pyutils50.decorators import timer
@timer
def process_data():
# Example: Rename all .txt files to .log in a directory
bulk_rename("./logs", old_ext=".txt", new_ext=".log")
if __name__ == "__main__":
process_data()Distributed under the MIT License. See LICENSE for more information.