skillfed

pygnmi

Pure Python gNMI client to manage network functions and collect telemetry.

pygnmi v0.8.15 169.6K downloads/30d#10,413 on PyPI154
Permissive license bsd-3-clause AGING released

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 pygnmi

uv

uv add pygnmi

poetry

poetry add pygnmi

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Networking

Tags

gnmi client pythonnetwork device management grpcopenconfig telemetry collectionnetwork automation gnmigrpc network configurationtelemetry subscription networknetwork device query python
network-automationgrpc-clienttelemetry

More Networking packages