https://prefect.io logo
s

Saulius Beinorius

11/24/2020, 8:22 AM
Hi, maybe I missed the relevant documentation, but what exactly does a python module need for the CLI to be able to register a flow? Is it a module-level variable called
flow
?
j

josh

11/24/2020, 12:29 PM
Hi @Saulius Beinorius in order to use the
prefect register -f file.py
command to register a flow all that needs to happen is that the flow is initialized in the file. No naming convention is required! That CLI command calls a function that pulls the flow object(s) out of the file for registration
s

Saulius Beinorius

11/24/2020, 1:54 PM
Ah, so it picks up on class instances then?
j

josh

11/24/2020, 2:18 PM
Yes!