# ideos/gloe architecture

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

- Interactive diagram: https://gitdiagram.com/ideos/gloe
- Repository: https://github.com/ideos/gloe

## Overview

Gloe is a Python library for defining typed data-processing flows as connected transformers. Developers wrap functions as transformers, compose them into a flow, and invoke that flow to produce a result; flows can branch, choose conditional paths, and process collections. The README also documents sync/async composition, validation, and plotting. The tree and excerpts support these product capabilities, but some modules were not sampled, so links to their implementations are limited to documented behavior.

Main entry points: [`gloe/base_transformer.py`](https://github.com/ideos/gloe/blob/main/gloe/base_transformer.py) (Transformer base), [`gloe/functional.py`](https://github.com/ideos/gloe/blob/main/gloe/functional.py) (Transformer factories), [`gloe/transformers.py`](https://github.com/ideos/gloe/blob/main/gloe/transformers.py) (Sync transformers), [`gloe/async_transformer.py`](https://github.com/ideos/gloe/blob/main/gloe/async_transformer.py) (Async transformers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Flow authoring"]
  node_flow["Composed flow"]
  node_factories["Transformer factories<br/>[functional.py]"]
end

subgraph group_execution["Flow execution"]
  node_sync["Sync transformers<br/>[transformers.py]"]
  node_async["Async transformers"]
  node_base["Transformer base"]
end

subgraph group_operators["Flow operators"]
  node_gateway["Branch gateways"]
  node_conditional["Conditional flows"]
  node_collections["Collection flows"]
end

subgraph group_support["Validation and visualization"]
  node_ensurers["Input/output checks"]
  node_plotting["Flow visualization<br/>[_plotting_utils.py]"]
  node_graph["Flow graph model<br/>[_gloe_graph.py]"]
end

node_developer(("Developer"))
node_result(("Flow result"))

node_developer -->|"wrap functions"| node_factories
node_factories -->|"create transformers"| node_sync
node_factories -->|"create async transformers"| node_async
node_developer -->|"compose steps"| node_flow
node_sync -->|"connect steps"| node_flow
node_async -->|"connect steps"| node_flow
node_gateway -->|"add branches"| node_flow
node_conditional -->|"add conditions"| node_flow
node_collections -->|"add collection steps"| node_flow
node_developer -->|"invoke flow"| node_base
node_flow -->|"execute as"| node_base
node_base -->|"run sync steps"| node_sync
node_base -->|"run async steps"| node_async
node_base -->|"validate data"| node_ensurers
node_base -->|"return output"| node_result
node_base -.->|"plot flow"| node_plotting
node_plotting -.->|"build graph"| node_graph

click node_factories "https://github.com/ideos/gloe/blob/main/gloe/functional.py"
click node_sync "https://github.com/ideos/gloe/blob/main/gloe/transformers.py"
click node_async "https://github.com/ideos/gloe/blob/main/gloe/async_transformer.py"
click node_base "https://github.com/ideos/gloe/blob/main/gloe/base_transformer.py"
click node_gateway "https://github.com/ideos/gloe/tree/main/gloe/gateways"
click node_conditional "https://github.com/ideos/gloe/tree/main/gloe/conditional"
click node_collections "https://github.com/ideos/gloe/tree/main/gloe/collection"
click node_ensurers "https://github.com/ideos/gloe/tree/main/gloe/ensurer"
click node_plotting "https://github.com/ideos/gloe/blob/main/gloe/_plotting_utils.py"
click node_graph "https://github.com/ideos/gloe/blob/main/gloe/_gloe_graph.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_flow,node_factories toneBlue
class node_sync,node_async,node_base toneAmber
class node_gateway,node_conditional,node_collections toneMint
class node_ensurers,node_plotting,node_graph toneRose
class node_developer,node_result toneIndigo
```

## Components

### Flow authoring

- **Composed flow**
- [Transformer factories](https://github.com/ideos/gloe/blob/main/gloe/functional.py): `gloe/functional.py`

### Flow execution

- [Sync transformers](https://github.com/ideos/gloe/blob/main/gloe/transformers.py): `gloe/transformers.py`
- [Async transformers](https://github.com/ideos/gloe/blob/main/gloe/async_transformer.py): `gloe/async_transformer.py`
- [Transformer base](https://github.com/ideos/gloe/blob/main/gloe/base_transformer.py): `gloe/base_transformer.py`

### Flow operators

- [Branch gateways](https://github.com/ideos/gloe/tree/main/gloe/gateways): `gloe/gateways`
- [Conditional flows](https://github.com/ideos/gloe/tree/main/gloe/conditional): `gloe/conditional`
- [Collection flows](https://github.com/ideos/gloe/tree/main/gloe/collection): `gloe/collection`

### Validation and visualization

- [Input/output checks](https://github.com/ideos/gloe/tree/main/gloe/ensurer): `gloe/ensurer`
- [Flow visualization](https://github.com/ideos/gloe/blob/main/gloe/_plotting_utils.py): `gloe/_plotting_utils.py`
- [Flow graph model](https://github.com/ideos/gloe/blob/main/gloe/_gloe_graph.py): `gloe/_gloe_graph.py`

### Other components

- **Developer**
- **Flow result**

## Connections

- Developer → Transformer factories: wrap functions
- Transformer factories → Sync transformers: create transformers
- Transformer factories → Async transformers: create async transformers
- Developer → Composed flow: compose steps
- Sync transformers → Composed flow: connect steps
- Async transformers → Composed flow: connect steps
- Branch gateways → Composed flow: add branches
- Conditional flows → Composed flow: add conditions
- Collection flows → Composed flow: add collection steps
- Developer → Transformer base: invoke flow
- Composed flow → Transformer base: execute as
- Transformer base → Sync transformers: run sync steps
- Transformer base → Async transformers: run async steps
- Transformer base → Input/output checks: validate data
- Transformer base → Flow result: return output
- Transformer base → Flow visualization: plot flow
- Flow visualization → Flow graph model: build graph
