Metadata-Version: 2.4
Name: lamatic
Version: 0.1.0
Summary: Python SDK for the Lamatic API
Project-URL: Homepage, https://lamatic.ai
Project-URL: Documentation, https://lamatic.ai/docs
Project-URL: Repository, https://github.com/Lamatic/Lamatic-Python-SDK
Project-URL: Issues, https://github.com/Lamatic/Lamatic-Python-SDK/issues
Author-email: Lamatic <hello@lamatic.ai>
License: MIT
License-File: LICENSE
Keywords: agents,ai,graphql,lamatic,llm,sdk,workflows
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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 :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Description-Content-Type: text/markdown

# Lamatic Python SDK

Python SDK for [Lamatic](https://lamatic.ai).

**Requires Python 3.10+**

## Installation

```bash
pip install lamatic
```

### Install from source

```bash
git clone https://github.com/Lamatic/Lamatic-Python-SDK.git
cd Lamatic-Python-SDK
pip install -e .
```

### For development (includes test dependencies)

```bash
pip install -e ".[dev]"
```

## Quick Start

```python

from lamatic import Lamatic

lamatic = Lamatic(
    endpoint="https://your-project.lamatic.ai/api/graphql",
    project_id="your-project-id",
    api_key="your-api-key",
)

# Execute a flow (sync)
response = lamatic.execute_flow("flow-id", {"prompt": "Hello!"})
print(response.status)  # "success"
print(response.result)

# Poll status
response = lamatic.check_status("request-id", poll_interval=5, poll_timeout=120)

```

## Async Usage

```python

import asyncio
from lamatic import Lamatic

lamatic = Lamatic(
    endpoint="https://your-project.lamatic.ai/api/graphql",
    project_id="your-project-id",
    api_key="your-api-key",
)

async def main():
    response = await lamatic.async_execute_flow("flow-id", {"prompt": "Hello!"})
    print(response.status)
    print(response.result)

asyncio.run(main())

```

## Authentication

Either `api_key` or `access_token` is required:

```python

# API key auth
lamatic = Lamatic(endpoint=..., project_id=..., api_key="your-api-key")

# Access token auth
lamatic = Lamatic(endpoint=..., project_id=..., access_token="your-token")

# Refresh token at runtime
lamatic.update_access_token("new-token")

```
