Skip to content

BugSplat-Git/bugsplat-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

bugsplat-github-banner-basic-outline

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

  1. Import the BugSplat class
from bugsplat import BugSplat
  1. Create a new BugSplat instance passing it the name of your BugSplat database, application and version
bugsplat = BugSplat(database, application, version)
  1. 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('[email protected]')
bugsplat.set_default_user('Fred')
bugsplat.set_default_additional_file_paths([
    './path/to/additional-file.txt',
    './path/to/additional-file-2.txt'
])
  1. 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='[email protected]',
        user='Barney'
    )
  1. 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

BugSplat Crash Page

πŸ§‘β€πŸ’» Development

To configure a development environment:

  1. Clone the repository
git clone https://github.com/BugSplat-Git/bugsplat-py.git
  1. Create a virtual environment
python -m venv venv
  1. Activate the virtual environment
# unix/macos
source venv/bin/activate

# windows
.\env\Scripts\activate
  1. Install the project's dependencies
pip install .

Thanks for using BugSplat ❀️