A Python package for sending Unhandled Exceptions to BugSplat
Project description
BugSplat
Crash and error reporting built for busy developers.
👋 Introduction
This repo contains the source code for bugsplat-py, a BugSplat integration for reporting Unhandled Exceptions in Python.
🏗 Installation
BugSplat recommends you use bugsplat-py with a Python virtual environment. To create a virtual environment for your project please run the following command at your project's root directory:
python -m venv venv
Activate your virtual environment by running the following command:
# unix/macos
source venv/bin/activate
# windows
.\env\Scripts\activate
Install the bugsplat package using pip:
pip install bugsplat
⚙️ Configuration
- Import the BugSplat class
from bugsplat import BugSplat
- Create a new BugSplat instance passing it the name of your BugSplat database, application and version
bugsplat = BugSplat(database, application, version)
- Optionally, you set default values for appKey, description, email, user and additionaFilePaths
bugsplat.set_default_app_key('key!')
bugsplat.set_default_description('description!')
bugsplat.set_default_email('fred@bugsplat.com')
bugsplat.set_default_user('Fred')
bugsplat.set_default_additional_file_paths([
'./path/to/additional-file.txt',
'./path/to/additional-file-2.txt'
])
- Wrap your application code in a try except block. In the except block call post. You can override any of the default properties that were set in step 3
try:
crash()
except Exception as e:
bugsplat.post(
e,
additional_file_paths=[],
app_key='other key!',
description='other description!',
email='barney@bugsplat.com',
user='Barney'
)
- Once you've posted a crash, navigate to the Crashes page and click the link in the ID column to be see the crash's details
🧑💻 Development
To configure a development environment:
- Clone the repository
git clone https://github.com/BugSplat-Git/bugsplat-py.git
- Create a virtual environment
python -m venv .venv
- Activate the virtual environment
# unix/macos
source .venv/bin/activate
# windows
.\.venv\Scripts\activate
- Install the project's dependencies
pip install .
Thanks for using BugSplat ❤️
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
File details
Details for the file bugsplat-1.0.4.tar.gz
.
File metadata
- Download URL: bugsplat-1.0.4.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 920675bbd3fafa4a6658553baac2376810d83e076bb07e193351bd516e998c79 |
|
MD5 | 3eaffe067a8ee5b1bfa2ec881fe32e5e |
|
BLAKE2b-256 | 4cff5304c931d215b362ecdfacd266d251f90e7ce14912045de9977886a3b5da |
File details
Details for the file bugsplat-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: bugsplat-1.0.4-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29c8cf13ef2cfc7eb8be0c55cf68b730bd009d6f2be59fd1568b5af79f83e6d9 |
|
MD5 | af15673e6f0768589661e629ce351433 |
|
BLAKE2b-256 | 136bdc3e9fd526c2face507c293c7279669aaddfd0757172d791fd4313436e6f |