Python package that captures exceptions and notify them
Project description
Capture Errors
A python package that captures the exceptions and notify them via different methods of notification.
This package provides the complete context of the runtime errors which help developers debug the issues and saves time in bug fixing.
Installation
Use the command pip
to install the package
$ pip install capture-errors
Environment Setup
$ export CAPTURE_EMAIL_HOST=smtp.gmail.com
$ export CAPTURE_EMAIL_PORT=465
$ export CAPTURE_EMAIL_USER=username@gmail.com
$ export CAPTURE_EMAIL_PASSWORD=securePassxxxx
Usage
from capture import Capture
from capture.adapters.email import EmailAdapter
capture = Capture()
email_adapter_properties = {
'from_email': '<email-address>',
'recipients': '<email-address>',
}
capture.set_adapter(EmailAdapter, email_adapter_properties)
try:
# Code that can generate an error
# For example: ZeroDivisionError
x = 10
y = 500000
while True:
remainder = y % x
x -= 1
except Exception as ex:
capture.push(ex)
Available Adapters
- EmailAdapter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
capture-errors-0.0.4b0.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for capture_errors-0.0.4b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d2c37f284b2091f61d6bc4fc19d13a1beccb219e0a854269275760f527d576 |
|
MD5 | a4d12f919ad84daa7a2401ed4c635b0a |
|
BLAKE2b-256 | 507f61c97af0a2655f2272bbbc08ef6207de9635304293ae607112cd16334e0e |