Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decorify-0.1.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decorify-0.1.1-py2.py3-none-any.whl (10.4 kB view details)

Uploaded Python 2Python 3

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

Hashes for decorify-0.1.1.tar.gz
Algorithm Hash digest
SHA256 533501d8540e7ca9ac45c5d5f4b890731729a48af004dd13696654c42aec1203
MD5 a5ca7349b6e98f9793022e70c0a4e297
BLAKE2b-256 ba94dad545316cccd288475ab377bd058f953f15edbbf5dd034add85066e1a4d

See more details on using hashes here.

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

Hashes for decorify-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b994704fad17a46a73343e0bb29bf30a29a4cbde3ff7991013e4d90e6984ad49
MD5 7f7cee676fe57f61fea064922c647d16
BLAKE2b-256 8615d5df951000d54158f37594f208e9e5826dfbb3dee458f15160a8b30bd3a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page