serve method.
This method creates a deployment for the flow and starts a long-running process
that monitors for work from the Prefect server.
When work is found, it is executed within its own isolated subprocess.
hello_world.py
- schedules
- event triggers
- metadata such as tags and description
- default parameter values
Serve multiple flows at once
Serve multiple flows with the same process using theserve utility along
with the to_deployment method of flows:
Retrieve a flow from remote storage
You can retrieve flows from remote storage with theflow.from_source
method.
flow.from_source accepts a git repository URL and an entrypoint pointing to the
flow to load from the repository:
load_from_url.py
GitRepository
instead of URL:
load_from_storage.py