Hi, question regarding flow registration - During ...
# prefect-community
s
Hi, question regarding flow registration - During follow registration, it requires packages used in the flow to be already installed on the machine. One walkaround is to import packages inside each tasks, however, is there a way to not duplicate code and import at top level? Thank you!
j
Is there a reason why you wouldn't install the packages and import them at the top? You shouldn't need to do imports within tasks
s
We have separate flow images for different tenants, but a single image used in CI/CD for registering the flows.
k
I don’t think you can because
Copy code
import pandas as pd
makes a variable named
pd
of type
Module
. But putting it inside a task makes it a local variable.