AI-Graph Documentation

Python Version License: GPL v3 Code style: black

Welcome to AI-Graph, a powerful and flexible framework for building AI processing pipelines using the Chain of Responsibility pattern.

πŸš€ Features

  • πŸ”— Pipeline Architecture: Build complex processing pipelines using chained steps

  • πŸ”„ ForEach Processing: Iterate over collections or run fixed iterations with sub-pipelines

  • πŸ—οΈ Modular Design: Easily extensible with custom pipeline steps

  • πŸ“Š Progress Tracking: Built-in progress bars with tqdm integration

  • πŸ§ͺ 100% Test Coverage: Comprehensive test suite with pytest

  • 🎯 Type Safe: Full type hints support with mypy

  • πŸ“¦ Modern Python: Built with modern Python packaging standards

πŸ“š Quick Start

Installation

pip install ai-graph

Basic Usage

from ai_graph.pipeline import Pipeline
from ai_graph.step import BaseStep

# Create a custom step
class MyStep(BaseStep):
    def process(self, data: dict[str, any]) -> dict[str, any]:
         """
         Process data in this step.

         Parameters:
         -----------

         data (dict): Input data for this step

         key: "input" is an integer that will be processed

         Returns
         -------

         dict: Processed data
         """
         # Example processing logic
         return {"result": data["input"] * 2}
# Build and run pipeline
pipeline = Pipeline()
pipeline.add_step(MyStep())
result = pipeline.run(input_data={"input": 5})
print(result)  # Output: {"result": 10, "input": 5}

πŸ—οΈ Architecture Overview

AI-Graph is built around three core concepts:

  1. Steps: Individual processing units that transform data

  2. Pipelines: Chains of steps that process data sequentially

πŸ“– Documentation Contents

🀝 Contributing

We welcome contributions! Please see our Contributing to AI-Graph guide for details.

πŸ“„ License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

πŸ™‹ Support

Indices and tables