Spaces

AsyncCogniteClient.data_modeling.spaces.apply(spaces)

Create or patch one or more spaces.

AsyncCogniteClient.data_modeling.spaces.delete(spaces)

Delete one or more spaces.

AsyncCogniteClient.data_modeling.spaces.list([...])

List spaces.

AsyncCogniteClient.data_modeling.spaces.retrieve(spaces)

Retrieve one or more spaces.

Data classes

class cognite.client.data_classes.data_modeling.spaces.Space(
space: str,
is_global: bool,
last_updated_time: int,
created_time: int,
description: str | None = None,
name: str | None = None,
)

Bases: SpaceCore

A workspace for data models and instances. This is the read version.

Parameters:
  • space (str) – A unique identifier for the space.

  • is_global (bool) – Whether the space is global or not.

  • last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

  • description (str | None) – Textual description of the space

  • name (str | None) – Human readable name for the space.

class cognite.client.data_classes.data_modeling.spaces.SpaceApply(space: str, description: str | None = None, name: str | None = None)

Bases: SpaceCore

A workspace for data models and instances. This is the write version

Parameters:
  • space (str) – A unique identifier for the space.

  • description (str | None) – Textual description of the space

  • name (str | None) – Human readable name for the space.

as_write() SpaceApply

Returns this SpaceApply instance.

class cognite.client.data_classes.data_modeling.spaces.SpaceApplyList(
resources: Sequence[T_CogniteResource],
)

Bases: CogniteResourceList[SpaceApply]

as_ids() list[str]

Converts all the spaces to a space id list.

Returns:

A list of space ids.

Return type:

list[str]

class cognite.client.data_classes.data_modeling.spaces.SpaceCore(space: str, description: str | None, name: str | None)

Bases: WritableDataModelingResource[SpaceApply], ABC

A workspace for data models and instances.

Parameters:
  • space (str) – A unique identifier for the space.

  • description (str | None) – Textual description of the space

  • name (str | None) – Human readable name for the space.

class cognite.client.data_classes.data_modeling.spaces.SpaceList(
resources: Sequence[T_CogniteResource],
)

Bases: WriteableCogniteResourceList[SpaceApply, Space]

as_apply() SpaceApplyList

Converts all the spaces to a space apply list.

Returns:

A list of space applies.

Return type:

SpaceApplyList

as_ids() list[str]

Converts all the spaces to a space id list.

Returns:

A list of space ids.

Return type:

list[str]

extend(other: Iterable[Any]) None

S.extend(iterable) – extend sequence by appending elements from the iterable

get(
space: str,
) Space | None

Get a space object from this list by space ID.

Parameters:

space (str) – The space identifier to get.

Returns:

The requested space if present, else None

Return type:

Space | None