Install & Compatibility
Where this runs
tested against v26.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.11
✕ build_error
✓ 32.44s
py 3.12
✕ build_error
✓ 33.53s
py 3.13
✕ build_error
✓ 32.64s
396MB installed
● package 396MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Reporter
✓ from pyats.reporter import Reporter
✗ from pyats.reporter import Reporter
The pyATS Reporter primarily functions as part of a larger pyATS test execution. This quickstart demonstrates how to set up and run a minimal pyATS job, which will automatically generate a report using `pyats-reporter` capabilities. The output can then be viewed through the `pyats logs view` command-line tool. A placeholder IP is used; replace with a reachable device or use pyATS mocking for actual execution without a physical device. Make sure to set `PYATS_TESTBED_PASSWORD` environment variable for the testbed credentials if running against a real device.
import os
import time
from pyats import aetest
from pyats.topology import loader
# Create a dummy testbed.yaml file for demonstration
with open('testbed.yaml', 'w') as f:
f.write('''
# Sample Testbed for pyATS Reporter Quickstart
testbed:
name: my_testbed
credentials:
default:
username: admin
password: ${PYATS_TESTBED_PASSWORD}
devices:
R1:
type: router
os: iosxe
connections:
cli:
protocol: ssh
ip: 10.1.1.1 # Placeholder IP, replace with a reachable device or mock
''')
# Create a simple AEtest job file
with open('my_test_job.py', 'w') as f:
f.write('''
from pyats import aetest
from pyats.topology import loader
class CommonSetup(aetest.CommonSetup):
@aetest.subsection
def connect_to_devices(self, testbed):
aetest.loop.mark(self.parent.testcases.test_basic_connectivity, device=testbed.devices.values())
for device in testbed.devices.values():
self.parent.parameters.update(device=device)
print(f"Attempting to connect to {device.name}")
# In a real scenario, this would attempt a connection.
# For quickstart, we'll simulate success.
# device.connect()
print(f"Simulated connection to {device.name} successful.")
class TestBasicConnectivity(aetest.Testcase):
@aetest.test
def test_ping_loopback(self, device):
print(f"Testing connectivity for {device.name}")
# In a real scenario, this would execute a command like `device.ping('1.1.1.1')`
# For quickstart, we'll simulate a passing test.
if device.name == 'R1':
self.passed(f"Simulated ping successful on {device.name}")
else:
self.failed(f"Simulated ping failed on {device.name}")
class CommonCleanup(aetest.CommonCleanup):
@aetest.subsection
def disconnect_from_devices(self, testbed):
for device in testbed.devices.values():
print(f"Simulated disconnection from {device.name}")
# In a real scenario: device.disconnect()
''')
# Set a dummy password for the quickstart's testbed if not already set
os.environ['PYATS_TESTBED_PASSWORD'] = os.environ.get('PYATS_TESTBED_PASSWORD', 'your_password_here')
print("Running pyATS job... This will generate a report.")
# To run the job and generate a report, use the pyats CLI command
# In a real environment, you'd run this from your terminal:
# pyats run job my_test_job.py --testbed-file testbed.yaml
# For this quickstart, we'll just demonstrate the files are set up.
print("A testbed.yaml and my_test_job.py have been created.")
print("To run the test and generate a report, execute in your terminal:")
print(" pyats run job my_test_job.py --testbed-file testbed.yaml")
print("After running, view the report with:")
print(" pyats logs view")
print("Cleanup: Remove 'testbed.yaml' and 'my_test_job.py' if desired.")
Debug
Known issues
breakingPython 3.6 reached End-of-Life. pyATS and pyats-reporter no longer support Python 3.6 after April 2022. Users must upgrade to Python 3.8 or newer.fixUpgrade your Python environment to version 3.8, 3.9, 3.10, 3.11, 3.12, or 3.13. pyATS officially supports these versions.
affects: <=22.3
gotchapyATS, including pyats-reporter, does not officially support Windows operating systems. It is designed for Linux and macOS environments.fixUse pyATS on a Linux or macOS environment, or within a Linux-based virtual machine or Docker container on Windows.
affects: All versions
gotchaTestbed YAML files are strict. Common mistakes include incorrect indentation, mismatching device names in the YAML with the actual device hostnames, or improper credential handling.fixEnsure strict YAML formatting. The 'name' or 'alias' for a device in the testbed file must exactly match the device's configured hostname. For credentials, use environment variables (`%ENV{VAR_NAME}`) instead of hardcoding. affects: All versions
deprecatedAs of pyATS 22.3, ReporterServer was modified to only generate `reporter.log` when running in verbose mode with the `-v` option.fixIf you relied on `reporter.log` always being generated, ensure you run your `pyats run job` commands with the `-v` flag for verbose output.
affects: Introduced in 22.3
Upgrade
Version history
26.5latest on PyPI · released May 28, 2026
Audit
Dependencies
pyatsrequiredpyats-reporter is a sub-component of the pyATS framework and is typically used within a pyATS test automation setup.