TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Mr. Graph – A graph definition and execution library for Python

24 pointsby jmcminisabout 2 years ago
What:<p>Mr. Graph is a python library designed to make composing graphs of sync and async functions easy! Use google style docstrings to automagically create dataclasses and chain together function calls into graphs.<p>Why:<p>I like the design of Dagster, but not the latency. For apps and systems engineering, sometimes I want to compose a graph out of regular python functions. I don;t need all the heavy machinery that comes with a full workflow engine.<p>Current features:<p>- Use with either async or sync functions<p>- Uses google style doc strings to name return values.<p>- Creates dataclasses for each function&#x27;s output.<p>- Can infer pipelines from input and output signatures<p>- All directed acyclic graph layouts supported. linear, fan-in, fan- out.<p>Future Features:<p>- Better examples for use with async calls (like LLMs)<p>- Splitting dataclasses, better error handling, logging improvements.<p>This is under active development. Any feedback, interest, or contributions are appreciated. Thanks!<p>github link: <a href="https:&#x2F;&#x2F;github.com&#x2F;mcminis1&#x2F;mr-graph">https:&#x2F;&#x2F;github.com&#x2F;mcminis1&#x2F;mr-graph</a>

2 comments

schemescapeabout 2 years ago
Slight tangent: is anyone aware of a library (in Python or JS… or C) for specifying DAG pipielines <i>that supports caching results</i> (based on input)?<p>Make is closest I’ve found, but there’s probably something better out there.<p>Edit: I should look at other build tools, but ideally I want a library.<p>Edit again: I will be running this locally. Forgot to mention that.
评论 #35173136 未加载
评论 #35175763 未加载
评论 #35173236 未加载
adammarplesabout 2 years ago
There is a mistake in your first example, mixing up m and n. Does this automagical system mean that I need to write docstrings in your preferred style to get the names lined up?