Metadata-Version: 2.4
Name: python-nicodaimus
Version: 0.1.0
Summary: Async Python client for the nicodAImus API
Project-URL: Homepage, https://nicodaimus.com
Project-URL: Documentation, https://nicodaimus.com/docs/home-assistant
Project-URL: Repository, https://github.com/nicodaimus/python-nicodaimus
Project-URL: Issues, https://github.com/nicodaimus/python-nicodaimus/issues
Author-email: nicodAImus <support@nicodaimus.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Home Automation
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: aiohttp>=3.9.0
Provides-Extra: dev
Requires-Dist: aioresponses>=0.7; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# python-nicodaimus

Async Python client for the [nicodAImus](https://nicodaimus.com) API.

## Installation

```bash
pip install python-nicodaimus
```

## Usage

```python
import aiohttp
from nicodaimus import NicodaimusClient

async with aiohttp.ClientSession() as session:
    client = NicodaimusClient(
        api_key="sk-your-api-key",
        session=session,
    )

    # Validate your API key
    await client.validate_connection()

    # Non-streaming chat completion
    response = await client.chat_completion(
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(response.choices[0].message.content)

    # Streaming chat completion
    async for chunk in client.chat_completion_stream(
        messages=[{"role": "user", "content": "Tell me a story"}],
    ):
        if chunk.choices[0].delta.content:
            print(chunk.choices[0].delta.content, end="")
```

## Home Assistant

This library powers the [nicodAImus Home Assistant integration](https://github.com/nicodaimus/nicodaimus-ha).

## License

Apache License 2.0
