zmrl010 / bugsplat-py

BugSplat integration for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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.setDefaultAppKey('key!')
bugsplat.setDefaultDescription('description!')
bugsplat.setDefaultEmail('fred@bugsplat.com')
bugsplat.setDefaultUser('Fred')
bugsplat.setDefaultAdditionalFilePaths([
    './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, 
        additionalFilePaths=[], 
        appKey='other key!', 
        description='other description!', 
        email='barney@bugsplat.com', 
        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 get a development environment started:

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

# windows
.\env\Scripts\activate
  1. Install dependencies
pip install .

Thanks for using BugSplat ❀️

About

BugSplat integration for Python

License:MIT License


Languages

Language:Python 100.0%