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.0.tar.gz (8.3 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.0-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file decorify-0.1.0.tar.gz.

File metadata

  • Download URL: decorify-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 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.0.tar.gz
Algorithm Hash digest
SHA256 34cf8599ef8100fe3dd98c53c5ebf6cafaa5da1cb151d37a82a6c9768ee99966
MD5 b0d29b631962fe7e475dd19e028f1ffe
BLAKE2b-256 7f125be310448a2f06da9dcb2fda6f0192613e1f57667b9b1b282d971ceb1b63

See more details on using hashes here.

File details

Details for the file decorify-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: decorify-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 72e109d2666b70c8468ba10800a259c280009ea70d5e6cc068fd924c9863d0d2
MD5 0b0233ac659be7e3b8f4b46c671dad92
BLAKE2b-256 26d86b5c537f49756af4563c1d0baf702aab8a420b41bc9ca1f41a54517d76a3

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