Skip to content

Instantly share code, notes, and snippets.

@prziborowski
prziborowski / gist:ba3ebf610dd6cca3f4e7be5e2874499f
Last active July 16, 2023 00:42
Use property collector to retrieve names quickly
#!/usr/bin/env python
"""
Written by Nathan Prziborowski
Github: https://github.com/prziborowski
This code is released under the terms of the Apache 2
http://www.apache.org/licenses/LICENSE-2.0.html
The property collector can be used to fetch a subset of properties
for a large amount of objects with fewer round trips that iterating.
This sample shows how to use the TraversalSpec to get properties
of another object without multiple calls.