Metadata-Version: 2.4
Name: taillight-sdk
Version: 0.1.0
Summary: Python SDK for shipping logs to Taillight
Project-URL: Homepage, https://github.com/lasseh/taillight
Project-URL: Documentation, https://github.com/lasseh/taillight/blob/main/docs/python-logshipper.md
Project-URL: Repository, https://github.com/lasseh/taillight
Project-URL: Issues, https://github.com/lasseh/taillight/issues
Author: Lasse Haugen
License-Expression: GPL-3.0-only
License-File: LICENSE
Keywords: log-shipping,logging,observability,taillight
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
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: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Logging
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# taillight-sdk

Python SDK for shipping logs to [Taillight](https://github.com/lasseh/taillight) — a real-time log viewer.

- Zero external dependencies (stdlib only)
- Background-thread batching with configurable batch size and flush interval
- Drop-on-overflow — never blocks or crashes your application
- Exponential backoff on send failures
- Bearer token authentication

## Install

```sh
pip install taillight-sdk
```

## Quick start

```python
import logging
from taillight_sdk import TaillightHandler

handler = TaillightHandler(
    endpoint="https://taillight.example.com/api/v1/applog/ingest",
    api_key="your-api-key",
    service="my-python-app",
)

logger = logging.getLogger("myapp")
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)

logger.info("server started", extra={"port": 8080})

# Flush remaining logs on shutdown
handler.shutdown()
```

## Documentation

See the full [Python logshipper guide](https://github.com/lasseh/taillight/blob/main/docs/python-logshipper.md) for configuration reference, structured logging, Django/Flask integration, and API details.

## License

GPL-3.0 — see [LICENSE](LICENSE).
