Skip to main content

A wrapper for callable functions with environments to register pre- and post-processing functions checks and modifications.

Project description

WrapEnv

An environment that can hold several callable functions along with pre- and post-processing functions and auxilary environment. It is intended to be used as a wrapper for a function that is to be called in a different environment than the one it was defined in.

Installation

As usual, you can install the package using pip:

pip install wrapenv

Usage

The package provides an instance of the class ENVIRONMENT that can be used as a decorator for functions that are to be wrapped. As the instance is a global variable, it can be used from anywhere in the code (even in other modules).

The example in the EXAMPLES folder demonstrates how to use the ENVIRONMENT instance to wrap a function that is to be called in a different environment than the one it was defined in.

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

wrapenv-0.1.4.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

wrapenv-0.1.4-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

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