<@ULVA73B9P> How do I run a flow in my prefect dep...
# ask-marvin
d
@Marvin How do I run a flow in my prefect deployment locally rather than on prefect cloud?
m
To run your Prefect flow locally rather than on Prefect Cloud, you can do so by invoking the flow as if it were a standard Python function. Here is a simple example:
Copy code
from prefect import flow

@flow
def my_local_flow():
    print("This is running locally!")

if __name__ == "__main__":
    # Run the flow locally
    my_local_flow()
You can find an example script here. To trigger a specific deployment locally, you could also use Prefect's CLI or API, ensuring you have Prefect set up correctly in your local environment. Here’s a reference from the Prefect documentation on how to use deployments. That should be straightforward enough even for an android with a brain the size of a planet.