Metadata-Version: 2.4
Name: stacktrace-sdk-python
Version: 0.1.0
Summary: Python SDK for sending error and event reports to the Artim Stacktrace backend.
License: MIT
Project-URL: Homepage, https://github.com/Artim-Industries/stacktrace-sdk-python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# stacktrace-sdk-python

Python SDK for the Artim Stacktrace backend. This package provides basic error reporting and event capture utilities similar to the existing React SDK.

## Usage

```python
from bug_sdk_python import ArtimStacktrace

ArtimStacktrace.init(
    api_key="your-api-key",
    project_id="your-project-id",
    environment="production",
    release="1.0.0",
)

ArtimStacktrace.capture_message("Something went wrong", level="warn")

try:
    1 / 0
except Exception as error:
    ArtimStacktrace.capture_exception(error)

ArtimStacktrace.set_user({"id": "123", "email": "user@example.com"})

# Or identify by callback
ArtimStacktrace.identify(lambda: {"id": "123", "email": "user@example.com"})
```

## Features

- `init` sets API key, project id, environment, release, and backend endpoint
- `capture_exception` sends exception details and stacktrace
- `capture_message` sends simple event messages
- `set_user` and `identify` attach user context to events
- default backend endpoint: `https://stacktrace-backend.artim-industries.com/api/events`
