liyaengine
Official Python client for the Liya Engine public API.
Status: early access. This SDK currently covers the Collections resource. More resources (Domains, Run, Agents, Workflows, Evals) ship incrementally — see Roadmap.
Install
pip install liyaengine
Quickstart
from liyaengine import LiyaEngine
client = LiyaEngine(api_key="liya_...")
collection = client.collections.create(
slug="contracts",
label="Contracts",
domain_keys=["legal-ops"],
)
collections = client.collections.list()
Or as a context manager (closes the underlying HTTP connection pool automatically):
with LiyaEngine(api_key="liya_...") as client:
collections = client.collections.list()
Get an API key from your Liya Engine dashboard under Settings → API Keys.
Error handling
Every failed request raises LiyaEngineAPIError, carrying the API's code, message, and HTTP status:
from liyaengine import LiyaEngineAPIError
try:
client.collections.create(slug="contracts", label="Contracts", domain_keys=["legal-ops"])
except LiyaEngineAPIError as err:
if err.code == "SLUG_CONFLICT":
# handle the conflict
pass
raise
Network failures and timeouts raise LiyaEngineNetworkError instead. Requests are retried automatically on 429/5xx responses and transient network errors (2 retries by default).
Configuration
LiyaEngine(
api_key="liya_...",
base_url="https://api.liyaengine.ai", # override for local/staging
timeout_s=30.0,
max_retries=2,
)
Roadmap
- Collections
- Domains (custom domain + intent CRUD)
- Run / Run (streaming)
- Agents
- Workflows
- Evaluations
- Async client
Full docs: https://liyaengine.ai/docs/sdks/python
Development
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
mypy src
pytest
License
MIT
Release files for liyaengine 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 | |
|---|---|---|---|
| liyaengine-0.1.0.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| liyaengine-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.3 kB
Release files / liyaengine-0.1.0.tar.gz
| Download URL | liyaengine-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11f3304bb0212cd4822353c933f207b7787399279a231d4a5983c27f619d9754
|
|
BLAKE2b-256 checksum How to use checksums |
3fdae7b24276e9b61f9ce480364bc2ae17493416186bdc00c19a45b9a974e379
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / liyaengine-0.1.0-py3-none-any.whl
| Download URL | liyaengine-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce2987357964fd8396221ed635fb10ce7c95b2fe113c2635f53305a9b03fa23e
|
|
BLAKE2b-256 checksum How to use checksums |
2beed55be5488ac0d3205fc9e0a47c8dd9c2fe623ff78ec904ec8e428171f3f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency log