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. The following is taken from 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."

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/git checkout 0.2.3sudo python3 setup.py install

Next, install the PySNMP package:

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

Get Mastering Python Networking - Second Edition 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.