Deployments

The Datature Vi SDK exposes model serving through three related resources:

Resources

Name
Type
Description
Required
Default
client.deployments
Deployment
Live serving instances: a containerized model plus the request handler in front of it.
Optional
client.deployment_projects
DeploymentProject
The configuration container above a deployment: model bundle, environment, and per-project settings.
Optional
client.deployment_endpoints
DeploymentEndpoint
The externally addressable endpoints that surface a deployment.
Optional

A DeploymentProject groups related serving instances; each Deployment runs under one; DeploymentEndpoint records expose them externally.

Before You Start

Get started with the Vi SDK →

Running Models Locally

To serve a model on your own machine instead, use the SDK's local inference server or an NVIDIA NIM container.


Deployments

list()

List deployments in the current workspace.

deployments = client.deployments.list()

for dep in deployments.items:
    print(dep["deploymentId"], dep.get("spec", {}).get("status"))
for dep in client.deployments:
    print(dep.get("deploymentId"), dep.get("spec", {}).get("status"))

Parameters

Name
Type
Description
Required
Default
filter_criteria
string
Optional filter expression.
Optional
None
page_size
integer
Page size cap.
Optional
None
page
string
Pagination cursor from a previous call.
Optional
None

Returns: PaginatedResponse[dict]


get()

Fetch a single deployment by ID.

deployment = client.deployments.get("dep_abc123")
print(deployment)

Parameters

Name
Type
Description
Required
Default
deployment_id
string
Deployment identifier.
Required

Returns: dict


get_statistics()

Fetch live runtime statistics for a single deployment.

stats = client.deployments.get_statistics("dep_abc123")
print(stats)

Parameters

Name
Type
Description
Required
Default
deployment_id
string
Deployment identifier.
Required

Returns: dict


batch_get_statistics()

Fetch statistics for many deployments in one call. Cheaper than looping over get_statistics().

stats = client.deployments.batch_get_statistics(["dep_abc123", "dep_def456"])
print(stats)
ids = [d["deploymentId"] for d in client.deployments]
stats = client.deployments.batch_get_statistics(ids)

Parameters

Name
Type
Description
Required
Default
deployment_ids
array
List of deployment identifiers.
Required

Returns: dict


update()

Update a deployment in place using partial PATCH semantics.

client.deployments.update(
    deployment_id="dep_abc123",
    body={"metadata": {"attributes": {"owner": "platform-team"}}},
)

Parameters

Name
Type
Description
Required
Default
deployment_id
string
Deployment identifier.
Required
body
object
Partial document containing only the fields to update.
Required

Returns: dict


replace()

Fully replace a deployment document.

client.deployments.replace(
    deployment_id="dep_abc123",
    body={"spec": {"status": "Paused"}},
)

Parameters

Name
Type
Description
Required
Default
deployment_id
string
Deployment identifier.
Required
body
object
Full deployment document.
Required

Returns: dict


delete()

Delete a deployment.

client.deployments.delete("dep_abc123")

Parameters

Name
Type
Description
Required
Default
deployment_id
string
Deployment identifier.
Required

Returns: DeletedResource


Deployment projects

list()

List deployment projects.

for proj in client.deployment_projects:
    print(proj["deploymentProjectId"])

Parameters

Name
Type
Description
Required
Default
filter_criteria
string
Optional filter expression.
Optional
None
page_size
integer
Page size cap.
Optional
None
page
string
Pagination cursor from a previous call.
Optional
None

Returns: PaginatedResponse[dict]


get()

Fetch a single deployment project.

project = client.deployment_projects.get("dep_proj_123")
print(project)

Parameters

Name
Type
Description
Required
Default
deployment_project_id
string
Project identifier.
Required

Returns: dict


get_knowledge_base()

Fetch the knowledge base bundled with a deployment project, used by retrieval-style deployments.

kb = client.deployment_projects.get_knowledge_base("dp_abc")
print(kb["spec"]["sources"])

Parameters

Name
Type
Description
Required
Default
deployment_project_id
string
Owning deployment project.
Required

Returns: dict


update() / replace() / delete()

# Partial update
client.deployment_projects.update("dp_abc", {"metadata": {"attributes": {"env": "prod"}}})

# Full replace
client.deployment_projects.replace("dp_abc", {"spec": {"name": "Production"}})

# Delete
client.deployment_projects.delete("dp_abc")

Parameters

Name
Type
Description
Required
Default
deployment_project_id
string
Project identifier.
Required
body
object
Document body. Required for update() and replace() only.
Required

Returns: dict for update() and replace(), DeletedResource for delete().


Deployment endpoints

list()

List deployment endpoints in the workspace.

for endpoint in client.deployment_endpoints:
    print(endpoint["deploymentEndpointId"])

Parameters

Name
Type
Description
Required
Default
filter_criteria
string
Optional filter expression.
Optional
None
page_size
integer
Page size cap.
Optional
None
page
string
Pagination cursor from a previous call.
Optional
None

Returns: PaginatedResponse[dict]


get() / update() / replace() / delete()

# Fetch
endpoint = client.deployment_endpoints.get("dep_ep_123")

# Partial update
client.deployment_endpoints.update("dep_ep_123", {"metadata": {"attributes": {"tier": "public"}}})

# Full replace
client.deployment_endpoints.replace("dep_ep_123", {"spec": {"name": "public-api"}})

# Delete
client.deployment_endpoints.delete("dep_ep_123")

Parameters

Name
Type
Description
Required
Default
deployment_endpoint_id
string
Endpoint identifier.
Required
body
object
Document body. Required for update() and replace() only.
Required

Returns: dict for get(), update(), and replace(), DeletedResource for delete().


Response format

All three resources return plain dictionaries mirroring the platform's documents.

Common fields

Name
Type
Description
Required
Default
deploymentId / deploymentProjectId / deploymentEndpointId
string
Unique identifier for the resource
Optional
spec
object
Resource specification, including serving status where applicable
Optional
metadata
object
Creation and update timestamps
Optional

Related resources

Models API

List, get, and download model checkpoints from completed training runs.

Understanding Deployment

Concepts behind serving models on Datature Vi.

Vi SDK NIM

Deploy models as NVIDIA NIM containers with the SDK.

Vi SDK Inference

Run predictions locally with a downloaded model.


Did this page help you?