Metadata-Version: 2.3
Name: gotisink
Version: 0.1.1
Summary: Send Bugsink/Sentry error alerts to Gotify.
Author: Xabi Bello
Author-email: Xabi Bello <xbello@gmail.com>
License: MIT
Requires-Dist: sentry-sdk>=3.0.1
Requires-Python: >=3.14
Project-URL: Homepage, https://gitlab.com/xbello/gotisink
Description-Content-Type: text/markdown

# gotisink

Send [Bugsink](https://www.bugsink.com/) (or Sentry) error alerts to [Gotify](https://gotify.net/) from Django with built-in cooldown throttling and minimal `settings.py` boilerplate.

## Installation

```bash
pip install gotisink

export BUGSINK_DSN="https://<public_key>@bugs.example.com/1"
export GOTIFY_URL="https://gotify.example.com/message?<app_token>"
```

Add the lines to settings.py:

    import gotisink

    gotisink.init(app_name="MyProject")

Automatically get the values from environment.

## Configuration options

To further configure the stack, e.g. using a `.env` file and [Django environ](https://django-environ.readthedocs.io/en/latest/), change the parameters for the function call:

```bash
$ cat .env
bugsink_dsn="https://<public_key>@bugsink.example.com/1"
gotify_url="https://gotify.example.com/message?token=<token>"
```
`settings.py`:
    
    import environ

    ...
    env = environ.Env()
    ...

    bugsink_dsn = env.get("bugsink_dsn")
    gotify_url = env.get("gotify_url")

    gotisink.init(
        dsn=bugsink_dsn,
        gotify_url=gotify_url,
        app_name="MyProject",  # shown in notification title & header
        cooldown_seconds=300,  # minimum seconds between Gotify alerts (default: 300)
        max_request_body_size="always",
    )