Official Lexio SDK for Python
Project description
Lexio Python SDK
Official Python SDK for Lexio — LLM prompt management and evaluation.
Installation
pip install lexio-sdk
Quick start
from lexio import LexioClient
client = LexioClient(api_key="lx_live_...")
# Fetch a prompt
prompt = client.get_prompt("my-prompt", variables={"topic": "AI"})
print(prompt.text)
# Run tests across models
from lexio.models import RunTestsConfig, PromptEntry
result = client.run_tests(RunTestsConfig(
prompts=[PromptEntry(slug="my-prompt")],
models=["openai/gpt-4o-mini", "anthropic/claude-3-haiku"],
))
for r in result.results:
print(r.model_id, r.output)
BYOK (Bring Your Own Key)
Pass your own provider API keys — they are used in-memory and never stored:
client = LexioClient(api_key="lx_live_...", byok_keys={"openai": "sk-..."})
Or register keys permanently via the Lexio dashboard (Settings → Provider Keys).
Async client
from lexio import AsyncLexioClient
async with AsyncLexioClient(api_key="lx_live_...") as client:
result = await client.run_tests(config)
Requirements
- Python 3.11+
httpx
License
MIT
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
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 lexio_sdk-1.0.0.tar.gz.
File metadata
- Download URL: lexio_sdk-1.0.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06f279fb6933da0cb6d9962acc62dad0e4bc2c1bd4af6ec421ea24ca8fa0c6e0
|
|
| MD5 |
aebedf571a4551404d05256c9c480dd8
|
|
| BLAKE2b-256 |
9c1af3d978a85896271b145de5285e25ef83d63b8d18ca1ae37afc3a936e70f0
|
Provenance
The following attestation bundles were made for lexio_sdk-1.0.0.tar.gz:
Publisher:
sdk-publish.yml on kensibi/lexio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lexio_sdk-1.0.0.tar.gz -
Subject digest:
06f279fb6933da0cb6d9962acc62dad0e4bc2c1bd4af6ec421ea24ca8fa0c6e0 - Sigstore transparency entry: 2107374109
- Sigstore integration time:
-
Permalink:
kensibi/lexio@1dcae5b8140dc4863798b5bec3fdbb38207858af -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kensibi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@1dcae5b8140dc4863798b5bec3fdbb38207858af -
Trigger Event:
push
-
Statement type:
File details
Details for the file lexio_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lexio_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6f3edf3e6b6b2f6814f1ed1f48ebb8bb6eebee57c1869717ff787a42672e0b2
|
|
| MD5 |
139ae246f461109ce258ab675bd8fa70
|
|
| BLAKE2b-256 |
731710f05a48dff3cd51b35ac98e868f33fd224d19de4b4b2788ffb4be9d5d4d
|
Provenance
The following attestation bundles were made for lexio_sdk-1.0.0-py3-none-any.whl:
Publisher:
sdk-publish.yml on kensibi/lexio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lexio_sdk-1.0.0-py3-none-any.whl -
Subject digest:
c6f3edf3e6b6b2f6814f1ed1f48ebb8bb6eebee57c1869717ff787a42672e0b2 - Sigstore transparency entry: 2107374336
- Sigstore integration time:
-
Permalink:
kensibi/lexio@1dcae5b8140dc4863798b5bec3fdbb38207858af -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kensibi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@1dcae5b8140dc4863798b5bec3fdbb38207858af -
Trigger Event:
push
-
Statement type: