{"id":32971834,"url":"https://github.com/fooelisa/pyiosxr","last_synced_at":"2026-03-27T02:45:52.174Z","repository":{"id":28501886,"uuid":"32018321","full_name":"fooelisa/pyiosxr","owner":"fooelisa","description":"Python library to interact with Cisco devices running IOS-XR","archived":false,"fork":false,"pushed_at":"2022-10-18T15:09:13.000Z","size":174,"stargazers_count":68,"open_issues_count":9,"forks_count":28,"subscribers_count":17,"default_branch":"master","last_synced_at":"2026-02-20T20:55:48.702Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fooelisa.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}},"created_at":"2015-03-11T13:12:55.000Z","updated_at":"2024-02-26T09:33:48.000Z","dependencies_parsed_at":"2022-09-03T16:12:21.997Z","dependency_job_id":null,"html_url":"https://github.com/fooelisa/pyiosxr","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/fooelisa/pyiosxr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooelisa%2Fpyiosxr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooelisa%2Fpyiosxr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooelisa%2Fpyiosxr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooelisa%2Fpyiosxr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fooelisa","download_url":"https://codeload.github.com/fooelisa/pyiosxr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooelisa%2Fpyiosxr/sbom","scorecard":{"id":406415,"data":{"date":"2025-08-11","repo":{"name":"github.com/fooelisa/pyiosxr","commit":"2bc11797013f1c29d2d338c32edb95068ebdf524"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":4,"reason":"Found 4/10 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-55x5-fj6c-h6m8","Warn: Project is vulnerable to: PYSEC-2014-9 / GHSA-57qw-cc2g-pv5p","Warn: Project is vulnerable to: PYSEC-2021-19 / GHSA-jq4v-f5q6-mjqq","Warn: Project is vulnerable to: PYSEC-2020-62 / GHSA-pgww-xf46-h92r","Warn: Project is vulnerable to: PYSEC-2022-230 / GHSA-wrxv-2j5q-m38w","Warn: Project is vulnerable to: PYSEC-2018-12 / GHSA-xp26-p53h-6h2p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T21:23:44.526Z","repository_id":28501886,"created_at":"2025-08-18T21:23:44.527Z","updated_at":"2025-08-18T21:23:44.527Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31011923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T02:33:22.146Z","status":"ssl_error","status_checked_at":"2026-03-27T02:33:21.763Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-11-13T05:00:31.832Z","updated_at":"2026-03-27T02:45:52.150Z","avatar_url":"https://github.com/fooelisa.png","language":"Python","funding_links":[],"categories":["Vendor Abstraction Library"],"sub_categories":["NETCONF"],"readme":"[![PyPI](https://img.shields.io/pypi/v/pyiosxr.svg)](https://pypi.python.org/pypi/pyIOSXR)\n[![PyPI](https://img.shields.io/pypi/dm/pyiosxr.svg)](https://pypi.python.org/pypi/pyIOSXR)\n[![Build Status](https://travis-ci.org/fooelisa/pyiosxr.svg?branch=master)](https://travis-ci.org/fooelisa/pyiosxr)\n[![Coverage Status](https://coveralls.io/repos/github/fooelisa/pyiosxr/badge.svg?branch=master)](https://coveralls.io/github/fooelisa/pyiosxr?branch=master)\n\n\npyIOSXR: Python library to manage devices running IOS-XR using the XML agent\n============================================================================\n\npyIOSXR is a Python library that facilitates communication with Cisco devices running IOS-XR through the XML agent.\nInitially was developed by Elisa Jasinska [@fooelisa](https://github.com/fooelisa) and integrated in [NAPALM](https://github.com/napalm-automation/napalm-iosxr).\nIt is now maintained by Mircea Ulinic [@mirceaulinic](https://github.com/mirceaulinic)\n\nRequirements\n=============\n\n* netmiko \u003e= 0.5.2\n* lxml \u003e= 3.4.2\n\n* IOS-XR \u003e= 5.1.0\n\n\nInstall\n=======\n\nInstall via pip:\n```bash\npip install pyIOSXR\n```\n\nFor upgrade:\n```bash\npip install --upgrade pyIOSXR\n```\n\nUsage\n======\n\nFirstly make sure that the XML agent is properly enabled on the device:\n\n    # xml agent tty iteration off\n\n\nDocumentation\n=============\n\n### Connect and lock config\nConnect to an IOS-XR device and auto-lock config:\n```python\n\u003e\u003e\u003e from pyIOSXR import IOSXR\n\u003e\u003e\u003e device = IOSXR(hostname='lab001', username='ejasinska', password='passwd', port=22, timeout=120)\n\u003e\u003e\u003e device.open()\n```\n\n### Connect without auto-lock\nConnect to an IOS-XR device withoug locking the config:\n```python\n\u003e\u003e\u003e from pyIOSXR import IOSXR\n\u003e\u003e\u003e device = IOSXR(hostname='lab001', username='ejasinska', password='passwd', port=22, timeout=120, lock=False)\n\u003e\u003e\u003e device.open()\n```\n\n### Lock and unlock manually\n```python\nIf we connected to the device without locking the config, we might want to lock/unlock it later:\n\u003e\u003e\u003e device.lock()\n\u003e\u003e\u003e ...\n\u003e\u003e\u003e device.unlock()\n```\n\n### Load and Compare Config\nLoad a candidate configuration from a file and show the diff that is going to\nbe applied when committing the config:\n```python\n\u003e\u003e\u003e device.load_candidate_config(filename='unit/test/config.txt')\n\u003e\u003e\u003e device.compare_config()\n---\n+++\n@@ -704,0 +705,3 @@\n+interface TenGigE0/0/0/21\n+ description testing-xml-from-file\n+!\n```\n\n### Get current loaded candidate config\nGet the currently pending changes from the candidate configuration loaded by\nload_candidate_config(). candidate can be merged with the current\nrunning configuration by applying the \"merge\" keyword\n```python\n\u003e\u003e\u003e device.get_candidate_config(merge=False, formal=False)\n!! IOS XR Configuration 5.2.2\ninterface GigabitEthernet0/0/0/0\n description test\n!\nend\n```\n\n### Discard Candidate Config\nIf an already loaded configuration should be discarded without committing it,\ncall discard_config():\n```python\n\u003e\u003e\u003e device.discard_config()\n\u003e\u003e\u003e device.compare_config()\n\u003e\u003e\u003e\n```\n\n### Load, Compare and Merge Config\nIf you want to commit the loaded configuration and merge it with the existing\nconfiguration, call commit_config():\n(comment and label is optional parameters)\n```python\n\u003e\u003e\u003e device.load_candidate_config(filename='unit/test/other_config.txt')\n\u003e\u003e\u003e device.compare_config()\n---\n+++\n@@ -704,0 +705,3 @@\n+interface TenGigE0/0/0/21\n+ description testing-xml-from-the-other-file\n+!\n\u003e\u003e\u003e device.commit_config(label='my label', comment='my comment')\n```\n\n### Merge Config with Timer based autorollback\nIf you want to commit the loaded configuration with a timed autorollback that\nneeds to be confirmed use the confirmed= keyword on the commit, parameters is\nseconds to wait before autorollback, values from 30 to 300sec.\nwhen using confirmed= you need to do another commit_config() without parameters\nwithin the time spesified to acknowledge the commit or else it rolls back your changes.\n(comment and label are optional parameters)\n```python\n\u003e\u003e\u003e device.load_candidate_config(filename='unit/test/other_config.txt')\n\u003e\u003e\u003e device.commit_config(label='my label', comment='my comment', confirmed=30)\n.... Code to do checks etc ....\n\u003e\u003e\u003e device.commit_config()\n```\n\n### Commit Replace Config\nIf you would rather commit the config by replacing the existing configuration,\ncall commit_replace_config():\n(comment and label is optional parameters)\n```python\n\u003e\u003e\u003e device.load_candidate_config(filename='unit/test/full_config.txt')\n\u003e\u003e\u003e device.compare_replace_config()\n\u003e\u003e\u003e device.commit_replace_config(label='my label', comment='my comment')\n```\n\n### Rollback Config\nAfter a previous commit, rollback() will return to the configuration prior\nto the commit:\n```python\n\u003e\u003e\u003e device.rollback()\n```\n\n### Running Show Commands\nAny show command can be executed in the following fashion, with the command\nembedded into the call:\n```python\n\u003e\u003e\u003e device.show_bgp_summary()\n...\n\u003e\u003e\u003e device.show_interfaces()\n...\n\u003e\u003e\u003e device.show_interfaces(\"GigabitEthernet0/0/0/0\")\n...\n\u003e\u003e\u003e device.show_controller(\"GigabitEthernet0/0/0/0\", \"phy\")\n...\n\u003e\u003e\u003e device.show_configuration(config=True)\n```\n\n### Running XML Commands\nAn arbitrary XML command can be executed with the command:\n```python\n\u003e\u003e\u003e device.make_rpc_call(\"\u003cGet\u003e\u003cOperational\u003e\u003cLLDP\u003e\u003cNodeTable\u003e\u003c/NodeTable\u003e\u003c/LLDP\u003e\u003c/Operational\u003e\u003c/Get\u003e\")\n...\n```\n\n### Close Connection\nCall close() to close the connection to the device:\n```python\n\u003e\u003e\u003e device.close()\n```\n\n### Debugging Connection\nLog the communication between pyIOSXR and the router to any file-like like stdout, or an actual file:\n```python\n\u003e\u003e\u003e from pyIOSXR import IOSXR\n\u003e\u003e\u003e import sys\n\u003e\u003e\u003e device=IOSXR(hostname=\"router\", username=\"cisco\", password=\"cisco\", port=22, timeout=120, logfile=sys.stdout)\n\nOR\n\n\u003e\u003e\u003e from pyIOSXR import IOSXR\n\u003e\u003e\u003e import sys\n\u003e\u003e\u003e file = open(\"logfile.log\")\n\u003e\u003e\u003e device=IOSXR(hostname=\"router\", username=\"cisco\", password=\"cisco\", port=22, timeout=120, logfile=file)\n```\n\nThanks\n======\nA special thanks to David Barroso! The first versions were entirely based on David's\n[pyEOS](https://github.com/spotify/pyeos), which is a wrapper around Arista's\neAPI for EOS.\n\nAlso, many thanks go out to Brady Walsh, without whom staying sane while\ndigging through Cisco docs and XML would have been impossible.\n\n\nLicense\n======\n\nCopyright 2015 Netflix, Inc.\nCopyright 2016 BigWave IT\n\nLicensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooelisa%2Fpyiosxr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffooelisa%2Fpyiosxr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooelisa%2Fpyiosxr/lists"}