pyATS Datastructures provides extended data structures designed to enhance network automation and testing workflows. It offers specialized objects like `DataObject`, `DataList`, `DataDict`, and `MetaData` that allow for attribute-based access, schema validation, and meta-data handling, often used within the Cisco pyATS framework for managing configuration and state data. The current version is 26.3, and it follows the pyATS release cadence, typically releasing new versions quarterly or as needed with the main pyATS framework.
pip install pyats-datastructuresVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create and interact with a `DataObject`, assigning attributes and converting it to a standard Python dictionary. `DataObject` provides attribute-style access and allows for nesting other `DataObject` instances.
To perform iterable operations or convert to a native Python type, use specific methods like `DataObject.to_dict()` or `DataList.to_list()`. Interact with `DataDict` or `DataList` objects embedded within the `DataObject` for their respective operations.
Be aware of this implicit conversion. If you require a strictly plain `dict` or `list` nested within, you may need to convert it back explicitly or manage it outside the `DataObject` context. Alternatively, embrace the `DataDict`/`DataList` behavior for enhanced features.