Metadata-Version: 2.3
Name: bugsplat
Version: 1.0.4
Summary: A Python package for sending Unhandled Exceptions to BugSplat
Project-URL: Homepage, https://github.com/BugSplat-Git/bugsplat-py
Project-URL: Issues, https://github.com/BugSplat-Git/bugsplat-py/issues
Author-email: Bobby Galli <bobby@bugsplat.com>
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.8
Requires-Dist: requests<=2.29.0
Provides-Extra: test
Requires-Dist: certifi==2022.6.15; extra == 'test'
Requires-Dist: charset-normalizer==2.0.12; extra == 'test'
Requires-Dist: idna==3.3; extra == 'test'
Requires-Dist: requests==2.29.0; extra == 'test'
Requires-Dist: urllib3==1.26.9; extra == 'test'
Description-Content-Type: text/markdown

[![bugsplat-github-banner-basic-outline](https://user-images.githubusercontent.com/20464226/149019306-3186103c-5315-4dad-a499-4fd1df408475.png)](https://bugsplat.com)
<br/>
# <div align="center">BugSplat</div> 
### **<div align="center">Crash and error reporting built for busy developers.</div>**
<div align="center">
    <a href="https://twitter.com/BugSplatCo">
        <img alt="Follow @bugsplatco on Twitter" src="https://img.shields.io/twitter/follow/bugsplatco?label=Follow%20BugSplat&style=social">
    </a>
    <a href="https://discord.gg/K4KjjRV5ve">
        <img alt="Join BugSplat on Discord" src="https://img.shields.io/discord/664965194799251487?label=Join%20Discord&logo=Discord&style=social">
    </a>
</div>

## 👋 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('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'
])
```

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='barney@bugsplat.com',
        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

<img width="1713" alt="BugSplat Crash Page" src="https://user-images.githubusercontent.com/2646053/175091507-32a9c505-1d26-4d5b-aef7-44b5a347ddb4.png">

## 🧑‍💻 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 ❤️
