python/ray/serve/api.py
def list_deployments() -> Dict[str, Deployment]:
    """Returns a dictionary of all active deployments.

    Dictionary maps deployment name to Deployment objects.
    """
    infos = get_global_client().list_deployments()

    deployments = {}
    for name, (deployment_info, route_prefix) in infos.items():
        deployments[name] = Deployment(
            cloudpickle.loads(deployment_info.replica_config.serialized_deployment_def),
            name,
            deployment_info.deployment_config,
            version=deployment_info.version,
            init_args=deployment_info.replica_config.init_args,
            init_kwargs=deployment_info.replica_config.init_kwargs,
            route_prefix=route_prefix,
            ray_actor_options=deployment_info.replica_config.ray_actor_options,
            _internal=True,
        )

    return deployments
Returns a dictionary of all active deployments.

    Dictionary maps deployment name to Deployment objects.
    
Returns a dictionary of all active deployments.
Dictionary maps deployment name to Deployment objects.
Returns a dictionary of all active deployments . Dictionary maps deployment name to Deployment objects .
def list_deployments() -> Dict[str, Deployment]:
    infos = get_global_client().list_deployments()
    deployments = {}
    for name, (deployment_info, route_prefix) in infos.items():
        deployments[name] = Deployment(
            cloudpickle.loads(deployment_info.replica_config.serialized_deployment_def),
            name,
            deployment_info.deployment_config,
            version=deployment_info.version,
            init_args=deployment_info.replica_config.init_args,
            init_kwargs=deployment_info.replica_config.init_kwargs,
            route_prefix=route_prefix,
            ray_actor_options=deployment_info.replica_config.ray_actor_options,
            _internal=True,
        )
    return deployments
def list_deployments ( ) -> Dict [ str , Deployment ] : infos = get_global_client ( ) . list_deployments ( ) deployments = { } for name , ( deployment_info , route_prefix ) in infos . items ( ) : deployments [ name ] = Deployment ( cloudpickle . loads ( deployment_info . replica_config . serialized_deployment_def ) , name , deployment_info . deployment_config , version = deployment_info . version , init_args = deployment_info . replica_config . init_args , init_kwargs = deployment_info . replica_config . init_kwargs , route_prefix = route_prefix , ray_actor_options = deployment_info . replica_config . ray_actor_options , _internal = True , ) return deployments
Returns a dictionary of all active deployments.
Returns a dictionary of all active deployments .
"""Returns a dictionary of all active deployments.

    Dictionary maps deployment name to Deployment objects.
    """