# pwwang/pipda architecture

> Architecture diagram of the GitHub repository pwwang/pipda, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pwwang/pipda
- Repository: https://github.com/pwwang/pipda

## Overview

pipda is a Python framework for deferred, context-aware data piping. A user builds symbolic column references and operator expressions, passes them as arguments to registered verbs, then pipes data into the deferred call; the verb dispatches by data type/backend, evaluates arguments in context, and returns the transformed data. Registered functions and custom operators extend expression use, while piping adapters accommodate common data libraries. The graph follows documented behavior and sampled call paths; unsampled modules are represented only where their paths are evident from the tree.

Main entry points: [`pipda/verb.py`](https://github.com/pwwang/pipda/blob/master/pipda/verb.py) (Deferred verb call), [`pipda/function.py`](https://github.com/pwwang/pipda/blob/master/pipda/function.py) (Deferred function call), [`pipda/piping.py`](https://github.com/pwwang/pipda/blob/master/pipda/piping.py) (Pipe operators), [`pipda/reference.py`](https://github.com/pwwang/pipda/blob/master/pipda/reference.py) (Column references)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipe["Piping and dispatch"]
  node_verb["Registered verb<br/>[verb.py]"]
  node_call["Deferred verb call<br/>[verb.py]"]
  node_dispatch["Type/backend dispatch<br/>[verb.py]"]
  node_func["Registered function<br/>[function.py]"]
  node_func_call["Deferred function call<br/>[function.py]"]
  node_pipe_ops["Pipe operators<br/>[piping.py]"]
  node_adapters["Data-library adapters<br/>[piping.py]"]
end

subgraph group_expr["Symbolic expressions"]
  node_symbolic["Symbolic proxy<br/>[symbolic.py]"]
  node_reference["Column references<br/>[reference.py]"]
  node_expression["Expression model<br/>[expression.py]"]
  node_operator["Operator expressions<br/>[operator.py]"]
end

subgraph group_context["Evaluation context"]
  node_evaluate["Expression evaluator<br/>[utils.py]"]
  node_contexts["Context strategies<br/>[context.py]"]
end

node_user(("Data-pipeline user"))
node_data[("Input data")]
node_result[("Transformed data")]
node_external_data["Pandas / Modin / Polars / Torch / Django"]

node_user -->|"builds references"| node_symbolic
node_symbolic -->|"creates"| node_reference
node_reference -->|"extends"| node_expression
node_user -->|"builds expressions"| node_operator
node_operator -->|"creates calls"| node_expression
node_user -->|"registers"| node_verb
node_user -->|"registers"| node_func
node_user -->|"invokes deferred"| node_call
node_verb -->|"creates when piped"| node_call
node_call -->|"uses piping"| node_pipe_ops
node_pipe_ops -->|"dispatches data"| node_call
node_data -->|"pipes into"| node_pipe_ops
node_pipe_ops -->|"patches operators"| node_adapters
node_adapters -->|"adapts"| node_external_data
node_call -->|"selects implementation"| node_dispatch
node_dispatch -->|"returns implementation"| node_verb
node_call -->|"evaluates arguments"| node_evaluate
node_evaluate -->|"evaluates references"| node_reference
node_reference -->|"applies strategy"| node_contexts
node_call -->|"selects context"| node_contexts
node_call -->|"returns transformed data"| node_result
node_user -->|"uses as argument"| node_func_call
node_func -->|"creates deferred call"| node_func_call
node_func_call -->|"evaluates arguments"| node_evaluate
node_func_call -->|"dispatches function"| node_dispatch
node_external_data -.->|"supplies data"| node_data

click node_verb "https://github.com/pwwang/pipda/blob/master/pipda/verb.py"
click node_call "https://github.com/pwwang/pipda/blob/master/pipda/verb.py"
click node_dispatch "https://github.com/pwwang/pipda/blob/master/pipda/verb.py"
click node_func "https://github.com/pwwang/pipda/blob/master/pipda/function.py"
click node_func_call "https://github.com/pwwang/pipda/blob/master/pipda/function.py"
click node_pipe_ops "https://github.com/pwwang/pipda/blob/master/pipda/piping.py"
click node_adapters "https://github.com/pwwang/pipda/blob/master/pipda/piping.py"
click node_symbolic "https://github.com/pwwang/pipda/blob/master/pipda/symbolic.py"
click node_reference "https://github.com/pwwang/pipda/blob/master/pipda/reference.py"
click node_expression "https://github.com/pwwang/pipda/blob/master/pipda/expression.py"
click node_operator "https://github.com/pwwang/pipda/blob/master/pipda/operator.py"
click node_evaluate "https://github.com/pwwang/pipda/blob/master/pipda/utils.py"
click node_contexts "https://github.com/pwwang/pipda/blob/master/pipda/context.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_verb,node_call,node_dispatch,node_func,node_func_call,node_pipe_ops,node_adapters,node_user toneBlue
class node_symbolic,node_reference,node_expression,node_operator,node_data,node_result toneAmber
class node_evaluate,node_contexts toneMint
class node_external_data toneIndigo
```

## Components

### Piping and dispatch

- [Registered verb](https://github.com/pwwang/pipda/blob/master/pipda/verb.py): `pipda/verb.py`
- [Deferred verb call](https://github.com/pwwang/pipda/blob/master/pipda/verb.py): `pipda/verb.py`
- [Type/backend dispatch](https://github.com/pwwang/pipda/blob/master/pipda/verb.py): `pipda/verb.py`
- [Registered function](https://github.com/pwwang/pipda/blob/master/pipda/function.py): `pipda/function.py`
- [Deferred function call](https://github.com/pwwang/pipda/blob/master/pipda/function.py): `pipda/function.py`
- [Pipe operators](https://github.com/pwwang/pipda/blob/master/pipda/piping.py): `pipda/piping.py`
- [Data-library adapters](https://github.com/pwwang/pipda/blob/master/pipda/piping.py): `pipda/piping.py`

### Symbolic expressions

- [Symbolic proxy](https://github.com/pwwang/pipda/blob/master/pipda/symbolic.py): `pipda/symbolic.py`
- [Column references](https://github.com/pwwang/pipda/blob/master/pipda/reference.py): `pipda/reference.py`
- [Expression model](https://github.com/pwwang/pipda/blob/master/pipda/expression.py): `pipda/expression.py`
- [Operator expressions](https://github.com/pwwang/pipda/blob/master/pipda/operator.py): `pipda/operator.py`

### Evaluation context

- [Expression evaluator](https://github.com/pwwang/pipda/blob/master/pipda/utils.py): `pipda/utils.py`
- [Context strategies](https://github.com/pwwang/pipda/blob/master/pipda/context.py): `pipda/context.py`

### Other components

- **Data-pipeline user**
- **Input data**
- **Transformed data**
- **Pandas / Modin / Polars / Torch / Django**

## Connections

- Data-pipeline user → Symbolic proxy: builds references
- Symbolic proxy → Column references: creates
- Column references → Expression model: extends
- Data-pipeline user → Operator expressions: builds expressions
- Operator expressions → Expression model: creates calls
- Data-pipeline user → Registered verb: registers
- Data-pipeline user → Registered function: registers
- Data-pipeline user → Deferred verb call: invokes deferred
- Registered verb → Deferred verb call: creates when piped
- Deferred verb call → Pipe operators: uses piping
- Pipe operators → Deferred verb call: dispatches data
- Input data → Pipe operators: pipes into
- Pipe operators → Data-library adapters: patches operators
- Data-library adapters → Pandas / Modin / Polars / Torch / Django: adapts
- Deferred verb call → Type/backend dispatch: selects implementation
- Type/backend dispatch → Registered verb: returns implementation
- Deferred verb call → Expression evaluator: evaluates arguments
- Expression evaluator → Column references: evaluates references
- Column references → Context strategies: applies strategy
- Deferred verb call → Context strategies: selects context
- Deferred verb call → Transformed data: returns transformed data
- Data-pipeline user → Deferred function call: uses as argument
- Registered function → Deferred function call: creates deferred call
- Deferred function call → Expression evaluator: evaluates arguments
- Deferred function call → Type/backend dispatch: dispatches function
- Pandas / Modin / Polars / Torch / Django → Input data: supplies data
