Python SDK for the Lamatic API
Project description
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lamatic-0.1.0.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lamatic-0.1.0.tar.gz.
File metadata
- Download URL: lamatic-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc5d7dcb60cf83f306d0ab6568b26933d953baf6fe1c487524a83e21de76a596
|
|
| MD5 |
11913674ed911dd789040834f0915b27
|
|
| BLAKE2b-256 |
440df054d33fd693a1a810367b82951b32b9e39639d409be8311fef25dc8e301
|
File details
Details for the file lamatic-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lamatic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ca675105f934b452a791c8544f8cc27a298bc2359b95ab7f15bf7bdf5ccfd5a
|
|
| MD5 |
d1704bab9e3b305e3542c52b1c253b5c
|
|
| BLAKE2b-256 |
c7f0b9f1be56d04dfcdb3cca60aa538a4ae3b82a8b07edf1113fa3342611e2f2
|