Skip to content

Repository files navigation

python-utils-42

License: MIT

A collection of focused Python utilities that handle common development tasks without heavy dependencies. The library emphasizes reliability, minimal overhead, and straightforward APIs for everyday scripting and application development.

Features

  • Configuration loader supporting JSON, YAML, and environment variable overrides
  • Atomic file writing with automatic backup creation
  • Human-readable formatting for byte sizes and durations
  • Retry decorator with configurable attempts and exponential backoff

Installation

pip install python-utils-42

For the latest development version:

pip install git+https://github.com/Developer/python-utils-42.git

Usage

from python_utils_42 import load_config, format_bytes, retry

config = load_config("settings.yaml", env_prefix="APP_")

print(format_bytes(1536000))  # "1.46 MB"

@retry(attempts=3, backoff=1.5)
def fetch_data():
    ...

License

This project is licensed under the MIT License.

About

Performance and utility tools for general

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages