Metadata-Version: 2.4
Name: prefect-cloud
Version: 0.1.0a3
Summary: Package for easily deploying to Prefect Cloud.
Author-email: "Prefect Technologies, Inc." <help@prefect.io>
Requires-Python: >=3.10
Requires-Dist: croniter>=6.0.0
Requires-Dist: griffe>=1.5.6
Requires-Dist: httpx>=0.28.1
Requires-Dist: pendulum>=3.0.0
Requires-Dist: pydantic-extra-types>=2.10.2
Requires-Dist: pydantic-settings>=2.7.1
Requires-Dist: pydantic>=2.10.6
Requires-Dist: readchar>=4.2.1
Requires-Dist: rich>=13.9.4
Requires-Dist: toml>=0.10.2
Requires-Dist: typer>=0.13.1
Requires-Dist: typing-extensions>=4.12.2
Requires-Dist: tzlocal>=5.2
Requires-Dist: uv>=0.5.26
Description-Content-Type: text/markdown

# 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](https://docs.astral.sh/uv/getting-started/installation/)
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

Then install prefect-cloud:
```bash
uv pip install prefect-cloud
```

Alternatively, you can run `prefect-cloud` as a tool without installing it using `uvx`. See [uv tools guide](https://docs.astral.sh/uv/guides/tools/) for more details.

## Login to Prefect Cloud

```bash
prefect-cloud login
```

## Deploy your workflow

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

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

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

Deploy and run it using:
```bash
prefect-cloud deploy hello_world --from https://github.com/PrefectHQ/prefect-cloud/blob/main/examples/hello.py --run
```

### Options
**Only Deploy**
```bash
prefect-cloud deploy ...
```

**Deploy and Run**
```bash
prefect-cloud deploy ... --run --parameters name=value
```

**Dependencies**

```bash
# 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**
```bash
prefect-cloud deploy ... --env KEY=VALUE --env KEY2=VALUE2
```

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

## Managing Deployments

List all deployments:
```bash
prefect-cloud ls
```

Run a deployment:
```bash
prefect-cloud run function_name/deployment_name
```

Schedule a deployment (using cron):
```bash
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:
```bash
prefect-cloud pause function_name/deployment_name
prefect-cloud resume function_name/deployment_name
```
