How lorenzo-gardini/async-node works
AsyncNode is a small runtime library for building lazy asynchronous computations: callers create a node, compose transformations or side effects, then await its cached result. It also provides executor factories and decorators for dispatching synchronous functions. The excerpts omit parts of AsyncNode’s implementation, so the graph shows only documented capabilities and wiring directly supported by the sampled code.
Main entry points: async_node.py Get and cache · schedulers.py Scheduler factory · decorators.py Executor decorators · __init__.py Package exports
Components 14
Async Computation
- Node factories
async_node/async_node.py - AsyncNode
async_node/async_node.py - Map and side effects
async_node/async_node.py - Node combination
async_node/async_node.py - Errors and retry
async_node/async_node.py - Delay and timeout
async_node/async_node.py - Get and cache
async_node/async_node.py - Function types
async_node/_functional_types.py
Executor Management
- Scheduler factory
async_node/schedulers.py - Dynamic IO scheduler
async_node/_dynamic_io_executor.py - Reusable executor
- Executor decorators
async_node/decorators.py
Public API
- Package exports
async_node/__init__.py
Other components
- Application caller
Connections 25
- Application caller → Package exports: imports
- Package exports → AsyncNode: exports
- Package exports → Scheduler factory: exports
- Application caller → Node factories: creates
- Node factories → AsyncNode: returns
- Application caller → Map and side effects: composes
- Map and side effects → Get and cache: awaits source
- Map and side effects → AsyncNode: returns node
- Application caller → Node combination: combines
- Node combination → Get and cache: gathers nodes
- Node combination → AsyncNode: returns node
- Application caller → Errors and retry: handles failures
- Errors and retry → Get and cache: retries result
- Errors and retry → AsyncNode: returns node
- Application caller → Delay and timeout: configures wait
- Delay and timeout → Get and cache: awaits source
- Delay and timeout → AsyncNode: returns node
- Application caller → Get and cache: awaits result
- Get and cache → Application caller: returns value
- Application caller → Scheduler factory: requests executor
- Scheduler factory → Dynamic IO scheduler: creates IO executor
- Scheduler factory → Reusable executor: requests reusable pool
- Application caller → Executor decorators: uses decorator
- Executor decorators → Scheduler factory: gets executor
- Executor decorators → Reusable executor: dispatches task