Skip to main content

sayou-loader

PyPI version License Docs

Overview

The Universal Data Transport Engine for Sayou Fabric.

sayou-loader is the final mile delivery system. It abstracts the complexity of writing to external systems, providing a Unified Interface to save your Knowledge Graph, Embeddings, or Structured Records.

Whether you are saving to a local file for debugging or pushing millions of vectors to a production database, the interface remains consistent: just call process().


1. Architecture & Role

The Loader takes the Assembled Payload (Nodes, Edges, Documents) and reliably transports it to the target destination based on the selected strategy.

graph LR
    Payload[Assembled Payload] --> Pipeline[Loader Pipeline]
    
    subgraph Strategies
        File[File System]
        RDB[PostgreSQL]
        NoSQL[MongoDB]
        Graph[Neo4j]
        Search[Elasticsearch]
        Vector[ChromaDB]
    end
    
    Pipeline -->|Config Routing| Strategies

1.1. Core Features

  • Unified Write API: Switch from JSON to PostgreSQL by changing just one config string.
  • Resilience: Built-in retry logic with exponential backoff for database connections.
  • Batching: Automatically handles bulk inserts for high-throughput performance.

2. Available Strategies

sayou-loader supports the following storage backends out-of-the-box.

Category Strategy Key Description
File System file Saves as JSON, JSONL, or Pickle. Ideal for local debugging.
Graph DB neo4j Pushes Nodes and Edges via Cypher queries.
RDB postgres Maps structured attributes to Relational Tables.
NoSQL mongo Stores raw documents and metadata collections.
Vector DB chroma Upserts embeddings for semantic search.
Search Engine elasticsearch Indexes text fields for keyword search (BM25).

3. Installation

pip install sayou-loader

4. Usage

The LoaderPipeline is the entry point. You must provide a Strategy and the corresponding Configuration (credentials).

Case A: Local File (Simple)

Useful for checking the output of the Assembler during development.

from sayou.loader import LoaderPipeline

payload = {
    "nodes": [{"id": "1", "label": "Topic"}],
    "edges": [{"source": "1", "target": "2", "type": "LINK"}]
}

LoaderPipeline().process(
    data=payload,
    destination="./output/graph.json",
    strategy="file"
)

Case B: Knowledge Graph (Neo4j)

Connects to a Neo4j instance and synchronizes the graph topology.

from sayou.loader import LoaderPipeline

neo4j_config = {
    "uri": "bolt://localhost:7687",
    "user": "neo4j",
    "password": "password",
    "batch_size": 1000
}

LoaderPipeline().process(
    data=payload,
    destination="Neo4j Connection",
    strategy="neo4j",
    config=neo4j_config
)

Case C: Vector Database (Chroma)

Stores text chunks and their vector embeddings.

from sayou.loader import LoaderPipeline

chroma_config = {
    "host": "localhost",
    "port": 8000,
    "collection_name": "sayou_rag"
}

LoaderPipeline().process(
    data=payload,
    destination="ChromaDB",
    strategy="chroma",
    config=chroma_config
)

5. Configuration Keys

When using Database strategies, the config dictionary is mandatory.

  • neo4j: uri, user, password, database (optional), batch_size.
  • postgres: host, port, user, password, dbname, table_name.
  • mongo: connection_string, db_name, collection_name.
  • elasticsearch: hosts, index_name, http_auth (user, pass).
  • chroma: path (for local), host, port, collection_name.

6. License

Apache 2.0 License © 2026 Sayouzone

7. Plugin List

Plugin Example Description
File Loader ▶
PosrgreSQL Loader ▶
MongoDB Loader ▶
Neo4J Loader ▶
Chroma Loader ▶
Elastic Search Loader ▶

Metadata

Release files for sayou-loader 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sayou-loader 0.5.0
File Size Uploaded Provenance
sayou_loader-0.5.0.tar.gz 41.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sayou-loader 0.5.0
File Interpreter ABI Platform
sayou_loader-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 68.5 kB

Release files / sayou_loader-0.5.0.tar.gz

Download URL sayou_loader-0.5.0.tar.gz
Size 41.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e5ebd418962c445551900de7320a0b0e961bdc5305159624d4d07c094745a17c
BLAKE2b-256 checksum
How to use checksums
fbc94aaec426868d8de32126876df827f8a8c1c0d22ff99ce0537d987b16de58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / sayou_loader-0.5.0-py3-none-any.whl

Download URL sayou_loader-0.5.0-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0370fc20303b05e8d74bd6e0ed5b3ecb47fb0f9421c485f576afccc50a98bc71
BLAKE2b-256 checksum
How to use checksums
be95d39be430990e2d5a58420f92c052a815f212cb8f722448960ca746ca892a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for sayou-loader 0.5.0

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.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page