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.mddocs/telemetry-opt-in.mddocs/privacy-contract.mddocs/recommendations.mddocs/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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0efebb9b261acda4aadc0291a3767edac37333ba5fa337db67e7987ff08c846
|
|
| MD5 |
e81023418af08719cc6996edaa5acaae
|
|
| BLAKE2b-256 |
f57987b5e1708ab549655b8ad051967269f1a6a0ec5edc2c73c41507a68493ea
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b1d324d069ad0fcc99f65b8e852e3b6159c8a72174375c50fd452516f7c7605
|
|
| MD5 |
86c5a8a73ebd2112f57f7a6c4d26105e
|
|
| BLAKE2b-256 |
515c5fedf84eb06ff1b1a8d1951b5ee4c5050953add21b7e54c4ffb58bb6f848
|