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'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://github.com/mcminis1/mr-graph">https://github.com/mcminis1/mr-graph</a>
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.
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?