Metadata-Version: 2.4
Name: condux
Version: 0.1.2
Summary: Condux SDK for Python — report errors to Condux.
Project-URL: Homepage, https://condux.ai
Project-URL: Repository, https://github.com/tripledownab/condux
Project-URL: Documentation, https://github.com/tripledownab/condux/blob/main/docs/sdk-publishing.md
Author: Condux
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: condux,crash-reporting,error-monitoring,observability,sentry
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Bug Tracking
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# condux (Python SDK)

Report errors from a Python app to a Condux relay. Emits the Sentry "store" wire shape, so the relay
normalizes it exactly like an official Sentry SDK — point it at a project DSN and it works.

Delivery is resilient (429 / 5xx / network failures retry with backoff, honoring `Retry-After`) and
**never raises** — a failed send returns a `SendResult`, it does not crash the host app.

## Install

```bash
pip install condux
```

## Usage

```python
import condux

condux.init(
    dsn="https://<key>@ingest.condux.ai/<projectId>",
    environment="production",
    release="1.4.2",
)

try:
    do_work()
except Exception as error:
    condux.capture_exception(error)
    raise

# or a bare message
condux.capture_message("cache miss storm", condux.Level.WARNING)
```

## Framework integrations

WSGI (Flask, Django) and ASGI (FastAPI, Starlette) middleware report uncaught exceptions
(`handled=False`) and re-raise:

```python
# WSGI
from condux.integrations.wsgi import ConduxWsgiMiddleware
app.wsgi_app = ConduxWsgiMiddleware(app.wsgi_app)

# ASGI
from condux.integrations.asgi import ConduxAsgiMiddleware
app = ConduxAsgiMiddleware(app)
```

## Develop

```bash
pip install -e .
python -m unittest discover -s tests
```

Zero runtime dependencies (standard library only). The transport and sleep are injectable, so the tests
exercise the retry/backoff with no real network or timers.
