Metadata-Version: 2.3
Name: linear-events
Version: 0.1.0
Summary: Linear webhook dispatch: HMAC-SHA256 signature verification, replay protection, and .on() handler routing
Requires-Dist: httpx>=0.28 ; extra == 'client'
Requires-Dist: fastapi>=0.110 ; extra == 'fastapi'
Requires-Python: >=3.11
Provides-Extra: client
Provides-Extra: fastapi
Description-Content-Type: text/markdown

# linear-events

Linear webhook payload types, HMAC signature verification, replay protection,
and event dispatch.

```sh
pip install linear-events
# Optional FastAPI integration and agent activity client:
pip install 'linear-events[fastapi,client]'
```

```python
import os
from linear_events import LinearDispatcher

hooks = LinearDispatcher(signing_secret=os.environ["LINEAR_WEBHOOK_SECRET"])

@hooks.on("Issue", action="create")
async def on_issue(payload):
    print(payload["data"])
```

The dispatcher verifies signatures and timestamps when a signing secret is
configured. Mount `as_fastapi_router()` for FastAPI handling, or call `dispatch`
with the raw request body, signature, and timestamp yourself. The base package
has no runtime dependencies. `linear_events.client.LinearAgentClient` is
available with the `client` extra.
