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.2.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.2-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cecil_sdk-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 f0efebb9b261acda4aadc0291a3767edac37333ba5fa337db67e7987ff08c846
MD5 e81023418af08719cc6996edaa5acaae
BLAKE2b-256 f57987b5e1708ab549655b8ad051967269f1a6a0ec5edc2c73c41507a68493ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cecil_sdk-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 21.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b1d324d069ad0fcc99f65b8e852e3b6159c8a72174375c50fd452516f7c7605
MD5 86c5a8a73ebd2112f57f7a6c4d26105e
BLAKE2b-256 515c5fedf84eb06ff1b1a8d1951b5ee4c5050953add21b7e54c4ffb58bb6f848

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