How to port a flow from Prefect¶
IronFlow is subset-compatible with Prefect 3.x patterns, not a drop-in replacement for the full Prefect OSS or Cloud runtime. Use this checklist when moving an existing flow.
- Swap imports — Replace
from prefect import flow, task(and related helpers) withfrom prefect_compat import .... See Prefect → IronFlow for a full concept map. - Wire the control plane — Register an
InMemoryControlPlane(or the persistence-backed plane your app uses) withset_control_planebefore running flows, matching patterns inpython-shim/tests/and Quick start (demo flow). - Stay inside the supported subset — Prefer
submitchains,mapwith clear shape, retries/timeouts/cancellation as documented. Avoid relying on blocks, full deployment/work-pool parity, or Prefect Cloud–only features until Compatibility matrix says otherwise. - Rename hooks if you use them — Prefect’s named lifecycle hooks are not mirrored literally. Use IronFlow
transition_hookswithTransitionHookSpec/on_transition; see Flows and the compatibility matrix. - Validate — Run
python -m pytest python-shim/testsand your own scripts locally; add a small smoke script underscripts/if you want a repeatable check.
When behavior diverges, Compatibility matrix is the source of truth for what is intentional versus not yet implemented.