https://github.com/bugsplat-git/bugsplat-py
🐛🐍💥 BugSplat error reporting integration for Python
https://github.com/bugsplat-git/bugsplat-py
bugsplat error-reporting exception-reporting python
Last synced: 3 months ago
JSON representation
🐛🐍💥 BugSplat error reporting integration for Python
- Host: GitHub
- URL: https://github.com/bugsplat-git/bugsplat-py
- Owner: BugSplat-Git
- License: mit
- Created: 2021-04-01T11:59:58.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-27T16:28:36.000Z (almost 3 years ago)
- Last Synced: 2024-08-08T15:38:58.781Z (10 months ago)
- Topics: bugsplat, error-reporting, exception-reporting, python
- Language: Python
- Homepage: https://docs.bugsplat.com/introduction/getting-started/integrations/cross-platform/python
- Size: 29.3 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://bugsplat.com)
#BugSplat
### **Crash and error reporting built for busy developers.**
## 👋 Introduction
This repo contains the source code for [bugsplat-py](https://github.com/BugSplat-Git/bugsplat-py), a BugSplat integration for reporting Unhandled Exceptions in Python.
## 🏗 Installation
BugSplat recommends you use [bugsplat-py](https://github.com/BugSplat-Git/bugsplat-py) with a Python [virtual environment](https://docs.python.org/3/library/venv.html). To create a virtual environment for your project please run the following command at your project's root directory:
```shell
python -m venv venv
```Activate your virtual environment by running the following command:
```shell
# unix/macos
source venv/bin/activate# windows
.\env\Scripts\activate
```Install the [bugsplat](https://pypi.org/project/bugsplat) package using pip:
```bash
pip install bugsplat
```## ⚙️ Configuration
1. Import the BugSplat class
```python
from bugsplat import BugSplat
```2. Create a new BugSplat instance passing it the name of your BugSplat database, application and version
```python
bugsplat = BugSplat(database, application, version)
```3. Optionally, you set default values for appKey, description, email, user and additionaFilePaths
```python
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'
])
```4. 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
```python
try:
crash()
except Exception as e:
bugsplat.post(
e,
additional_file_paths=[],
app_key='other key!',
description='other description!',
email='[email protected]',
user='Barney'
)
```5. 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:
1. Clone the repository
```shell
git clone https://github.com/BugSplat-Git/bugsplat-py.git
```2. Create a virtual environment
```shell
python -m venv .venv
```3. Activate the virtual environment
```shell
# unix/macos
source .venv/bin/activate# windows
.\.venv\Scripts\activate
```4. Install the project's dependencies
```shell
pip install .
```Thanks for using BugSplat ❤️