{"id":42051438,"url":"https://github.com/cisco-ie/ios-xr-grpc-python","last_synced_at":"2026-01-26T06:36:31.327Z","repository":{"id":16887271,"uuid":"64496609","full_name":"cisco-ie/ios-xr-grpc-python","owner":"cisco-ie","description":" IOS-XR gRPC Python connectivity library. ","archived":false,"fork":false,"pushed_at":"2025-06-17T03:52:42.000Z","size":128,"stargazers_count":16,"open_issues_count":7,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-14T10:41:27.365Z","etag":null,"topics":["grpc","ios-xr","ios-xr-grpc","yang"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cisco-grpc-connection-libs/ios-xr-grpc-python","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cisco-ie.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-07-29T16:56:44.000Z","updated_at":"2025-11-14T05:10:37.000Z","dependencies_parsed_at":"2023-07-13T05:06:07.361Z","dependency_job_id":null,"html_url":"https://github.com/cisco-ie/ios-xr-grpc-python","commit_stats":null,"previous_names":["cisco-grpc-connection-libs/ios-xr-grpc-python"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cisco-ie/ios-xr-grpc-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ie%2Fios-xr-grpc-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ie%2Fios-xr-grpc-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ie%2Fios-xr-grpc-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ie%2Fios-xr-grpc-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cisco-ie","download_url":"https://codeload.github.com/cisco-ie/ios-xr-grpc-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ie%2Fios-xr-grpc-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28768501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["grpc","ios-xr","ios-xr-grpc","yang"],"created_at":"2026-01-26T06:36:30.799Z","updated_at":"2026-01-26T06:36:31.318Z","avatar_url":"https://github.com/cisco-ie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## gRPC for Cisco IOS-XR in Python\n\nAuthor: Karthik Kumaravel\n\nThis package contains a library with the methods that are available to use over gRPC with IOS-XR boxes after 6.0.0. The API has several methods which allows a user to send simple RPC commands such as ```get``` and ```push``` using YANG and JSON.\n\nThe repo consists of two main components:\n1. The compiled pb2 file from the proto definition.\n2. A Python module accessing the pb2 file with the library bindings.\n\nThe repo also includes examples on how to use the library to interact with an IOS-XR device. If you want to create your own client, there is a walkthrough [at the bottom of this page](#creating-your-own-client).\n\nIf you find any problems or need help, create an issue!\n\n## Installation\nEither download this repository or install with ```pip install iosxr_grpc```\n\nIt is always recommended to work in a virtual environment with something like [virtualenv](https://virtualenv.pypa.io/en/stable/) or [pipenv](http://docs.pipenv.org/en/latest/).\n\n\n## gRPC Calls\n\n### Enable gRPC\n\nSSH in to the router and turn on gRPC, below is an example configuration:\n```\ninterface GigabitEthernet 0/0/0/0\n ipv4 address 192.168.1.2 255.255.255.0\n no shut\n\ngrpc\n port 57777\n !\n!\n```\n\nNote: Default port is 57400, and IPv4 only.\n\n#### Using TLS\n\n1. Enable TLS in configuration, example:\n```\ngrpc\n  tls\n  port 57777\n  !\n!\n```\n\n2. Copy the autogenerated .pem file to the 'keys' folder in the client directory.\n\n```\nscp cisco@192.168.1.2:/misc/config/grpc/ems.pem ./\n```\n\n### Usage\n```from iosxr_grpc.cisco_grpc_client import CiscoGRPCClient```\n\n```\nfrom iosxr_grpc.cisco_grpc_client import CiscoGRPCClient\nclient = CiscoGRPCClient(\n    \u003cip address\u003e,\n    \u003cport\u003e,\n    \u003ctimeout\u003e,\n    \u003cusername\u003e,\n    \u003cpassword\u003e,\n    \u003coptional: tls key\u003e,\n    \u003coptional: tls server name ('ems.cisco.com')\u003e)\npath = \u003cyang path\u003e # '{\"openconfig-interfaces:interfaces\": [null]}')\nerr, result = client.\u003coperation\u003e(path) # client.getconfig(path)\n```\n\nFor a more in-depth look, [check out the wiki](https://github.com/cisco-grpc-connection-libs/ios-xr-grpc-python/wiki)!\n\n## Creating your own Client\n\nTo create a client of your own there are a few steps to follow.\n\n- Download the proto file for IOS-XR's grpc: https://github.com/CiscoDevNet/grpc-getting-started\n- Follow the instructions to generate the client/server code in python using the grpc-getting-started's proto file: http://www.grpc.io/docs/tutorials/basic/python.html#generating-client-and-server-code\n- From here create a client, an example can be found here: http://www.grpc.io/docs/tutorials/basic/python.html#creating-the-client\n- At this point you should have a client similar to the one in this repo\n\n## Useful Links\n\nIf you would like to test this all out with IOS-XRv, use the following link to request access to the vagrant box.\n\nhttps://xrdocs.github.io/\n\n## Projects that use the python client\n\n[Solenoid](https://github.com/ios-xr/Solenoid) - App that injects routes directly into Cisco's IOS-XR RIB table.\n\n[Pipedown](https://github.com/cisco-ie/Pipedown) - CDN router monitoring tool for data center connectivity.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-ie%2Fios-xr-grpc-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcisco-ie%2Fios-xr-grpc-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-ie%2Fios-xr-grpc-python/lists"}