Manage complex calculation flow via robust DAG-based dependency logic in Python
Smart computation management - Only recalculate what's necessary
Loman tracks the state of your computations and their dependencies, enabling intelligent partial recalculations that save time and computational resources. Perfect for data pipelines, real-time systems, and complex analytical workflows.
🎯 Selective Updates: Control which outputs to compute and when
💾 State Persistence: Serialize computation graphs for inspection and recovery
🔍 Visual Debugging: Built-in GraphViz integration for computation visualization
⚡ Real-time Ready: Perfect for systems with inputs that tick at different rates
🧪 Research Friendly: Iterate quickly by updating methods and re-running only necessary computations
🔗 Framework Agnostic: Works with NumPy, Pandas, and your favorite Python libraries
🚀 Quick Start
The above computation graph was generated with this simple Loman code:
from loman import Computation
# Create a computation graph
comp = Computation()
comp.add_node('a', value=1) # Input node
comp.add_node('b', lambda a: a + 1) # b depends on a
comp.add_node('c', lambda a, b: 2 * a) # c depends on a and b
comp.add_node('d', lambda b, c: b + c) # d depends on b and c
comp.add_node('e', lambda c: c + 1) # e depends on c
# Smart computation - only calculates what's needed
comp.compute('d') # Will not compute 'e' unnecessarily!
# Inspect intermediate values
comp.to_dict()
# {'a': 1, 'b': 2, 'c': 2, 'd': 4, 'e': None}
# Visualize the computation graph
comp.draw() # Creates the graph shown above
Loman transforms how you build and maintain complex data processing pipelines by making computational dependencies explicit and manageable. Instead of manually tracking what needs to be recalculated when data changes, Loman handles this automatically.
Perfect for:
🔴 Real-time Systems: Handle inputs that tick at different rates efficiently