pygnmi
Pure Python gNMI client to manage network functions and collect telemetry.
What it is and what it does
pyGNMI is a pure Python implementation of the gNMI (gRPC Network Management Interface) client protocol, used to interact with network devices that expose a gNMI service. It abstracts the gRPC and Protocol Buffer complexity, allowing developers to query device state, push configuration changes, and stream telemetry subscriptions using Python code. The package handles both insecure and secure gRPC channels, automatic encoding detection, and supports all standard gNMI RPCs: Capabilities, Get, Set, and Subscribe.
The package targets network engineers and automation developers working with devices from Arista, Nokia, Cisco, Juniper, and others that implement the gNMI standard. It depends on grpcio, protobuf, cryptography, and dictdiffer to manage gRPC transport, message serialization, TLS encryption, and change tracking. The library includes a command-line tool for ad-hoc device queries and integrates with Nornir for multi-device orchestration workflows.
Use it for:
- Query operational state and configuration from network devices using OpenConfig YANG paths in a Python script.
- Push configuration changes to multiple network devices with atomic Set operations and change tracking.
- Build telemetry collectors that subscribe to device metrics and stream them to monitoring systems.
- Automate network device management tasks via Nornir inventory without writing raw gRPC code.
- Verify device capabilities and automatically select the correct encoding for cross-platform compatibility.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pure Python gNMI client for querying and configuring network devices via gRPC, supporting capabilities, get, set, and subscribe operations across multiple network operating systems.
Yes, if you need to automate or query gNMI-capable network devices. The package is production-stable with a permissive license and low install friction. However, the 522-day release gap suggests it is no longer actively maintained—suitable for stable deployments but not for projects requiring active bug fixes or new feature development.
Install
pygnmi on PyPI
pip
pip install pygnmiuv
uv add pygnmipoetry
poetry add pygnmiInstalling pygnmi
Before you install
Low install friction with pure Python wheels. Maintenance is aging—no release for 522 days despite an active repository with recent commits, suggesting the package is stable but not actively developed.
License in practice
BSD 3-Clause permissive license allows commercial and private use with minimal restrictions, making it suitable for most deployment contexts.
Quickstart
from pygnmi.client import gNMIclient
with gNMIclient(target=('169.254.255.64', '57400'), username='admin', password='admin', insecure=True) as gc:
result = gc.get(path=['openconfig-interfaces:interfaces'])
print(result)
Target device must expose a gNMI service on the specified host and port; requires valid credentials or certificate-based authentication.
Verify before relying
- Whether the 522-day gap since last release indicates the package is feature-complete or gradually abandoned.
- Support status for Python versions beyond 3.11 listed in classifiers.
- Whether Nornir integration mentioned in description is maintained and documented.
Package facts
| License | bsd-3-clause (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — grpcio, protobuf, cryptography, dictdiffer |
| Maintenance | aging — 522 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 169,620/month — #10,413 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pygnmi-0.8.15-py3-none-any.whl
Keywords: gnmi, automation, grpc, network
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
yang.connectorProvides NETCONF and gRPC/GNMI client…
permissive · top 15,000 on PyPI
ncclientncclient is a Python library that implements…
permissive · top 5,000 on PyPI
nacos-sdk-pythonPython client library for Nacos service…
permissive · top 15,000 on PyPI
grpciogRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
grpcio-observabilityAdds observability instrumentation to gRPC…
permissive · top 15,000 on PyPI
grpclibgrpclib is a pure-Python asyncio-based…
permissive · top 1,000 on PyPI
grpcio-channelzProvides live debugging and introspection of…
permissive · top 15,000 on PyPI
pyeapipyeapi is a Python library that wraps Arista…
permissive · top 15,000 on PyPI
grpcio-adminExposes debugging and monitoring services for…
permissive · top 15,000 on PyPI
netconf-console2A command-line and interactive console tool for…
permissive · top 15,000 on PyPI