{"library":"pyats-async","title":"pyATS Async","description":"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.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install pyats.async"],"cli":{"name":"pyats","version":"sh: 1: pyats: not found"}},"imports":["from pyats.async_ import pcall"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import time\nfrom pyats.async_ import pcall\n\ndef my_cpu_bound_task(item):\n    \"\"\"A sample CPU-bound task that simulates work.\"\"\"\n    # print(f\"Starting task for item {item}...\") # Uncomment to see individual task starts\n    time.sleep(1) # Simulate some CPU-intensive work\n    result = item * item\n    # print(f\"Finished task for item {item}, result: {result}\") # Uncomment to see individual task finishes\n    return result\n\nif __name__ == \"__main__\":\n    items_to_process = [1, 2, 3, 4, 5]\n\n    print(\"\\n--- Running tasks in parallel with pcall ---\")\n    # pcall executes the function in parallel processes and returns results in order.\n    parallel_results = pcall(my_cpu_bound_task, *items_to_process)\n    print(f\"All parallel tasks completed. Results: {parallel_results}\")\n\n    print(\"\\n--- Running tasks synchronously for comparison ---\")\n    sync_results = [my_cpu_bound_task(item) for item in items_to_process]\n    print(f\"All synchronous tasks completed. Results: {sync_results}\")\n","lang":"python","description":"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.","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":5.6,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyats.async","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":"77.2M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pyats.async","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":6.3,"import_time_s":null,"mem_mb":null,"disk_size":"59M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyats.async","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.async","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":5.5,"import_time_s":null,"mem_mb":null,"disk_size":"63M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyats.async","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.async","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.2,"import_time_s":null,"mem_mb":null,"disk_size":"55M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyats.async","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.async","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.6,"import_time_s":null,"mem_mb":null,"disk_size":"54M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyats.async","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":"57.0M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pyats.async","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":7.5,"import_time_s":null,"mem_mb":null,"disk_size":"87M"}]}}