{"library":"pyats-topology","title":"pyATS Topology","description":"pyATS Topology is a core component of the Cisco pyATS framework, providing robust objects and parsing capabilities for network testbed YAML definitions. It allows users to define network devices, links, and connections, enabling automated interaction with the network infrastructure for testing and operational tasks. The library is actively maintained and typically updated in sync with major pyATS framework releases, which occur quarterly or as needed.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install pyats-topology"],"cli":null},"imports":["from pyats.topology import Testbed","from pyats.topology import loader"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pyats.topology import loader\nimport os\n\n# Create a dummy testbed YAML file for demonstration\ntestbed_yaml_content = \"\"\"\nname: MyTestbed\ndevices:\n  router1:\n    type: iosxe\n    os: iosxe\n    connections:\n      cli:\n        protocol: ssh\n        ip: 10.0.0.1\n        port: 22\n      rest:\n        protocol: rest\n        port: 443\n\"\"\"\n\ntestbed_file_path = 'my_testbed.yaml'\nwith open(testbed_file_path, 'w') as f:\n    f.write(testbed_yaml_content)\n\n# Load the testbed\ntestbed = loader.load(testbed_file_path)\n\n# Access devices and connections\ndevice = testbed.devices['router1']\nprint(f\"Testbed Name: {testbed.name}\")\nprint(f\"Device Name: {device.name}, Type: {device.type}, OS: {device.os}\")\nprint(f\"CLI Connection IP: {device.connections['cli'].ip}\")\n\n# Clean up the dummy file\nos.remove(testbed_file_path)\n","lang":"python","description":"Demonstrates loading a testbed YAML file and accessing a defined device and its connection details. This is the fundamental way to interact with network topology in pyATS.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"25.9","pypi_latest":"26.4","is_stale":true,"summary":{"python_range":"3.10–3.9","success_rate":70,"avg_install_s":8.5,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyats-topology","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"171.2M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pyats-topology","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":9.1,"import_time_s":null,"mem_mb":null,"disk_size":"98M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyats-topology","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pyats-topology","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":8.1,"import_time_s":null,"mem_mb":null,"disk_size":"104M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyats-topology","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pyats-topology","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":6.5,"import_time_s":null,"mem_mb":null,"disk_size":"96M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyats-topology","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pyats-topology","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":7.3,"import_time_s":null,"mem_mb":null,"disk_size":"95M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyats-topology","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"99.2M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pyats-topology","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":11.4,"import_time_s":null,"mem_mb":null,"disk_size":"200M"}]}}