Skip to main content

Python SDK for the GraphIngest Orchestrator

Project description

GraphIngest Python SDK

Python SDK for the GraphIngest workflow orchestration platform — define pipeline nodes and graphs with decorators, deploy with one call.

Installation

pip install graphingest

# With AI agent support:
pip install graphingest[react]

# With LangGraph integration:
pip install graphingest[langgraph]

Quick Start

from graphingest import node, graph, deploy, RetryPolicy

@node(name="extract", cache_ttl=3600)
def extract(url: str) -> dict:
    return {"url": url, "rows": 100}

@node(name="transform")
def transform(data: dict) -> dict:
    return {"cleaned": True, **data}

@graph(
    name="etl-pipeline",
    retry_policy=RetryPolicy(max_retries=3, delay_seconds=1, backoff_factor=2, jitter=True),
    timeout_seconds=600,
)
def pipeline(url: str):
    data = extract(url)
    return transform(data)

deploy()

Features

  • @node decorator — Define individual tasks with caching, retries, and timeouts
  • @graph decorator — Compose nodes into pipelines with retry policies and state hooks
  • .map() fan-out — Parallel execution across multiple inputs
  • .arun() async dispatch — Fire-and-forget with NodeFuture
  • deploy() — Push code to platform with zero config
  • Input-based caching — SHA-256 hashing with configurable TTL
  • Incremental retries — Resume from failure point, not from scratch
  • AI agents — Built-in ReAct agents and LangGraph integration

Fan-Out (.map)

@graph(name="parallel-pipeline")
def pipeline(urls: list[str]):
    results = extract.map(urls)  # dispatches N parallel workers
    return results

Async Dispatch (.arun)

@graph(name="async-pipeline")
def pipeline(data: dict):
    future = transform.arun(data)   # returns immediately
    do_other_stuff()
    result = future.result(timeout=120)  # block until ready
    return result

AI Agent Orchestration

from graphingest.react import agent

@agent(name="researcher", tools=[search, scrape], model="standard")
def research(query: str) -> str:
    """You are a research assistant."""
    ...

answer = research.run("What are the latest advances in fusion energy?")

Environment Variables

Variable Required Description
GRAPHINGEST_API_URL Yes Control plane URL
GRAPHINGEST_API_KEY Yes API key

Documentation

Full documentation at graphingest.io/docs

License

MIT

Project details


Download files

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

Source Distribution

graphingest-0.2.0.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

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

graphingest-0.2.0-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file graphingest-0.2.0.tar.gz.

File metadata

  • Download URL: graphingest-0.2.0.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for graphingest-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fe790a8309fc0ff06787caaeb028841dcd764f9cd77079ab26a4e7718d9dadee
MD5 e771f307be83998a51ed08ac2354b13f
BLAKE2b-256 11388fb3dad7958a9825ee78a030255123676cc3e4f5e6250422cc8b011975a8

See more details on using hashes here.

File details

Details for the file graphingest-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: graphingest-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for graphingest-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8501d4ca54d5e4860a92a17b36384133515a00b42abc600ed7a3171e4937c2e9
MD5 c1d5d5f340dbfb3e8e819dbfbca0dee4
BLAKE2b-256 03e2ee13b0436581f568d49ed3fdcb9056767dc4f4c77e9bc86c38368980b5d5

See more details on using hashes here.

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