# Repository Briefing: pathwaycom/pathway
> Source: https://repoforai.com/repo/pathwaycom/pathway (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/pathwaycom/pathway
- **Official Docs / Website**: https://pathway.com
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: See repository
- **Engineering Health**: B+ (73/100 · Maintenance 35/35 · Adoption 18/25 · Releases 14/20 · License 6/20)
- **Latest Release**: v0.32.1 (2026-08-01) — https://github.com/pathwaycom/pathway/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI
- **Momentum**: 61,929 ★ total (+0 24h / +10 7d) · 1,694 forks
- **Topics**: `batch-processing`, `data-analytics`, `data-pipelines`, `data-processing`, `dataflow`, `etl`, `etl-framework`, `iot-analytics`, `kafka`, `machine-learning-algorithms`, `pathway`, `python`
- **When to Use**: Best for: Python teams that want batch tests and live jobs to share transformation logic, particularly when document changes need to reach a retrieval index without scheduled full rebuilds. Skip if: You only need a periodic static index, already have a well-operated streaming and indexing stack, or require exactly-once semantics without adopting Enterprise.

## Overview
```text
### Architecture & Core Mechanics
Pathway exposes a Python table API over a Rust engine built on Differential Dataflow. Connectors populate tables, schemas describe inputs, and operators such as `filter` and `reduce` define the computation. Attach a sink and start execution with `pw.run()`. The runtime applies changes incrementally, so the same transformation code can run against batch inputs, stream replays, and live feeds.

Maturin is the Python build backend, and `Cargo.toml` defines `pathway_engine` as a Rust library and `cdylib`. Runtime dependencies include NumPy, pandas, PyArrow, and aiohttp. Built-in operators put dataflow execution in Rust; custom Python functions and connectors provide extension points, but their cost should be profiled separately. The engine supports multithreaded, multiprocess, and distributed execution, with distributed Kubernetes deployment covered by the Enterprise offering.

### Key Capabilities & Differentiators
The framework handles stateful joins, windowing, and sorting in addition to stateless transformations. Late and out-of-order records can revise computed results, and persistence saves computation state for restart. Input coverage includes Kafka, PostgreSQL, Google Drive, and SharePoint; Airbyte extends the supported source catalog, and custom Python connectors cover gaps.

The LLM extension adds service wrappers and utilities for live RAG. Examples include private RAG with Ollama and Mistral AI, adaptive RAG, and multimodal RAG with GPT-4o; LangChain and LlamaIndex integrations are also available. The Chroma sink maps table changes to collection records, including deletions. An explicit `primary_key` becomes the record ID; otherwise the sink uses Pathway’s internal row ID. Choose the key deliberately when downstream consumers depend on stable document identity.

### Trade-offs & Limitations
Compared with using Flink or Spark for processing and a separate service for index maintenance, Pathway lets a Python team define both pieces in one pipeline. That is useful when retrieval freshness depends on timely updates and deletions. It also puts ingestion, stateful processing, and model calls in the same application's operational scope. Benchmark representative key distributions, late arrivals, and Python UDFs; an incremental Rust engine does not eliminate the RAM cost of retained state or the latency of model calls.

The free edition provides at-least-once consistency; exactly-once is an Enterprise feature. Test crash and replay behavior at the actual source and sink boundaries, and design idempotent consumers where duplicates matter. Licensing also warrants a release-specific check: the Rust crate declares BUSL-1.1, while the Python manifest uses an Other/Proprietary License classifier. Review `LICENSE.txt` and the applicable edition terms rather than assuming a permissive open-source license.

### Hardware & Deployment Guide
Install `pathway` on Python 3.10+ on Linux or macOS, then run `python main.py` with a script that calls `pw.run()`. Set threads with `pathway spawn --threads 3 python main.py`, or package the app on `pathwaycom/pathway`; pin the tested package and image for production. The monitoring dashboard exposes connector message counts, latency, and logs. Kubernetes is a container deployment option; Enterprise covers distributed Kubernetes deployment with external persistence. Model execution can be local, as in the Ollama example, or use an external service, as in the GPT-4o example.

Connector changes are operationally significant: v0.31.0 added SQLite output with an append-only change stream or a maintained snapshot; v0.31.1 added Elasticsearch input via polling and overlap reconciliation rather than native CDC; v0.32.1 added Chroma synchronization. The supplied Cargo manifest declares 0.33.1, distinct from the latest listed release, v0.32.1. Validate connector behavior on the artifact you ship rather than assuming the source snapshot and published package match.
```

## Key Capabilities
```text
- Execution: Python table pipelines run on a Rust engine built on Differential Dataflow.
- Streaming semantics: Stateful joins, windows, and sorts update as new or out-of-order data arrives.
- Integration: Kafka, PostgreSQL, Google Drive, and SharePoint connectors are available alongside Airbyte and custom Python connectors.
- Live retrieval: The LLM extension covers RAG workflows, and `pw.io.chroma.write` synchronizes inserts, updates, and deletes to Chroma.
- Recovery: Persistence saves computation state; the free and Enterprise editions distinguish at-least-once from exactly-once guarantees.
- Runtime controls: Run a normal Python script or set worker threads with `pathway spawn --threads 3 python main.py`.
```

## Quick Start / Clone
```bash
pip install -U pathway
```
