Skip to main content

Lightweight LLM observability SDK with privacy-first defaults

Project description

Cecil Python SDK

cecil-sdk is a privacy-first Python SDK for LLM cost visibility and cache optimization insights.

Install

pip install cecil-sdk

Quickstart

import cecil

cecil.patch()

Default behavior is local-only. No telemetry is sent unless explicitly enabled. Current instrumentation targets synchronous provider clients.

Usage Analytics Report

import cecil
from openai import OpenAI

session = cecil.start_session()
client = OpenAI()
client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Summarize this SDK in one sentence."}],
)

session.print_report(usd_decimals=8)
session.save_json("cecil_usage_report.json", usd_decimals=8)
session.close()

Why Cecil

  • Privacy-first defaults (hashed metadata, no raw prompt export by default)
  • Fail-open instrumentation (SDK failures do not break provider calls)
  • Actionable cost and cache opportunity analytics
  • Lightweight integration (import cecil; cecil.patch())

Current Scope

  • OpenAI sync path: openai.resources.chat.completions.Completions.create
  • Anthropic sync path: anthropic.resources.messages.Messages.create
  • Async provider clients are not instrumented in the current release.

Development

pip install -e ".[dev]"
make lint
make typecheck
make test
make build
python -m twine check dist/*
python scripts/smoke_check_wheel.py

Documentation

  • docs/quickstart.md
  • docs/telemetry-opt-in.md
  • docs/privacy-contract.md
  • docs/recommendations.md
  • docs/release-checklist.md

License

MIT. See LICENSE.

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

cecil_sdk-0.2.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

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

cecil_sdk-0.2.1-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file cecil_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: cecil_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cecil_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 36854089d7c11816f6a9f238f14c60d0ab058ebd6cbf2e55fa9f4f25f029e26b
MD5 31462ee201eb5872435c232e5990cfe0
BLAKE2b-256 309fc633fa964805b3050c7605b74bbef4e0bb6c38229d97b3152beed0d8a5d6

See more details on using hashes here.

File details

Details for the file cecil_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: cecil_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cecil_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff901086f743c38c172eddb77bd26e90769aa5bfb77d43b09b931251fc32a719
MD5 4aae52a66d5c9cf8a5577b4cc5d358e6
BLAKE2b-256 e57dddca8e709b4f141f61cbfd4ae54af30a7c63b3f44d86d6fccae13ad057ae

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