Skip to main content

orbitra.flows.orbitra_deploy

Functions

get_deployment_meta

Look up the OrbitraDeploymentMeta registered for a decorated callable. Args:
  • fn: The callable decorated with @orbitra_deployment (a PrefectFlow after decoration).
Returns:
  • The registered metadata for the callable.
Raises:
  • ValueError: If no deployment is registered for the given callable.

get_registered_deployments

orbitra_deployment

Decorator to register an Orbitra deployment. This decorator records metadata of a flow so it can later be deployed. It also automatically transforms the decorated function into a Prefect Flow (equivalent to @flow). Args:
  • name: A friendly name for the deployment. Defaults to the function’s name if not provided.
  • description: A free-form description of the deployment. Can be used to document the purpose, ownership, or context of the flow.
  • concurrency: Maximum number of concurrent runs allowed for this deployment. If omitted, no concurrency limit is enforced.
  • schedules: A list of schedule definitions attached to the deployment. Supported formats include
    • "cron={expr}" for cron-based schedules.
    • "interval={seconds}" for fixed interval schedules.
    • Any valid RRULE string (RFC 5545) for advanced recurrence rules.
  • enable_schedules_on_creation: If True, schedules are created on active state for new deployments. Useful for defining schedules and enabling them by default.
  • tags: A list of tags to associate with the deployment. Tags can be used for organization, filtering, or triggering rules.
  • flow_config: A callable returned by prefect.flow(...). The decorated function will be wrapped with it.
  • schedules_timezone: Timezone name to apply to all schedules for this deployment (e.g., "America/Sao_Paulo"). If omitted, "America/Sao_Paulo" will be used as the default timezone.
  • container_size: Defines the container resources to be used when generating the deployment infrastructure. Supported presets are "XS"(default), "S", "M", and "L", which map to
    • XS -> 1 GB memory / 1 CPU
    • S -> 2 GB memory / 1 CPU
    • M -> 4 GB memory / 2 CPUs
    • L -> 8 GB memory / 4 CPUs
Pass ContainerSize(memory_gb=..., cpu_cores=...) to define bespoke resources. Both memory_gb and cpu_cores must be integers; floats are not accepted. Values must also stay within the Azure Container Apps limits (1-240 GB RAM, 1-31 vCPU). If not defined, the default for the work pool will be used.
  • collision_strategy: Strategy to use when a new run is started while another is already running.
  • work_pool: Override the work pool for this specific deployment. When omitted, the deployment uses the project’s default work pool.
  • work_queue: Pin this deployment to a specific work queue inside its work pool. When omitted, Prefect uses the pool’s default queue. The named queue must already exist in the target work pool (provisioned via terraform).
Examples:

Classes

ContainerSize

OrbitraDeploymentMeta