Skip to main content

Python utilities to perform dryrun.

Project description

The module helps you to implement dryrun mode in your Python projects with an easy switch ‘on/off’ feature.

Authors: Daniele Zanotelli (dazano@gmail.com)

License: MIT

Documentation

The package is supplied with Sphinx compilable documentation under the docs directory.

You can read the latest docs visiting the project docs online.

Basic usage

Apply the sham decorator to your function and set dryrun as on.

import drypy
from drypy.sham import sham

@sham
def foo(bar):
    ...

drypy.set_dryrun(True)

foo(42)

Will log the following output:

[DRYRUN] call to 'foo(42)'

using the python standard logging facility, thus it’s up to you to correctly configure it.

To use custom substitutes with specific beahviours please check the docs for the sheriff-deputy pattern.

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

drypy-0.3.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

drypy-0.3-py3-none-any.whl (6.6 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