Package for easily deploying to Prefect Cloud.
Actively maintained. Last release 5 weeks ago. A safe choice.
pip install prefect-cloudprefect-cloud
:zap: Deploy your code to Prefect Cloud in seconds! :zap:
Deploy and run your Python functions on Prefect Cloud with a single command.
Installation
First, install uv if you haven't already. See installation docs here
curl -LsSf https://astral.sh/uv/install.sh | sh
Create and activate a virtual environment:
uv venv && source .venv/bin/activate
Then install prefect-cloud:
uv pip install prefect-cloud
Alternatively, you can run prefect-cloud as a tool without installing it using uvx. See uv tools guide for more details.
Quick Start with uvx (no installation required)
If you prefer to run without installing, you can use uvx to run prefect-cloud commands directly:
# Login to Prefect Cloud
uvx prefect-cloud login
# Connect to GitHub (for private repos)
uvx prefect-cloud github setup
# Deploy your workflow
uvx prefect-cloud deploy examples/hello.py:hello_world --from PrefectHQ/prefect-cloud
# Run it
uvx prefect-cloud run hello_world/hello_world
# Schedule it
uvx prefect-cloud schedule hello_world/hello_world "0 * * * *"
Login to Prefect Cloud
prefect-cloud login
Deploy your workflow
Deploy any Python function from a GitHub repository. For example:
# https://github.com/ExampleOwner/example-repo-cloud/blob/main/examples/hello.py
def hello_world():
print("Hello, World!")
Deploy to Prefect Cloud
prefect-cloud deploy <path/to/file.py:function_name> --from <source repo URL>
e.g.
prefect-cloud deploy examples/hello.py:hello_world --from PrefectHQ/prefect-cloud
Run it with
prefect-cloud run <flow_name>/<deployment_name>
e.g.
prefect-cloud run hello_world/hello_world
Schedule it with
prefect-cloud schedule <flow_name>/<deployment_name> <SCHEDULE>