pyATS Async is a sub-component of the pyATS ecosystem, a Python-based framework by Cisco specializing in data-driven and reusable network testing and automation. It wraps Python's multiprocessing module to enable asynchronous (parallel) execution of arbitrary functions. The library, currently at version 26.3, is actively maintained with a frequent release cadence, often monthly or bi-monthly.
pip install pyats.asyncVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `pcall` from `pyats.async_` to execute a CPU-bound function across multiple processes in parallel. It includes a synchronous comparison to highlight the benefits of parallel execution for such tasks.
Update your import statements from `from pyats.async import pcall` to `from pyats.async_ import pcall`.
Run `pyats.async` applications on a supported Linux or Mac environment, or within a Linux-based virtual machine or Docker container on Windows.
Understand the distinction between multiprocessing (CPU-bound) and asyncio (I/O-bound). Use `pyats.async` primarily for tasks that will benefit from parallel execution across multiple CPU cores.