Skip to main content

Graph-based Pipeline Builder

Project description

Typed Graph-like Pipeline Builder

Pipy Downloads Issues Type Check Tests Deploy Docs Documentation

A pydantically typed, lightweight graph framework for Python that combines features from Langgraph with static type safety.

A community collection of nodes will be available here.

Overview

  • Pydantic Typing:
    Built on Pydantic and Generics for 100% strict static type safety.
  • Inheritance or Protocols:
    Extend, specialize and join state and node classes.
  • Parallel Task Processing:
    Multiple nodes can run simultaneously
  • Dual State Management:
    • State with automatic change extraction and conflict detection
    • Shared state accessible by all nodes, protected via explicit locking
  • Flexible Routing:
    Define simple node-to-node edges or dynamic routing based on functions.
  • Streaming:
    A standardized interface for streaming data between nodes.
  • Hooks Interface:
    Customizability and predefined interactive step-by-step debugging class.
  • Error Edges:
    Configure node error handling in the graph.

Installation

PyPI

pip install edgygraph

Python 3.13+ is required

Example Workflow

Import Classes

from edgygraph import State, Shared, Node, START, END, Graph
import asyncio

Create a State

class MyState(State):

    capslock: bool = False

Create a Node

class MyNode(Node[MyState, Shared]):

    async def __call__(self, state: MyState, shared: Shared) -> None:

        if state.capslock:
            print("HELLO WORLD!")
        else:
            print("Hello World!")

Create Instances

state = MyState(capslock=True)
shared = Shared()

node = MyNode()

Create a Graph

graph = Graph[MyState, Shared](
    edges=[
        (
            START,
            node,

            END,
        )
    ]
)

Run Graph

asyncio.run(graph(state, shared))

More examples can be found in the examples folder

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edgygraph-0.0.89.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

edgygraph-0.0.89-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file edgygraph-0.0.89.tar.gz.

File metadata

  • Download URL: edgygraph-0.0.89.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for edgygraph-0.0.89.tar.gz
Algorithm Hash digest
SHA256 420f2f15d25896679677035e2c8c1cd6c0a5c507dcc60952fa3cd1451f2910f6
MD5 b4250dadba7b48f0dbe8d804a36dadad
BLAKE2b-256 9d6e688a8a91c285c224620760a60cd9f55a4830599d6940aff835daaf4a054e

See more details on using hashes here.

Provenance

The following attestation bundles were made for edgygraph-0.0.89.tar.gz:

Publisher: publish.yml on mathisxy/edgygraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file edgygraph-0.0.89-py3-none-any.whl.

File metadata

  • Download URL: edgygraph-0.0.89-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for edgygraph-0.0.89-py3-none-any.whl
Algorithm Hash digest
SHA256 a07a590f6878c643b65bf983c4d43e22a6180f19a6b36e4443f333ab55e7c82a
MD5 49c31713bfc854a7ce33df2e4541667b
BLAKE2b-256 17b8821fb48b8e084dbedeab0414f5a195df409a3ef341701dc756a47e8f91c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for edgygraph-0.0.89-py3-none-any.whl:

Publisher: publish.yml on mathisxy/edgygraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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