any suggested design patterns for creating librari...
# prefect-community
k
any suggested design patterns for creating libraries of reusable flows? I.e. if I want to wrap up
A -> B -> C
so that user 1 can create
A -> B -> C -> X1 -> Y1
and user 2 can create
A -> B -> C -> Q2
by simply importing and building off an existing
A -> B -> C
flow?
c
Someone else should definitely chime in here, but the
update
method on Flows would most likely be useful for a pattern like this: https://docs.prefect.io/api/unreleased/core/flow.html#prefect-core-flow-flow-update
k
ah, cool!
j
@Kyle Foreman (Convoy) this is a pattern we definitely want to promote, so please suggest APIs that would be helpful to you!
k
in terms of discoverability, I searched the docs for both
merge
and
union
since I was trying to think of relevant graph terms and
update
didn't show up for either - maybe adding one of those terms to the docstring on
update
would help?
j
Interesting idea thanks
We chose
update
to mimic the dict API but we’ll definitely work to make it more discoverable and that’s a great starting place
k
ah, gotcha - I think of Prefect more in terms of graphs than dicts, so I didn't even think of that
j
See that’s good insight right there 😉 appreciate the feedback!