Iterate over spaces

async AsyncCogniteClient.data_modeling.spaces.__call__(
chunk_size: int | None = None,
limit: int | None = None,
) AsyncIterator[Space] | AsyncIterator[SpaceList]

Iterate over spaces

Fetches spaces as they are iterated over, so you keep a limited number of spaces in memory.

Parameters:
  • chunk_size (int | None) – Number of spaces to return in each chunk. Defaults to yielding one space a time.

  • limit (int | None) – Maximum number of spaces to return. Defaults to returning all items.

Yields:

Space | SpaceList – yields Space one by one if chunk_size is not specified, else SpaceList objects.