Skip to main content

Decorators for common developer utility

Project description

wrappy

Decorators for common develop utilities.

Usage

@probe()
def do_some_heavy_computation(a, b, c):
    return a * b + c

@probe()
def someone_elses_code():
    # code that does not explain itself
    #
    # A
    # HHHUUUUGGGGGEEEEE
    # MESS

@guard()
def play_with_fire():
    return 1 / 0

@todo()
def i_am_not_ready():
    pass

@guard()
@memoization()
def recursive_or_dynamic_programming_subroutine(n):
    assert isinstance(n, int) and n >= 0
    if n == 0:
        return 0
    return n + recursive_or_dynamic_programming_subroutine(n-1)

Project details


Download files

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

Files for wrappy, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size wrappy-0.1.3-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size wrappy-0.1.3.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page