List views
- async AsyncCogniteClient.data_modeling.views.list(
- limit: int | None = 10,
- space: str | None = None,
- include_inherited_properties: bool = True,
- all_versions: bool = False,
- include_global: bool = False,
-
- Parameters:
limit (int | None) – Maximum number of views to return. Defaults to 10. Set to -1, float(“inf”) or None to return all items.
space (str | None) – (str | None): The space to query.
include_inherited_properties (bool) – Whether to include properties inherited from views this view implements.
all_versions (bool) – Whether to return all versions. If false, only the newest version is returned, which is determined based on the ‘createdTime’ field.
include_global (bool) – Whether to include global views.
- Returns:
List of requested views
- Return type:
Examples
List 5 views:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> view_list = client.data_modeling.views.list(limit=5)
Iterate over views, one-by-one:
>>> for view in client.data_modeling.views(): ... view # do something with the view
Iterate over chunks of views to reduce memory load:
>>> for view_list in client.data_modeling.views(chunk_size=10): ... view_list # do something with the views