Get Deployment
cc.get_deployment
Retrieve or refresh a client object for a deployed function service.
Parameters
function_id(Union[str, Deployment]
): ID string or client object for the target deployment.
wait(Union[bool, int, float]
): Option to wait for the deployment to be active. Defaults to False. Numerical values represent the approximate time to wait (in seconds) for the deployment to finish initializing, before raising a client-side TimeoutError
. The boolean value True corresponds to 3600, i.e. 1 hour.
settings(Settings
): User settings for Covalent Cloud. Defaults to settings on the client machine.
Return Type
Deployment
Returns
Deployment object for the function service.
Examples
import covalent_cloud as cc
# Create a deployment client using a function ID.
client = cc.get_deployment('<deployment-function-id>')
# Refresh a deployment client and wait for active state.
client = cc.get_deployment(client, wait=True)