From 52413cc6d3087fe35de13cc2239a352223a026e5 Mon Sep 17 00:00:00 2001 From: wvandeun Date: Fri, 10 Jan 2025 00:25:29 +0100 Subject: [PATCH] adds documentation for property argument for SDK query methods --- docs/docs/python-sdk/guides/query_data.mdx | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/docs/python-sdk/guides/query_data.mdx b/docs/docs/python-sdk/guides/query_data.mdx index 7085550a81..063c9e4c85 100644 --- a/docs/docs/python-sdk/guides/query_data.mdx +++ b/docs/docs/python-sdk/guides/query_data.mdx @@ -522,6 +522,31 @@ Values of type `str` will be parsed using the [Pendulum](https://pendulum.eustac +### Properties of attributes and relationships + +By default, the [meta data or properties](/topics/metadata) of attributes and relationships are not included. We can include these properties using the `property` argument of the SDK client's `all`, `filters` or `get` method. + + + + + ```python + device = await client.get(kind="TestDevice", name__value="atl1-edge1", property=True) + print(device.name.is_protected) + print(device.name.source.display_label) + ``` + + + + + ```python + device = client.get(kind="TestDevice", name__value="atl1-edge1", property=True) + print(device.name.protected) + print(device.name.source.display_label) + ``` + + + + ## Query a node(s) in a different branch If you want to query a node(s) in a different branch than the default branch with which the SDK client was initiated, then you can use the `branch` argument of the query methods.