yapsnmp: Yet Another Python SNMP module
yapsnmp is a Python SNMP module based on the net-snmp (formerly known
as ucd-snmp) library. It's composed of a low level interface to the
library, created using SWIG, and a higher level python module removing
all the complexity out of dealing with SNMP.
Here are a list of the key features the module currently supports:
- Full MIB parsing, enabling you to use named OIDs as well as the
numeric representations;
- Support for SNMP version 1 and 2c (with 3 coming real soon);
- Supports GET, GETNEXT, GETBULK and SET (TRAP and INFORM to
come), as well as convenient "walk" and "table extraction" functions;
- Uses the Single Session API and appropriate Python interpreter
releases, rendering the module thread safe;
- Offers a very high level interface, allowing easy SNMP
integration into your code.
You're only requirements are Python (tested with version 1.5.2) and
net-snmp (only tested with version 4.1.2)
Latest News
First public release available on SourceForge, see download section
for details.
Examples
Perform an SNMPv1 walk on the system tree (result is a tuple of tuples):
yapsnmp.Session('router45-ny').walk('system')
Obtain ifHCInOctets.12 and ifOperStatus.12 in one packet using SNMPv2c:
yapsnmp.Session('tapioca', version=2).get('ifHCInOctets.12', 'ifOperStatus.12')
Stability
I'm running some code based on yapsnmp that collects 4 million
variables per day, has been doing so for over a month without a single
problem.
Licensing
The yapsnmp software is distributed under the terms and conditions of
the Free Software Foundation's LGPL.
Yves Perrenoud (yves@njc.ch)