Skip to main content

A tiny python library for running code and ignore any errors

Project description

suppyress

A simple python library for running code and ignore any errors.

Getting Started

Installing

You can install this package with pip.

pip install suppyress

Usage

All examples are intended for writing in a python shell (or python code file).

from suppyress import suppress

@suppress
def test(a, b=1):
    result = "%s -> %s" % (a, int(b))
    return result


assert test("a", b="2") is not None
assert test("a", b="a") is None

or:

from suppyress import safe_run

assert safe_run(int, "2") is not None
assert safe_run(int, "a") is None

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

suppyress-0.1-py2-none-any.whl (2.1 kB view hashes)

Uploaded Python 2

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