Skip to main content

Make decorators with a before and after function

Project description

Simply make decorators with a before and after function.

Included Files

  • easyDecorator/easyDecorator.py - Make decorators with a before and after function

Installation

Python must be installed in order for Menu to be imported. Install python at https://www.python.org/download/. In the terminal type “cd path/to/this/directory” and then “python setup.py install”. This will add the menu module to your site-packages.

How to Use

Import eastDecorator:

from easyDecorator import easyDecorator as dec

or:

import easyDecorator.easyDecorator as dec

Make a decorator with before/after functions:

newDecorator = dec.decorator(before=beforeFunction,after=afterFunction)

@newDecorator
def someFunc():
    pass

Decorate a function that doesn’t accept arguments so that it can:

@dec.giveArgs
def funcWithoutArgs():
    pass

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 Easy_Decorator, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size Easy_Decorator-1.2.tar.gz (1.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page