Lamatic Python SDK
Python SDK for Lamatic.
Requires Python 3.10+
Installation
pip install lamatic
Install from source
git clone https://github.com/Lamatic/Lamatic-Python-SDK.git
cd Lamatic-Python-SDK
pip install -e .
For development (includes test dependencies)
pip install -e ".[dev]"
Quick Start
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
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:
# 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")
Release files for lamatic 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lamatic-0.1.0.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lamatic-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / lamatic-0.1.0.tar.gz
| Download URL | lamatic-0.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc5d7dcb60cf83f306d0ab6568b26933d953baf6fe1c487524a83e21de76a596
|
|
BLAKE2b-256 checksum How to use checksums |
440df054d33fd693a1a810367b82951b32b9e39639d409be8311fef25dc8e301
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.1
|
Release files / lamatic-0.1.0-py3-none-any.whl
| Download URL | lamatic-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ca675105f934b452a791c8544f8cc27a298bc2359b95ab7f15bf7bdf5ccfd5a
|
|
BLAKE2b-256 checksum How to use checksums |
c7f0b9f1be56d04dfcdb3cca60aa538a4ae3b82a8b07edf1113fa3342611e2f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.1
|