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 details)

Uploaded Python 2

File details

Details for the file suppyress-0.1-py2-none-any.whl.

File metadata

  • Download URL: suppyress-0.1-py2-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.14

File hashes

Hashes for suppyress-0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 2bd18e2052d464c2f305cb51d18650ab27ddeb85458082718ddb6b0b175f5218
MD5 b115197292e37dfacb30fdc2ab1fe504
BLAKE2b-256 00ef53c40a75fc6585acf176a1c1315ef015dd02c8a8022ca6668d5e9ca49919

See more details on using hashes here.

Supported by

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