Skip to main content

Package for easily deploying to Prefect Cloud.

Project description

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.

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 https://github.com/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>

Inclcude Environment Variables

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

From a Private Repository

prefect-cloud deploy ... --from <private source repo URL> --credentials GITHUB_TOKEN

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.0.tar.gz (92.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.0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for prefect_cloud-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f1994a582344e13f4ef2b405e3f1d4e4450649966d35655852375547e9091ce4
MD5 7aeaad92e096e1435d42b165637c1ba2
BLAKE2b-256 d1e793200ed9428b6937aed8e0ef36db24c124accdbd0adb5afb1f7813f1cdd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefect_cloud-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49293a549dd0118123ada6d6c8e400dd81e1ad05d57019114042cedf474bcf12
MD5 88e30399461e6376da5e90930cb26cd9
BLAKE2b-256 dc3b806b44752728a2025544f63ce21d4bd8d9a869120518e334511724fa169c

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