Probably a basic question, but I’m wondering how p...
# ask-community
c
Probably a basic question, but I’m wondering how people organise their flow codes? I’m processing a whole heap of text files. Some use the exact same flow and tasks, whilst others have their own peculiarities. Do you generally have a
tasks.py
file with all your task functions? A
.py
with a
Flow
for each file you process? Interested to see how others work this.
s
I have in general one .py file for each flow. Common utilities and functions that all flows need live in a separate project which is in the docker image all the flows get run from. The project that contains all the flows has a custom class of mine called a FlowManager, which when run will gather all flows, register them, and optionally run them in the past (to backfill data in my use case). Will connect the FlowManager execution up to gitlabs cicd so that on push to our main branch all flows get registered and updated. Unsure what other people have or best practises, but this is my current setup
🙏 1
m
You can read this discussion where people sharing their deployment details. https://github.com/PrefectHQ/prefect/discussions/4042
🙏 2