Metadata-Version: 2.5
Name: wibechat
Version: 0.2.0
Summary: Wibechat Python SDK — token generation for Wibechat calling
Project-URL: Homepage, https://wibechat.com
Project-URL: Documentation, https://wibechat.com/developers
License-Expression: MIT
Requires-Python: >=3.10
Requires-Dist: livekit-api>=0.8.0
Requires-Dist: requests>=2.28.0
Description-Content-Type: text/markdown

# Wibechat Python SDK

Token generation for Wibechat calling.

## Installation

```bash
pip install wibechat
```

## Quick Start

### Using WibechatClient (recommended)

Set your environment variables:

```bash
WIBECHAT_SERVER_URL=wss://call.wibechat.com
WIBECHAT_API_KEY=lk_your_license_key_here
WIBECHAT_CLIENT_ID=your-client-uuid
```

Then in your code:

```python
from wibechat import WibechatClient

client = WibechatClient()

token = client.get_token(
    room_name="my-room",
    user_identity="user-123",
    user_name="Alice",
    ttl_seconds=3600,
)

print(token.access_token)  # JWT to connect to the room
print(token.session_id)    # Session tracking ID
```

Or pass credentials directly:

```python
client = WibechatClient(
    server_url="wss://call.wibechat.com",
    api_key="lk_your_license_key_here",
    client_id="your-client-uuid",
)
```

### Using AccessToken directly (advanced)

For direct token generation without the server:

```python
from wibechat import AccessToken, RoomGrants

token = (
    AccessToken(api_key, api_secret)
    .with_identity("user-123")
    .with_name("Alice")
    .with_grants(RoomGrants(room_join=True, room="my-room", can_publish=True, can_subscribe=True))
    .to_jwt()
)
```

## Documentation

See the [Wibechat Developer Portal](https://wibechat.com/developers) for full integration guides.
