Framework-agnostic core for Caesura — analyze, inject, and credit-metering logic shared across SDK integrations.
Project description
caesura-io-core
Framework-agnostic core for Caesura — shared analyze, inject, and credit-metering logic used by all SDK integrations.
This package is not meant to be used directly. It is the shared engine consumed by:
caesura-io-openai— OpenAI Python SDK wrapper
What's inside
| Module | Purpose |
|---|---|
CaesuraClient / AsyncCaesuraClient |
HTTP client that calls the /api/analyze endpoint |
MemoryCaesuraStore |
In-memory conversation state with LRU + idle-time eviction |
CaesuraEngine / AsyncCaesuraEngine |
Orchestrator: cadence checks, observe/analyze cycle, buffering, event emission |
create_credit_meter |
Accumulates and queries credit-usage metrics |
create_debug_logger |
Structured on_event logger for debugging |
| Helpers | hash_message, select_active, render_analysis, render_block, build_analyze_messages |
| Types | CaesuraConfig, CaesuraEvent, InjectConfig, SendConfig, etc. |
Install
pip install caesura-io-core
Usage
Most consumers should use the framework-specific wrappers. If you're building your own integration:
from caesura_core import create_caesura_engine, select_active, render_block
engine = create_caesura_engine(CaesuraConfig(
base_url="https://dev.caesura.io",
# api_key auto-read from CAESURA_API_KEY if omitted
))
# 1. Observe a conversation turn
engine.observe("conversation-id", [
AnalyzeMessage(
speaker_role="user",
speaker_name="Customer",
text="I need help preparing for the next meeting",
),
])
# 2. Retrieve buffered recommendations
state = engine.store.get("conversation-id")
active = select_active(state, engine.config.inject, time.time() * 1000)
blocks = render_block(active, engine.config.inject)
# → blocks contains rendered recommendation text ready for injection
License
Apache-2.0
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 caesura_io_core-1.0.2.tar.gz.
File metadata
- Download URL: caesura_io_core-1.0.2.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cc3ec2e8ac6e8deb7533d282f39cd57505dc8ff2a381dd1f5feaf16518f9af3
|
|
| MD5 |
c34e2e405d8f58177c2277be48332f09
|
|
| BLAKE2b-256 |
e42fc2e6620c8f34e9728ae91db8a25f055136b74a5ead69f152a7a8d32cb33b
|
Provenance
The following attestation bundles were made for caesura_io_core-1.0.2.tar.gz:
Publisher:
release.yml on caesura-io/sdk-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
caesura_io_core-1.0.2.tar.gz -
Subject digest:
1cc3ec2e8ac6e8deb7533d282f39cd57505dc8ff2a381dd1f5feaf16518f9af3 - Sigstore transparency entry: 2084699379
- Sigstore integration time:
-
Permalink:
caesura-io/sdk-py@693469628392faf2397d0e9fa3ac24beb5ba995f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/caesura-io
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@693469628392faf2397d0e9fa3ac24beb5ba995f -
Trigger Event:
push
-
Statement type:
File details
Details for the file caesura_io_core-1.0.2-py3-none-any.whl.
File metadata
- Download URL: caesura_io_core-1.0.2-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6df28c896537def3f1e0259166b3e9bb272738b71501e536b192b9ce8f5fff14
|
|
| MD5 |
dda4e9c945e4652a6070a5fcfa869fe9
|
|
| BLAKE2b-256 |
3eb85a26dd414749ee45f2ec0942b02d52434653922a0d4545157ababd5071bc
|
Provenance
The following attestation bundles were made for caesura_io_core-1.0.2-py3-none-any.whl:
Publisher:
release.yml on caesura-io/sdk-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
caesura_io_core-1.0.2-py3-none-any.whl -
Subject digest:
6df28c896537def3f1e0259166b3e9bb272738b71501e536b192b9ce8f5fff14 - Sigstore transparency entry: 2084699574
- Sigstore integration time:
-
Permalink:
caesura-io/sdk-py@693469628392faf2397d0e9fa3ac24beb5ba995f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/caesura-io
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@693469628392faf2397d0e9fa3ac24beb5ba995f -
Trigger Event:
push
-
Statement type: