Metadata-Version: 2.4
Name: bloop-sdk
Version: 0.1.0
Summary: Python SDK for bloop error observability
Project-URL: Homepage, https://github.com/jaikoo/bloop-python
Project-URL: Repository, https://github.com/jaikoo/bloop-python
License-Expression: MIT
License-File: LICENSE
Keywords: error-tracking,monitoring,observability
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# @bloop/python

Python SDK for [bloop](https://github.com/your-org/bloop) error observability. Zero dependencies — uses only the Python standard library.

## Install

```bash
pip install bloop-sdk
```

## Usage

```python
from bloop import BloopClient

client = BloopClient(
    "https://bloop.example.com",
    "your-project-api-key",
    environment="production",
    release="1.0.0",
)

# Capture an error
client.capture("ValueError", "invalid input", stack="Traceback ...")

# Or use as context manager for automatic cleanup
with BloopClient("https://bloop.example.com", "key") as client:
    client.capture("TypeError", "oops")

# Auto-capture unhandled exceptions
client = BloopClient("...", "key", auto_capture=True)
```

## API

### `BloopClient(endpoint, project_key, **opts)`

- `flush_interval` (float): Seconds between automatic flushes. Default: `5.0`
- `max_buffer_size` (int): Flush when buffer reaches this size. Default: `100`
- `environment` (str): Environment tag. Default: `"production"`
- `release` (str): Release version tag. Default: `""`
- `auto_capture` (bool): Install `sys.excepthook` to capture unhandled exceptions. Default: `False`

### `client.capture(error_type, message, **kwargs)`

Buffer an error event. Keyword arguments: `source`, `stack`, `route_or_procedure`, `screen`, `metadata`.

### `client.flush()`

Send all buffered events immediately.

### `client.close()`

Flush and stop background timer.
