Skip to main content

Official SDK for building apps on the Claritty Platform

Project description

claritty-sdk

Official Python SDK for building apps on the Claritty Platform.

Generated apps deployed on Claritty automatically get a CLARITTY_PLATFORM_URL and CLARITTY_AUTH_TOKEN injected at runtime. The SDK reads those env vars and routes all LLM calls through the platform proxy — metering them against the app owner's plan, supporting BYOK (bring-your-own-key) when configured.

Installation

pip install claritty-sdk

Quick start

from claritty_sdk.llm import get_llm_client

client = get_llm_client("claude-sonnet-4-6")
result = client.chat([{"role": "user", "content": "Explain quantum computing"}])
print(result.content)

Streaming:

for delta in client.chat_stream(messages=[
    {"role": "user", "content": "Write me a haiku about kubernetes"}
]):
    print(delta, end="", flush=True)

Wire format

The proxy speaks OpenAI Chat Completions, so you can also point the official openai Python package at ${CLARITTY_PLATFORM_URL}/api/v1 if you want a drop-in replacement. The surface here just gives you sensible Python defaults (env-var auto-config, dict messages, generator-based streaming).

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

claritty_sdk-2.5.0.tar.gz (98.0 kB view details)

Uploaded Source

Built Distribution

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

claritty_sdk-2.5.0-py3-none-any.whl (115.1 kB view details)

Uploaded Python 3

File details

Details for the file claritty_sdk-2.5.0.tar.gz.

File metadata

  • Download URL: claritty_sdk-2.5.0.tar.gz
  • Upload date:
  • Size: 98.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for claritty_sdk-2.5.0.tar.gz
Algorithm Hash digest
SHA256 3a678f741a4a840d31608ee9b69d809ec09da79ab568109f006b00b251828a8b
MD5 cec6b1a5e895cecc4992945b7d91a11f
BLAKE2b-256 926dcce4d406937b0f0dfe168c92cd26189441cba6bd87df4c98c4b99a5ada5e

See more details on using hashes here.

File details

Details for the file claritty_sdk-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: claritty_sdk-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 115.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for claritty_sdk-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43c897761f75efb921d9164ffd19972fc32446d76fe8be2dde6a1797aa566f92
MD5 4b5de34b56a6c9d06277475dc1b9aaea
BLAKE2b-256 835e768c78e6da6bdd6e2d3294105e7e3d60728059d422e9cacf4f10f16b70f3

See more details on using hashes here.

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