Metadata-Version: 2.1
Name: codemie-client
Version: 0.1.0
Summary: CodeMie Client
Author: Vadym Vlasenko
Author-email: vadym_vlasenko@epam.com
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: PyGithub (>=2.2.0,<3.0.0)
Requires-Dist: pydantic (>=1.9.0,<2.0.0)
Requires-Dist: requests (>=2.27.1,<3.0.0)
Description-Content-Type: text/markdown

# CodeMie Client

A Python client for interacting with the CodeMie API.

## Installation

```bash
poetry install codemie-client
```

## Usage

### Initialize CodeMie Client

```python
from codemie_client.client import CodeMieClient


client = CodeMieClient(
    auth_server_url="URL",
    auth_client_id="id",
    auth_client_secret="secret",
    auth_realm_name="codemie-dev",
    codemie_api_domain="https://URL/code-assistant-api"
)

token = client.get_token()
print(token)
```

### Retrieve Assistants

```python

token = "your_keycloak_token"
assistants = client.get_assistants(token=token)
print(assistants)
```

### Talk to Assistant

```python
from codemie_client.conversation import talk_to_assistant
from codemie_client.models import ChatRequest


token = "your_keycloak_token"
request = ChatRequest(
    assistant_id="ID",
    message="Hello!",
    history=[],
)
response_stream = client.talk_to_assistant_stream(request, token)
print(response)
```

