prefect-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>
e.g.
prefect-cloud schedule hello_world/hello_world "0 * * * *"
Additional Options
Add Dependencies
# Add dependencies
prefect-cloud deploy ... --with pandas --with numpy
# Or install from requirements file at runtime
prefect-cloud deploy ... --with-requirements </path/to/requirements.txt>
Include Environment Variables
prefect-cloud deploy ... --env KEY=VALUE --env KEY2=VALUE2
Include Secrets as Environment Variables
# Create or replace secrets with actual values
prefect-cloud deploy ... --secret API_KEY=actual-secret-value --secret DB_PASSWORD=another-secret-value
# Reference existing secret blocks
prefect-cloud deploy ... --secret API_KEY="{existing-api-key-block}" --secret DB_PASSWORD="{my-database-password}"
From a Private Repository
(Recommended!) Install the Prefect Cloud GitHub App into the repository you want to deploy from. This will allow you to deploy from private repositories without needing to provide a personal access token.
prefect-cloud github setup
Alternatively, you can provide a personal access token on each deploy:
prefect-cloud deploy ... --from <private source repo URL> --credentials GITHUB_TOKEN
Metadata
Release files for prefect-cloud 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prefect_cloud-0.1.13.tar.gz | 134.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prefect_cloud-0.1.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 191.1 kB
Release files / prefect_cloud-0.1.13.tar.gz
| Download URL | prefect_cloud-0.1.13.tar.gz |
|---|---|
| Size | 134.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2aac771cabda0ef6c454892c3453e0356ec01ea9885e5098bfa6b2b4dc9a3344
|
|
BLAKE2b-256 checksum How to use checksums |
4a9c69ace239578a491250a21e18d6b066844c1356b48b0954883614efd6c43a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / prefect_cloud-0.1.13-py3-none-any.whl
| Download URL | prefect_cloud-0.1.13-py3-none-any.whl |
|---|---|
| Size | 56.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4f1514e40f814aefc6b85070249faa9a7b0de719646675e0ddd45b26ba4e73f
|
|
BLAKE2b-256 checksum How to use checksums |
5958a91050b8266b04202234d509218fe8e1cc8ffcb7db93e823a629fee42ab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|