{"id":19514341,"url":"https://github.com/hmntsharma/asynxpct","last_synced_at":"2025-06-30T23:03:09.606Z","repository":{"id":143394531,"uuid":"615407121","full_name":"hmntsharma/asynxpct","owner":"hmntsharma","description":"A combination of python subprocess, asyncio and pexpect libraries for network automation","archived":false,"fork":false,"pushed_at":"2023-03-18T15:59:18.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T23:32:24.346Z","etag":null,"topics":["asyncio","network-automation","network-programming","pexpect","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmntsharma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-17T16:11:22.000Z","updated_at":"2023-03-25T20:43:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7929fde-567e-49db-9805-7b460a165f66","html_url":"https://github.com/hmntsharma/asynxpct","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hmntsharma/asynxpct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmntsharma%2Fasynxpct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmntsharma%2Fasynxpct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmntsharma%2Fasynxpct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmntsharma%2Fasynxpct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmntsharma","download_url":"https://codeload.github.com/hmntsharma/asynxpct/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmntsharma%2Fasynxpct/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262863685,"owners_count":23376452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","network-automation","network-programming","pexpect","python"],"created_at":"2024-11-10T23:35:57.880Z","updated_at":"2025-06-30T23:03:09.534Z","avatar_url":"https://github.com/hmntsharma.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asynxpct\nA combination of python subprocess, asyncio and pexpect libraries for network automation\n\n## Introduction\n\nThis script demonstrates the cooperation between the Python packages pexpect, asyncio and subprocess for a certain network topology.\n\n\nModify before using according to your topology\n\n## Summary\n\n### Synchronous module\n\n```ruby\n(vntdvops) lab@netdevops:~/github/asynxpct$ python\nPython 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import xrshow\n\u003e\u003e\u003e xrshow.xrshow(\"pe1\", [\"show version\", \"show platform\"])\n---[ XRSHOW START ]---[ pe1 ]---[ show version ]---\nFri Mar 17 16:30:05.246 UTC\nCisco IOS XR Software, Version 7.5.2\nCopyright (c) 2013-2022 by Cisco Systems, Inc.\n\nBuild Information:\n Built By     : ingunawa\n Built On     : Tue Apr 26 18:04:31 PDT 2022\n Built Host   : iox-ucs-061\n Workspace    : /auto/srcarchive14/prod/7.5.2/xrv9k/ws\n Version      : 7.5.2\n Location     : /opt/cisco/XR/packages/\n Label        : 7.5.2\n\ncisco IOS-XRv 9000 () processor\nSystem uptime is 1 day 17 hours 25 minutes\n\n---[ XRSHOW END   ]---[ pe1 ]---[ show version ]---\n\n---[ XRSHOW START ]---[ pe1 ]---[ show platform ]---\nFri Mar 17 16:30:05.375 UTC\nNode              Type                       State             Config state\n--------------------------------------------------------------------------------\n0/0/CPU0          R-IOSXRV9000-LC-C          IOS XR RUN        NSHUT\n0/RP0/CPU0        R-IOSXRV9000-RP-C(Active)  IOS XR RUN        NSHUT\n---[ XRSHOW END   ]---[ pe1 ]---[ show platform ]---\n\n\u003e\u003e\u003e exit()\n(vntdvops) lab@netdevops:~/github/asynxpct$\n```\n\n\n### Used by synchronous cli script\n\n```ruby\n(vntdvops) lab@netdevops:~/github/asynxpct$ ./xrshowcli -n pe1 -c \"show version\" \"show platform\"\n---[ XRSHOW START ]---[ pe1 ]---[ show version ]---\nFri Mar 17 16:28:58.594 UTC\nCisco IOS XR Software, Version 7.5.2\nCopyright (c) 2013-2022 by Cisco Systems, Inc.\n\nBuild Information:\n Built By     : ingunawa\n Built On     : Tue Apr 26 18:04:31 PDT 2022\n Built Host   : iox-ucs-061\n Workspace    : /auto/srcarchive14/prod/7.5.2/xrv9k/ws\n Version      : 7.5.2\n Location     : /opt/cisco/XR/packages/\n Label        : 7.5.2\n\ncisco IOS-XRv 9000 () processor\nSystem uptime is 1 day 17 hours 24 minutes\n\n---[ XRSHOW END   ]---[ pe1 ]---[ show version ]---\n\n---[ XRSHOW START ]---[ pe1 ]---[ show platform ]---\nFri Mar 17 16:28:58.716 UTC\nNode              Type                       State             Config state\n--------------------------------------------------------------------------------\n0/0/CPU0          R-IOSXRV9000-LC-C          IOS XR RUN        NSHUT\n0/RP0/CPU0        R-IOSXRV9000-RP-C(Active)  IOS XR RUN        NSHUT\n---[ XRSHOW END   ]---[ pe1 ]---[ show platform ]---\n\n(vntdvops) lab@netdevops:~/github/asynxpct$\n```\n\n\n### Finally the Asynchronous Script to use the cli script\n\n```ruby\n./asyncxpct.py\n```\n\nKindly check the results folder for example of tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmntsharma%2Fasynxpct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmntsharma%2Fasynxpct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmntsharma%2Fasynxpct/lists"}