Metadata-Version: 2.4
Name: hivehook-sdk
Version: 0.1.1
Summary: Official Hivehook Python SDK
Author: Hivehook
License-Expression: MIT
Project-URL: Homepage, https://hivehook.com
Project-URL: Documentation, https://hivehook.com/docs
Project-URL: Repository, https://github.com/hivehook/sdk-python
Project-URL: Issues, https://github.com/hivehook/sdk-python/issues
Keywords: hivehook,webhook,webhooks,graphql,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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 :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28.0
Provides-Extra: async
Requires-Dist: httpx>=0.25.0; extra == "async"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: httpx>=0.25.0; extra == "dev"
Dynamic: license-file

# hivehook (Python)

Official Python client for [Hivehook](https://hivehook.com), webhook infrastructure for modern teams (inbound and outbound).

Latest release: **0.1.1** on [PyPI](https://pypi.org/project/hivehook-sdk/).

## Install

```bash
pip install hivehook-sdk
```

For the async client, install the optional extra:

```bash
pip install "hivehook-sdk[async]"
```

## Quick start

```python
import os
from hivehook import HivehookClient

client = HivehookClient(
    base_url="http://localhost:8080",
    api_key=os.environ["HIVEHOOK_API_KEY"],
)

source = client.sources.create(
    name="Stripe production",
    slug="stripe-prod",
    provider_type="stripe",
    verify_config={"secret": "whsec_..."},
)

print(f"created source {source.id}. POST webhooks to /ingest/{source.slug}")
```

## Async usage

```python
from hivehook import AsyncHivehookClient

async with AsyncHivehookClient(api_key="...") as client:
    sources = await client.sources.list()
```

## Webhook signature verification

```python
from hivehook.webhook import verify

signature = request.headers["X-Hivehook-Signature"]
timestamp = int(request.headers["X-Hivehook-Timestamp"])
ok = verify(body, "your-signing-secret", signature, timestamp)
```

## Documentation

See the full reference at [hivehook.com/docs](https://hivehook.com/docs).

## License

MIT. See [LICENSE](LICENSE).
