Skip to main content

Connector components for the Sayou Data Platform

Project description

sayou-connector

PyPI version License Docs

Overview

The Universal Data Ingestion Engine for Sayou Fabric.

sayou-connector provides a unified interface to fetch data from diverse sources—Files, Cloud Drives, Databases, and SaaS APIs—normalizing everything into a standard format called SayouPacket.

It decouples the logic of Navigation (Generator) from Retrieval (Fetcher), enabling complex recursive crawling, pagination, and API traversal strategies out of the box.


1. Architecture & Role

The Connector Pipeline manages the Feedback Loop between discovery and retrieval. It yields a stream of SayouPacket objects ready for the next stage (Refinery).

graph LR
    Source[Source String] --> Pipeline[Connector Pipeline]
    
    subgraph Generators [Navigation]
        Dir[File Walker]
        Crawler[Web Frontier]
        APIPag[API Paginator]
    end
    
    subgraph Fetchers [Retrieval]
        Local[File Read]
        HTTP[Requests]
        SQL[DB Query]
    end
    
    Pipeline --> Generators
    Generators -->|Task| Fetchers
    Fetchers -->|Packet| Pipeline
    Pipeline -->|Feedback| Generators

1.1. Core Features

  • Generator/Fetcher Pattern: Separates "Where to go next" (Generator) from "How to get it" (Fetcher).
  • Unified Packet: Whether the source is a Notion Page or a PostgreSQL Row, the output is always a uniform SayouPacket.
  • Resilience: Built-in rate limiting, retries, and error handling for unstable network sources.

2. Supported Sources

sayou-connector supports a vast array of plugins, continuously expanding to cover Enterprise SaaS and Databases.

Category Key Sources Description
Local / File file, obsidian Local file systems, Markdown vaults.
Web / Media web, youtube, wikipedia, rss Web crawling (Trafilatura), YouTube transcripts, Wiki articles.
SaaS / Cloud github, notion, google_drive, gmail Repository code, Notion workspaces, G-Suite documents.
Database postgres, mysql, mongodb, oracle SQL/NoSQL databases with pagination support.

3. Installation

pip install sayou-connector

4. Usage

The ConnectorPipeline acts as the entry point. It automatically detects the source type or accepts a specific strategy.

Case A: Local & Web (Simple)

Fetching simple files or web pages.

from sayou.connector import ConnectorPipeline

packets = ConnectorPipeline.process(
    source="./my_docs",
    strategy="file"
)

web_packets = ConnectorPipeline.process(
    source="https://news.daum.net/tech",
    strategy="web"
)

for packet in web_packets:
    print(f"[Fetched] {packet.uri} ({len(packet.data)} bytes)")

Case B: SaaS Integration (GitHub / Notion)

Fetching structured data from external APIs.

from sayou.connector import ConnectorPipeline

repo_packets = ConnectorPipeline.process(
    source="https://github.com/sayouzone/sayou-fabric",
    strategy="github"
)

print(f"Collected {len(list(repo_packets))} files from repo.")

Case C: Database Ingestion

Fetching rows from a database table.

from sayou.connector import ConnectorPipeline

db_config = {
    "host": "localhost",
    "user": "admin",
    "password": "password",
    "db": "sales_db"
}

# Fetch rows from 'orders' table
db_packets = ConnectorPipeline.process(
    source="orders", 
    strategy="postgres",
    config=db_config
)

# Each packet contains a batch of rows
for packet in db_packets:
    print(f"Batch rows: {len(packet.data)}")

5. Configuration Keys

The config dictionary is crucial for authentication and connection settings.

  • auth: API Keys (e.g., github_token, notion_token, google_creds).
  • db: Database credentials (host, port, user, password).
  • crawl: Web crawling settings (user_agent, depth_limit, domain_lock).
  • filter: File extensions to include/exclude (e.g., include=[".py", ".md"]).

6. License

Apache 2.0 License © 2026 Sayouzone

7. Plugin List

Plugin Example Description
GitHub Connector
Gmail Connector
Google Calendar Connector
Google Drive Connector
Google Docs Connector
Google Sheets Connector
Google Slides Connector
Youtube Connector
Youtube Public Connector
Email Connector
MongoDB Connector
MSSQL Connector
MySQL Connector
Oracle Connector
PostgreSQL Connector
SQLite Connector
Local File Connector
Requests Connector
Notion Connector
Obsidian Connector
RSS Connector
Trafilatura Connector
wikipedia Connector

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

sayou_connector-0.4.5.tar.gz (90.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sayou_connector-0.4.5-py3-none-any.whl (82.5 kB view details)

Uploaded Python 3

File details

Details for the file sayou_connector-0.4.5.tar.gz.

File metadata

  • Download URL: sayou_connector-0.4.5.tar.gz
  • Upload date:
  • Size: 90.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sayou_connector-0.4.5.tar.gz
Algorithm Hash digest
SHA256 78c33fd478c3e6fb5bf9b77332ccf2cc2771c8df5f34ad500b4b781c20828812
MD5 1d092106d8b438cfa745eed7ed3fe0a9
BLAKE2b-256 377a94a02a31095760ec7e32c9c5efcc454aa9219e6dfbc30f33270c4ceedd63

See more details on using hashes here.

File details

Details for the file sayou_connector-0.4.5-py3-none-any.whl.

File metadata

File hashes

Hashes for sayou_connector-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3ef64172cebcc2eea94147dcacf6599667d844bae547ecf13423f61f3e79b453
MD5 c42125597b10a5a2d5672991b86c35cf
BLAKE2b-256 67f2b09ef44dc43df5928e8a4ddd6b86e680d7fdc7f82f8e5b0bfbf71c9d7c68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page