An open API service indexing awesome lists of open source software.

https://github.com/alexzajac/decorpy

Collection of simple decorators in Python.
https://github.com/alexzajac/decorpy

debug decorators python time typing

Last synced: about 2 months ago
JSON representation

Collection of simple decorators in Python.

Awesome Lists containing this project

README

        

# Decorpy

![Travis](https://travis-ci.org/alexZajac/decorpy.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/alexZajac/decorpy/badge.svg)](https://coveralls.io/github/alexZajac/decorpy)
[![Updates](https://pyup.io/repos/github/alexZajac/decorpy/shield.svg)](https://pyup.io/repos/github/alexZajac/decorpy/)
[![Python 3](https://pyup.io/repos/github/alexZajac/decorpy/python-3-shield.svg)](https://pyup.io/repos/github/alexZajac/decorpy/)

A collection of python decorators including time measurement, type checking and debugging.

## Installation

Install the package directly using `Pip` with [Pypi](https://pypi.org/project/decorpy/)

`pip install decorpy`

Or using `git`

`git clone https://github.com/alexZajac/decorpy.git`

`cd decorpy`

`python setup.py install`

## Examples

### Measure execution time of a function
[Link to gist](https://gist.github.com/alexZajac/f5b594307848f0b23b9ca4fea202633d)

### Debugging a function with its signature and return value

[Link to gist](https://gist.github.com/alexZajac/e4d222757a1095abf6f8cbdcef1e1870)

### Runtime type-checking on function parameters and return

[Link to gist](https://gist.github.com/alexZajac/fe96e566e4f4aab4f80312abb49d25e8)

[ ~ Dependencies scanned by PyUp.io ~ ]