Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lexio_sdk-1.0.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lexio_sdk-1.0.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

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

Hashes for lexio_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 06f279fb6933da0cb6d9962acc62dad0e4bc2c1bd4af6ec421ea24ca8fa0c6e0
MD5 aebedf571a4551404d05256c9c480dd8
BLAKE2b-256 9c1af3d978a85896271b145de5285e25ef83d63b8d18ca1ae37afc3a936e70f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexio_sdk-1.0.0.tar.gz:

Publisher: sdk-publish.yml on kensibi/lexio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for lexio_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f3edf3e6b6b2f6814f1ed1f48ebb8bb6eebee57c1869717ff787a42672e0b2
MD5 139ae246f461109ce258ab675bd8fa70
BLAKE2b-256 731710f05a48dff3cd51b35ac98e868f33fd224d19de4b4b2788ffb4be9d5d4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexio_sdk-1.0.0-py3-none-any.whl:

Publisher: sdk-publish.yml on kensibi/lexio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page