Metadata-Version: 2.4
Name: booklooker-client
Version: 0.1.0
Summary: Python client for the Booklooker REST API with Pydantic models and webhook helpers
Author: GitHub Copilot
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.8.2
Requires-Dist: PyYAML>=6.0.2
Provides-Extra: webhooks
Requires-Dist: fastapi>=0.115.0; extra == "webhooks"
Requires-Dist: uvicorn>=0.30.6; extra == "webhooks"
Provides-Extra: dev
Requires-Dist: pytest>=8.3.3; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
Requires-Dist: build>=1.2.2; extra == "dev"
Requires-Dist: twine>=5.1.1; extra == "dev"

# booklooker-client

A Python client for the Booklooker REST API designed for middleware and connector-hub scenarios.

## Highlights

- Generated API contract derived from [openapi.yaml](openapi.yaml)
- Sync and async client entrypoints
- Pydantic models for normalized responses
- Token auto-refresh handling
- Webhook helper toolbox for Push-API style events
- FastAPI example receiver and enrichment workflow

## Installation

```bash
pip install -e .[dev,webhooks]
```

## Packaging and publishing

Build a source distribution and wheel:

```bash
python build_dist.py
```

Upload the artifacts to Forgejo PyPI after creating your local `.pypirc` from `.pypirc.example`:

```powershell
.\upload_dist_to_forgejo_pypi.ps1 -Build
```

## Quick start

```python
from booklooker_client import BooklookerConfig, SyncBooklookerClient

config = BooklookerConfig(api_key="YOUR_API_KEY")
client = SyncBooklookerClient(config)

token = client.authenticate()
articles = client.get_article_list()
print(token.token)
print(articles.items)
```

## Notes

Booklooker wraps nearly all responses into a generic envelope with `status` and `returnValue`. This package normalizes those responses into typed Pydantic models so downstream middleware can work with stable structures.
