Skip to main content

Package for easily deploying to Prefect Cloud.

Project description

prefect-cloud

:zap: Deploy your code on 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.

Login to Prefect Cloud

prefect-cloud login

Deploy your workflow

Deploy any Python function from a GitHub repository. For example:

# https://github.com/PrefectHQ/prefect-cloud/blob/main/examples/hello.py

def hello_world():
    print("Hello, World!")

Deploy and run it using:

prefect-cloud deploy hello_world --from https://github.com/PrefectHQ/prefect-cloud/blob/main/examples/hello.py --run

Options

Only Deploy

prefect-cloud deploy ...

Deploy and Run

prefect-cloud deploy ... --run --parameters name=value

Dependencies

# Package names
prefect-cloud deploy ... --with pandas --with numpy

# Or from files
prefect-cloud deploy ... --with requirements.txt
prefect-cloud deploy ... --with pyproject.toml

Environment Variables

prefect-cloud deploy ... --env KEY=VALUE --env KEY2=VALUE2

Private Repositories

prefect-cloud deploy ... --from https://github.com/myorg/private-repo/blob/main/flows.py --credentials GITHUB_TOKEN

Managing Deployments

List all deployments:

prefect-cloud ls

Run a deployment:

prefect-cloud run function_name/deployment_name

Schedule a deployment (using cron):

prefect-cloud schedule function_name/deployment_name "*/5 * * * *"  # Run every 5 minutes
prefect-cloud schedule function_name/deployment_name none  # Remove schedule

Format: minute hour day-of-month month day-of-week

Pause/Resume a deployment:

prefect-cloud pause function_name/deployment_name
prefect-cloud resume function_name/deployment_name

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prefect_cloud-0.1.0a4.tar.gz (85.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prefect_cloud-0.1.0a4-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file prefect_cloud-0.1.0a4.tar.gz.

File metadata

  • Download URL: prefect_cloud-0.1.0a4.tar.gz
  • Upload date:
  • Size: 85.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.31

File hashes

Hashes for prefect_cloud-0.1.0a4.tar.gz
Algorithm Hash digest
SHA256 86c20b65a54b6695639ff935cd40319ad511cb9b825428a5daaca5637d502040
MD5 960fdad4093a647093e5244a71944649
BLAKE2b-256 2179c5eafc7acee36482037084ffa26ecc6eabb45ec86894f8e70738617dbd6c

See more details on using hashes here.

File details

Details for the file prefect_cloud-0.1.0a4-py3-none-any.whl.

File metadata

File hashes

Hashes for prefect_cloud-0.1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 be79d0bfe52e0bdbf3d6eb3b12d9967532ee96819fd91b23b20a70017c111b09
MD5 e1773fd22d9f03802ebddf545675b3b6
BLAKE2b-256 31ad6cbc23671ce5e243cf33558812ed91dee05664f1586d65d0e4b6bd6a8993

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page