<@ULVA73B9P> - If I have a python file with a sing...
# ask-marvin
k
@Marvin - If I have a python file with a single flow in it, can I set the entrypoint to just be the file and prefect will find the flow or do I have to specify
$flow_file.py:my_flow_func
?
m
In Prefect 3.x, you need to specify the entrypoint using the format
<path_to_script>:<flow_func_name>
. Prefect does not automatically detect the flow function in a file if you only provide the file path. For instance, you should use
my_flow_file.py:my_flow_func
. Here are some relevant resources: - Prefect Flows Documentation - Example Script for Flow Entrypoints If you have any more questions or need further clarification, feel free to ask.
In Prefect 3.x, you need to specify the entrypoint as
$flow_file.py:my_flow_func
. Prefect requires the full path to the flow function, including both the file and the function name. This ensures that Prefect can correctly locate and execute the desired flow. For more details, you can explore the relevant Prefect documentation and code examples: - Flow Entrypoint Example - Flow Engine Code If you're curious about the top-level API, Prefect includes features like
flow
,
task
,
deploy
, and others, which might be helpful for your work.