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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file capture-errors-0.0.3.tar.gz.
File metadata
- Download URL: capture-errors-0.0.3.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b11792b6fde3676a468271268c134dc3eb6ae93c49e54a75b5f456a5639e0ddb
|
|
| MD5 |
2abe8dc2c41ae6daad384a53ffb92399
|
|
| BLAKE2b-256 |
2fabdd2a7caf14622b3debcd32fd2080874451b1e80f4ee35b1b8f9bfdcc9872
|
File details
Details for the file capture_errors-0.0.3-py3-none-any.whl.
File metadata
- Download URL: capture_errors-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de5ab3b6466fcb5b990f49661333de0644c3a31e10ca4193a0e0722d3267d288
|
|
| MD5 |
a226295bba53eff069b292c30ec79753
|
|
| BLAKE2b-256 |
5062ad288e13cde237fcbfa26b339d721f55659143824becb0c88bd17cf37b5f
|