Skip to main content

ClarosHQ Python SDK — provider-neutral AI observability and tracing client (OpenAI, Anthropic, LangChain adapters)

Project description

claroshq — ClarosHQ Python SDK

PyPI version Python versions License

claroshq is the official Python SDK for the ClarosHQ AI observability and governance platform. The core client is provider-neutral and model-neutral; provider-specific instrumentations (OpenAI, Anthropic Claude, LangChain) are shipped as optional extras and normalize events into a generic ClarosHQ trace and span schema.

Installation

Install the pinned 0.1.0 release from production PyPI:

python -m pip install claroshq==0.1.0

ClarosHQ Sprint 2 (S2-019) gates the public release on a clean-machine install proof against the same hosted index that external customers use. Until that proof has been recorded against production PyPI, the command above is the intended install path — the production upload of 0.1.0 is performed by the Publish SDK workflow on a sdk/v0.1.0 tag push and is gated by Omar's release decision. See docs/sprint-2/s2-019-builder-package.md for the current status and the release-target decision.

Install from TestPyPI (staging only)

TestPyPI is the staging index — it is used for the final dry-run of upload, metadata rendering, and fresh-environment install before the package is promoted to production PyPI. TestPyPI does not mirror production PyPI, so the --extra-index-url https://pypi.org/simple/ flag is required to resolve claroshq's runtime dependency httpx>=0.27 and any transitive dependencies:

python -m pip install claroshq==0.1.0 \
    --index-url https://test.pypi.org/simple/ \
    --extra-index-url https://pypi.org/simple/

A successful install from TestPyPI is a useful staging milestone, but it does not satisfy the ClarosHQ Sprint 1 commercial-completion gate — production PyPI is the release target for that.

Optional provider adapters

Optional provider adapters can be installed via extras (use the same ==0.1.0 pin to keep your install reproducible until you intentionally move to a newer release):

python -m pip install "claroshq[anthropic]==0.1.0"
python -m pip install "claroshq[langchain]==0.1.0"
python -m pip install "claroshq[all]==0.1.0"         # anthropic + langchain + openai

Note: there is no dedicated openai extra — openai is bundled with claroshq[all]. If you only need the OpenAI adapter, install the OpenAI client directly alongside claroshq (e.g. pip install claroshq==0.1.0 openai).

Editable install (contributors)

If you are working inside the ClarosHQ platform monorepo, install the SDK in editable mode with the development extras:

python -m venv sdk/.venv
sdk/.venv/Scripts/python -m pip install -U pip          # Windows
# source sdk/.venv/bin/activate                         # macOS / Linux
sdk/.venv/Scripts/python -m pip install -e "./sdk[dev]"

The dev extra installs pytest, ruff, black, mypy, pre-commit, build, and twine — everything needed to develop, lint, test, build, and publish the package.

Verify the install

After installing, confirm the SDK loaded correctly and reports the expected version:

python -c "import claroshq; print(claroshq.__version__)"

This should print:

0.1.0

Quickstart

import claroshq

claroshq.init(
    api_key="YOUR_CLAROSHQ_INGEST_KEY",
    endpoint="https://ingest.claroshq.ai",
)

# Auto-instrument every supported provider that is importable in this process:
claroshq.instrument_all()

# ... your existing OpenAI / Anthropic / LangChain code runs unchanged ...

claroshq.flush()

See the main repository README for the full local development and backend setup.

License

Apache-2.0. See the project metadata in pyproject.toml.

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

claroshq-0.1.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

claroshq-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file claroshq-0.1.0.tar.gz.

File metadata

  • Download URL: claroshq-0.1.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for claroshq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 99cb41eae7795ee87956c69f4ee7d08607e883f0392450fc3075608ff6864f82
MD5 1745a6ae2ab667d7b519d69aecebd0b5
BLAKE2b-256 86cfa722b9f728b6021dfc0f9911ebcbd8051c51d8064811b85f085e0f625adb

See more details on using hashes here.

File details

Details for the file claroshq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: claroshq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for claroshq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b577e04452f9a1250c3ae704e83fd81542931a467a01206ba63b555a87dce93
MD5 52bce23ef54ece3e2b8c95333b8eb77b
BLAKE2b-256 fba9449b7122765c61ee0152e79d9ddcb7b5cd9c40a5efc4b6a8e12700bf38fe

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