SNMP library for Python¶
PySNMP is a cross-platform, pure-Python SNMP engine implementation. It features fully-functional SNMP engine capable to act in Agent/Manager/Proxy roles, talking SNMP v1/v2c/v3 protocol versions over IPv4/IPv6 and other network transports.
Despite its name, SNMP is not really a simple protocol. For instance its third version introduces complex and open-ended security framework, multilingual capabilities, remote configuration and other features. PySNMP implementation closely follows intricate system details and features bringing most possible power and flexibility to its users.
Current PySNMP stable version is 6.0. It requires Python 3.10 or later and is recommended for new applications as well as for migration from older, now obsolete, PySNMP releases. All site documentation and examples are written for the 6.0 and later versions in mind.
Besides the libraries, a set of pure-Python command-line tools are shipped along with the system. Those tools mimic the interface and behaviour of popular Net-SNMP snmpget/snmpset/snmpwalk utilities. They may be useful in a cross-platform situations as well as a testing and prototyping instrument for pysnmp users.
PySNMP software is free and open-source. Source code is hosted in a Github repo. The library is being distributed under 2-clause BSD-style license.
PySNMP library development has been initially sponsored by a PSF grant.
Quick start¶
You already know something about SNMP and have no courage to dive into this implementation? Try out quick start page!
Documentation¶
Examples¶
Download¶
Best way is usually to
$ pip install pysnmplib
If that does not work for you for some reason, you might need to read the following page.
License¶
FAQ¶
- FAQ
- Getting peer address information
- How to implement MIB at the Agent
- Ignored SNMP packets
- Listening on multiple network interfaces
- Garbaged SNMP values (apps)
- Garbaged SNMP values (tools)
- Dealing with the “OID not increasing” error
- How to pass MIB to the Manager
- Resolve response values at MIB
- SNMP data constraints verification error
- Walking whole MIB
Further development¶
The changelog is generated from the commit history at release time. The narrative history of the project through 5.x is kept separately.
How changes reach a released version — the branches, the commit-message conventions, what CI runs and how a release is cut — is documented here.
Our development plans and new features we consider for eventual implementation are collected in the following section.
Contact¶
In case of questions or troubles using PySNMP, please open up an issue at GitHub or ask at Stack Overflow .