Skip to content

Commit

Permalink
fix: instances/inspect example
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Dec 4, 2024
1 parent 6d71790 commit a74d4bd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cognite/client/_api/data_modeling/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,14 +726,24 @@ def inspect(
Examples:
Look up the involved views and containers for a given node and edge:
Look up the involved views for a given node and edge:
>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import NodeId, EdgeId
>>> from cognite.client.data_classes.data_modeling import InvolvedViews
>>> client = CogniteClient()
>>> res = client.data_modeling.instances.inspect(
... nodes=NodeId("my-space", "foo1"),
... edges=EdgeId("my-space", "bar2"),
... involved_views=InvolvedViews(all_versions=False),
... )
Look up the involved containers:
>>> from cognite.client.data_classes.data_modeling import InvolvedContainers
>>> res = client.data_modeling.instances.inspect(
... nodes=[("my-space", "foo1"), ("my-space", "foo2")],
... involved_containers=InvolvedContainers(),
... )
"""
identifiers = self._load_node_and_edge_ids(nodes, edges)
Expand Down

0 comments on commit a74d4bd

Please sign in to comment.