Python

Introduction

Before integrating a new BugSplat SDK with your application, make sure to review the Getting Started resources and complete the simple startup tasks listed below.

  • โ€‹Sign up for a BugSplat account

  • โ€‹Log in using your email address

  • Create a new database for your application

Need any further help? Check out the full BugSplat documentation here, or email the team at [email protected].

bugsplat-py

A BugSplat integration for reporting Unhandled Exceptions in Python.

Installing

Install the bugsplat package using pip

pip install bugsplat

Usage

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 key, description, email, user, and additionaFilePaths

bugsplat.setDefaultAppKey('key!')
bugsplat.setDefaultDescription('description!')
bugsplat.setDefaultEmail('[email protected]')
bugsplat.setDefaultUser('Fred')
bugsplat.setDefaultAdditionalFilePaths([
'./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, additionalFilePaths=[], appKey='other key!', description='other description!', email='[email protected]', user='Barney')

Once you've posted a crash, navigate to the Crashes page and click the link in the ID column to see the crash's details

BugSplat Python Crash

Thanks for using BugSplat โค๏ธ