Metadata-Version: 2.3
Name: makkiai-py
Version: 0.3.1
Summary: Maki AI widget SDK for Python applications.
Author: Maki
Author-email: Maki <laplacesterz@gmail.com>
License: MIT
Requires-Dist: pydantic>=2.0.0
Requires-Dist: httpx>=0.24.0
Requires-Python: >=3.8
Project-URL: Homepage, https://github.com/fierrez/makiai
Description-Content-Type: text/markdown

# makkiai-python

Python SDK for Maki AI widget integrations.

## Install

```bash
pip install makkiai-python
```

## Quick Start

```python
import asyncio
from makiai import AsyncWidgetClient

async def main():
    client = AsyncWidgetClient(
        base_url="https://api.yourdomain.com",
        api_key="YOUR_API_KEY",
        client_sdk="2.0"
    )

    # Fetch widget contract
    contract = await client.fetch_contract()
    print("Widget:", contract.widget.name)

    # Post message
    response = await client.post_chat("Hello!")
    print(response)

if __name__ == "__main__":
    asyncio.run(main())
```

## Schema & Validation Parity

This SDK includes generated schemas and models matching the canonical widget specifications under `makiai.schema_models_generated`. Use them to validate incoming streaming events or contract payloads:

```python
from makiai.schema_models_generated import GENERATED_WIDGET_EVENT_TYPES

# Check event type support
if event["event"] in GENERATED_WIDGET_EVENT_TYPES:
    print("Valid streaming event!")
```
