Models

Provides coroutine-based methods for managing model records in the Norman persistence service.

The Models class allows retrieving, creating, upgrading, replacing, activating, and deleting model entries stored in the Norman system.

create_models(token, models) async

Coroutine

Create one or more new model records.


Parameters

  • token (Sensitive[str]) — Authentication token authorizing the request.

  • models (List[Model]) — List of Model objects to be created.


Response Structure

  • response (dict[str, Model]) — Mapping of newly created model IDs to their corresponding model objects.


delete_models(token, constraints) async

Coroutine

Delete one or more model records that match the provided constraints.

Parameters

  • token (Sensitive[str]) — Authentication token authorizing the request.

  • constraints (QueryConstraints) — Query constraints defining which models to delete. Supports filters like model name, ID, or status.

Response Structure

  • response (int) — Number of affected model records.

get_models(token, request=None) async

Coroutine

Retrieve model records that match the provided filtering constraints.

Parameters

  • token (Sensitive[str]) — Authentication token authorizing the request.

  • request (Optional[GetModelsRequest]) — Optional request object specifying filters and pagination. If not provided, defaults to fetching all completed (finished_models=True) models.

Response Structure

  • response (dict[str, Model]) — Dictionary mapping model IDs to corresponding Model objects.

replace_models(token, models) async

Coroutine

Replace existing models with updated definitions.

This operation overwrites model metadata in bulk and should be used cautiously, as it may alter existing configurations.

Parameters

  • token (Sensitive[str]) — Authentication token authorizing the request.

  • models (List[Model]) — List of model objects that should replace existing entries.


Response Structure

  • response (dict[str, Model]) — Dictionary mapping updated model IDs to their new definitions.


set_active_model(token, model_previews) async

Coroutine

Set one or more model versions as active.

This method updates model metadata to mark specific model versions as active in the system.

Parameters

  • token (Sensitive[str]) — Authentication token authorizing the request.

  • model_previews (List[ModelPreview]) — List of model previews to be marked as active.

Response Structure

  • response (List[ModelPreview]) — List of updated ModelPreview objects now marked as active.


·

©

2026

·

©

2026