Skip to main content

No project description provided

Project description

Tryit

Description

Just a decorator to handle exceptions. It maps Python Exceptions to specific callbacks.

Usage

from tryit import tryit, ExceptionTarget

@tryit(exceptions=[
  ExceptionTarget(ZeroDivisionError, callback=lambda err: float("nan"))
])
def divide(a: int, b: int) -> float:
  return a/b

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

tryit-0.1.2.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tryit-0.1.2-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file tryit-0.1.2.tar.gz.

File metadata

  • Download URL: tryit-0.1.2.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.9.0 Linux/5.15.0-50-generic

File hashes

Hashes for tryit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 de7f344942adf1b702fbcd2d036fe129b74ba2c1dce3fe741aaa2a332f723e2c
MD5 514421899be19ce487dd27ec338d116d
BLAKE2b-256 98b0a810266ace4b98ddfc784337592e43cdd8d5a01a2c71da43a6fb21915975

See more details on using hashes here.

File details

Details for the file tryit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tryit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.9.0 Linux/5.15.0-50-generic

File hashes

Hashes for tryit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da22169dc55ce420d1ee04d52a55eace5c8d3c40beabf8f9c250b7ab9f9d7016
MD5 3e0861f10e1580bc9cc47814b4e48bc0
BLAKE2b-256 2c6c17454f26ce5b128695e8aa33734a62b3783c821a245e25cae1f8e659913e

See more details on using hashes here.

Supported by

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