Back to Prefect

profile

docs/v3/api-ref/python/prefect-cli-profile.mdx

3.6.30.dev32.8 KB
Original Source

prefect.cli.profile

Profile command — native cyclopts implementation.

Manages Prefect profiles.

Functions

ls <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L38" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
ls()

List profile names.

create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
create(name: str)

Create a new profile.

use <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L139" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
use(name: str)

Set the given profile to active.

delete <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L211" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
delete(name: str)

Delete the given profile.

rename <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L240" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
rename(name: str, new_name: str)

Change the name of a profile.

inspect <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L270" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
inspect(name: Annotated[Optional[str], cyclopts.Parameter(help='Name of profile to inspect; defaults to active.')] = None)

Display settings from a given profile; defaults to active.

populate_defaults <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L321" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
populate_defaults()

Populate the profiles configuration with default base profiles, preserving existing user profiles.

check_server_connection <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L410" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
check_server_connection() -> ConnectionStatus

Classes

ConnectionStatus <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/profile.py#L399" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Methods:

auto <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/utilities/collections.py#L70" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
auto() -> str

Exposes enum.auto() to avoid requiring a second import to use AutoEnum