PySNMP

PySNMP is a cross-platform, pure Python SNMP engine implementation developed by Ilya Etingof (https://github.com/etingof). It abstracts a lot of SNMP details for you, as great libraries do, and supports both Python 2 and Python 3.

PySNMP requires the PyASN1 package. According to Wikipedia:

ASN.1 is a standard and notation that describes rules and structures for representing, encoding, transmitting, and decoding data in telecommunication and computer networking. - https://asn1js.org/

PyASN1 conveniently provides a Python wrapper around ASN.1. Let's install the package first:

cd /tmpgit clone https://github.com/etingof/pyasn1.gitcd pyasn1/sudo python3 setup.py install

Next, install the PySNMP package:

git clone https://github.com/etingof/pysnmp ...

Get Mastering Python Networking now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.