sayou-core
Overview
The Fundamental Foundation for Sayou Fabric.
sayou-core provides the shared DNA for all Sayou libraries. It defines the Base Architecture, Standard Data Protocols, and the Ontology Definitions that ensure consistency across the entire ecosystem.
While users typically interact with high-level pipelines (like sayou-brain), sayou-core acts as the invisible Spinal Cord, defining how modules communicate and how data is structured.
1. Architecture & Role
Core is not a processing engine itself but a Library of Standards. It enforces structure so that a Connector written by one developer can seamlessly talk to a Refinery written by another.
graph TD
Core[Sayou Core]
subgraph Standards
Base[BaseComponent]
Schema[Schemas & Protocols]
Onto[Ontology Definitions]
Reg[Plugin Registry]
end
Core --> Base & Schema & Onto & Reg
Lib1[Connector] -.->|Inherits| Base
Lib2[Wrapper] -.->|Uses| Onto
1.1. Core Features
- Unified Component Model: Every plugin inherits from
BaseComponent, guaranteeing standardized logging (self._log) and lifecycle management. - Lingua Franca (Schemas): Defines
SayouPacketandSayouBlockso modules exchange typed objects, not random dictionaries. - Ontology Hub: Centralizes vocabulary (
sayou:Topic,sayou:hasChild) to prevent semantic drift.
2. Key Components
2.1. Schemas (schemas.py)
The immutable data contracts used throughout the pipeline.
SayouPacket: The universal container for raw data transport (Connector -> Refinery).SayouBlock: The atomic unit of refined content (Refinery -> Chunking).SayouNode: The graph entity with ID, Class, and Attributes (Wrapper -> Assembler).
2.2. Ontology (ontology.py)
Defines the semantic vocabulary for the Knowledge Graph.
SayouClass: Enum of node types (e.g.,Document,Video,Function).SayouRelation: Enum of edge types (e.g.,contains,calls,next).
2.3. Base Architecture (base_component.py)
The root class for all Sayou objects. It handles configuration injection and provides utility decorators like @safe_run and @measure_time.
3. Installation
sayou-core is a dependency of all Sayou libraries and is installed automatically.
pip install sayou-core
4. Developer Guide (Usage)
Unlike other modules, you use sayou-core when building extensions or custom plugins, not for running pipelines.
Case A: Creating a Custom Component
Inherit from BaseComponent to get logging, error handling, and config management for free.
from sayou.core.base_component import BaseComponent
from sayou.core.decorators import measure_time, safe_run
from sayou.core.schemas import SayouPacket
class MyCustomPlugin(BaseComponent):
component_name = "MyPlugin"
@measure_time
@safe_run(default_return=None)
def process(self, data: str) -> SayouPacket:
self._log(f"Processing data: {data}...")
# Your custom logic here
result = data.upper()
return SayouPacket(data=result, success=True)
Case B: Using the Ontology
Use the centralized ontology enums to ensure your graph nodes are compatible with the standard visualizer.
from sayou.core.ontology import SayouClass, SayouRelation
# Correct usage
node_type = SayouClass.TOPIC # "sayou:Topic"
edge_type = SayouRelation.CONTAINS # "sayou:contains"
print(f"Creating a node of type: {node_type.value}")
5. License
Apache 2.0 License © 2026 Sayouzone
Metadata
Release files for sayou-core 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sayou_core-0.5.1.tar.gz | 17.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sayou_core-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.1 kB
Release files / sayou_core-0.5.1.tar.gz
| Download URL | sayou_core-0.5.1.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76d3daff27478f384942a7109eb8b1918213cf25a5d270eeb2df3bf14faf363e
|
|
BLAKE2b-256 checksum How to use checksums |
0f6ae10ed36142baad2464f4e28b5fdc8e7a0454e883275e9e544b8b95c8aafd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / sayou_core-0.5.1-py3-none-any.whl
| Download URL | sayou_core-0.5.1-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2e685c714179e396a4db4c9d3b9fee6efd14613e853ad6ceb939ad7e1887e0f
|
|
BLAKE2b-256 checksum How to use checksums |
af4c5240b9b959523362e9832140315af78c11747e4bd9b4222de8176f1ee367
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for sayou-core 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.