Simple light-weight Python library with handy for every day use decorators
Project description
Decorify
Python Library for decorators
Decorify is a lightweight Python library without any dependencies that offers a collection of simple, reusable decorators to enhance your functions. These decorators cover common use cases like logging, timing, retrying, and more.
Installation
Install Decorators via pip:
pip install decorify
Features
Basic
- timeit: Measures the execution time of a function
- grid_search: Preforms a grid search on passed arguments
Iterative
- retry: Automatically retries a function if it raises an exception, with specified numer of maximal tries
- loop: Runs the function n times and returns list of values
- average: Automaticly calulates avrerage from n runs of a function
Exceptions
- default_value: Assigns a default value to the function
- validate_typehints: Checks if all the typehits passed to the function are of correct type
Plotting (matplotlib)
- plot_multiple: Creates a plot of a function's return values
- plot_single: Creates a plot of a function's return
Contributing
Contributions are welcome! Please submit a pull request or open an issue to add new decorators or suggest improvements.
License
This project is licensed under the Apache v2.0 License.
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 decorify-0.1.1.tar.gz.
File metadata
- Download URL: decorify-0.1.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
533501d8540e7ca9ac45c5d5f4b890731729a48af004dd13696654c42aec1203
|
|
| MD5 |
a5ca7349b6e98f9793022e70c0a4e297
|
|
| BLAKE2b-256 |
ba94dad545316cccd288475ab377bd058f953f15edbbf5dd034add85066e1a4d
|
File details
Details for the file decorify-0.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: decorify-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b994704fad17a46a73343e0bb29bf30a29a4cbde3ff7991013e4d90e6984ad49
|
|
| MD5 |
7f7cee676fe57f61fea064922c647d16
|
|
| BLAKE2b-256 |
8615d5df951000d54158f37594f208e9e5826dfbb3dee458f15160a8b30bd3a2
|