Jeff Kehler
03/24/2022, 2:52 AMmy_module/
flows/
my_flow.py
tasks/
lib/
tasks/
shared_task.py
So in my_flow.py
I am importing from my_module.lib.tasks.shared_task.py
where i've created a reusable Task class. But I am unable to register this flow using the prefect command
prefect register --project Test -m <http://my_module.flows.my|my_module.flows.my>_flow
I've tried many different combinations of the prefect register
command and it just continues to generate a ModuleNotFoundError: No module named my my_module
However, if I just use flow.register()
inside of my_flow.py
and execute it using python my_module/flows/my_flow.py
it registers just fine.Kevin Kho
03/24/2022, 2:55 AMsetup.py
in the root and then pip install -e .
. I have an example of a basic setup.py
here. You need the ___init___.py
files to be picked up though when you pip installprefect register --project Test --path my_module/flows/my_flow.py
and it might be easierJeff Kehler
03/24/2022, 2:58 AMKevin Kho
03/24/2022, 3:00 AM