yapsnmp -- SNMP module

This module gives you high level access to the SNMP protocol, it requires the net-snmp libsnmp library.

The module is mostly used by instantiating the Session class, and calling it's methods, but a few additional functions are also available.

By peername, we mean anything that can be resolved by socket.gethostbyname() and by miboid, we refer to either the full numeric representation, or a string representation (either absolute or relative) of a MIBOID.

The module uses the Single Session API and is thus thread safe. All errors raise exceptions.

The module defines the following items:

Session(peername[, version[, community]])
This class represents a virtual connection to peername. version represents the version of SNMP to use, possible values are 1 for version 1 and 2 for version 2c. If ommited, the version defaults to 1. If you don't define community, it'll default to "public".
toggle_numeric_oids()
Toggles between english representation of MIBOIDs and numeric representation.
translate(miboid)
This function will translate the supplied miboid into a relative OID rooted at the MIB tree, or if in numeric OID output mode, into the numeric OID.
MIBParseError
Exception raised when a supplied miboid can't be resolved.
GetError
Exception raised when unable to obtain a response.
VersionMismatch
Exception raised when an SNMP command not supported by the requested version is issued.
OIDTypeError
Exception raised when the miboid passed isn't of expected type.


Yves Perrenoud (yves@njc.ch)