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>

Include Environment Variables

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

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

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.3.tar.gz (101.1 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.3-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for prefect_cloud-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f8ade87059879c8f3b5b4737d3580d9d921be75bfd115cdf78fec4907d101809
MD5 18e739a312412228ad87e14f37745c3a
BLAKE2b-256 050799eefb38906cb7093c327516fccc2aa2afe5753ba9f794687c1d709e980c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefect_cloud-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 95b24cdd5b37906e96a5b8d4b1524f2b95da2cdb9d970b58c33be6c20381712f
MD5 540958b2b94427ad4434512702222263
BLAKE2b-256 1ec99c320c812df6958be2595fe584ec3fd92d7882c9cee4eb8e8e36de930fc6

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