Metadata-Version: 2.4
Name: jambonz-sdk
Version: 0.1.0
Summary: Python SDK for the jambonz open-source telephony platform
Project-URL: Homepage, https://jambonz.org
Project-URL: Repository, https://github.com/jambonz/jambonz-python-sdk
Author-email: Javier Sánchez <javier.sanchez.castro@bookline.ai>
License: MIT
Keywords: jambonz,sip,telephony,voip,webhook,websocket
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
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 :: Communications :: Telephony
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.12.5
Provides-Extra: websocket
Requires-Dist: websockets>=16.0; extra == 'websocket'
Description-Content-Type: text/markdown

# jambonz-sdk

Python SDK for the [jambonz](https://jambonz.org) open-source telephony platform.

## Installation

```bash
# Core package — webhook response builder + REST API client
pip install jambonz-sdk

# With WebSocket support
pip install jambonz-sdk[websocket]
```

## Quick start

### Webhook handler

```python
from jambonz import WebhookResponse

def handle_call(data: dict) -> list:
    response = WebhookResponse()
    response.say("Hello from jambonz!")
    return response.build()
```

### WebSocket app (requires `jambonz-sdk[websocket]`)

```python
from jambonz.websocket import JambonzWebSocketApp

app = JambonzWebSocketApp()

@app.on("/voice")
async def handle_session(session):
    await session.say("Welcome!")
    await session.hangup()

app.run(host="0.0.0.0", port=3000)
```

### REST client

```python
from jambonz.client import JambonzClient

client = JambonzClient(base_url="https://my-jambonz.example.com", api_key="...")
accounts = await client.accounts.list()
```

## Features

- **Webhook response builder** — fluent API for composing jambonz verb arrays
- **REST API client** — async HTTP client wrapping every jambonz REST endpoint
- **WebSocket server** — full-duplex call control with session management and routing
- **Audio streaming** — bidirectional audio stream helpers
- **Pydantic models** — fully typed request/response models
- **HMAC signature verification** — validate inbound webhook authenticity

## Development

```bash
git clone https://github.com/jambonz/jambonz-python-sdk.git
cd jambonz-python-sdk
pip install -e ".[dev]"
pytest
```

## License

MIT
