Reverie CognitiveEvent schema — Pydantic models (canonical Python definition)
Project description
reverie-schema (Python)
Pydantic v2 models for the Reverie CognitiveEvent schema (v1.0). This is the
canonical Python definition used by:
reverie-adapter-openai— for emitting eventsreverie-api— for validating events on ingress
The wire format is camelCase JSON, identical to the TypeScript schema in
@reverie/schema. Internally, Python code uses snake_case field names; the
Pydantic models translate via alias_generator=to_camel.
Usage
from reverie_schema import CognitiveEvent, GoalPayload
event = CognitiveEvent(
type="goal.created",
run_id="...",
session_id="...",
agent_id="my-agent",
payload=GoalPayload(intent="...", priority="high", context=""),
)
# Wire serialization (camelCase, ready for HTTP / DB):
event.model_dump_json()
# Inbound validation (raises ValidationError on failure):
CognitiveEvent.model_validate_json(raw_json)
Install (editable, dev)
uv pip install -e ".[dev]"
pytest
Project details
Release history Release notifications | RSS feed
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 reverie_schema-0.1.0.tar.gz.
File metadata
- Download URL: reverie_schema-0.1.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d953fb6cc735f924e3f84dba0e77983d75374c52ac10e7dd4aef5c7302f92446
|
|
| MD5 |
562613ca3caa547b21631458564988d4
|
|
| BLAKE2b-256 |
d54c12860368b942a1d896408a24fb291fef0586c45a7951e63b5b6669d1dd20
|
File details
Details for the file reverie_schema-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reverie_schema-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b3f250de435e3b56c3cb4d6740b738bb445e9f4d3b88f93a22929999be3da86
|
|
| MD5 |
5999be1dbe325d348efe3c37e7bd70a5
|
|
| BLAKE2b-256 |
308793efb72a57d6e806fa5d517366c9763c452f8187d9f2b16cdfd8e229eea7
|