Skip to main content

prefect.cli.sdk

Command line interface for SDK generation.

Functions

generate

generate(output: Path = typer.Option(..., '--output', '-o', help='Output file path for the generated SDK.'), flow: list[str] | None = typer.Option(None, '--flow', '-f', help='Filter to specific flow(s). Can be specified multiple times.'), deployment: list[str] | None = typer.Option(None, '--deployment', '-d', help="Filter to specific deployment(s). Can be specified multiple times. Use 'flow-name/deployment-name' format for exact matching.")) -> None
(beta) Generate a typed Python SDK from workspace deployments. The generated SDK provides IDE autocomplete and type checking for your deployments. Requires an active Prefect API connection (use prefect cloud login or configure PREFECT_API_URL).  Examples: Generate SDK for all deployments: $ prefect sdk generate —output ./my_sdk.py Generate SDK for specific flows: $ prefect sdk generate —output ./my_sdk.py —flow my-etl-flow Generate SDK for specific deployments: $ prefect sdk generate —output ./my_sdk.py —deployment my-flow/production