skip to navigation
skip to content

Not Logged In

snimpy 0.8.2

interactive SNMP tool

Latest Version: 0.8.5

Interactive SNMP tool.

Snimpy is a Python-based tool providing a simple interface to build SNMP query. Here is a very simplistic example that allows us to display the routing table of a given host:

load("IP-FORWARD-MIB")
m=M("localhost", "public", 2)
routes = m.ipCidrRouteNextHop
for x in routes:
    net, netmask, tos, src = x
    print("%15s/%-15s via %-15s src %-15s" % (net, netmask, routes[x], src))

You can either use Snimpy interactively throught its console (derived from Python own console or from IPython if available) or write Snimpy scripts which are just Python scripts with some global variables available.

Features

Snimpy is aimed at being the more Pythonic possible. You should forget that you are doing SNMP requests. Snimpy will rely on MIB to hide SNMP details. Here are some “features”:

  • MIB parser based on libsmi (through CFFI)
  • SNMP requests are handled by PySNMP (SNMPv1, SNMPv2 and SNMPv3 support)
  • scalars are just attributes of your session object
  • columns are like a Python dictionary and made available as an attribute
  • getting an attribute is like issuing a GET method
  • setting an attribute is like issuing a SET method
  • iterating over a table is like using GETNEXT
  • when something goes wrong, you get an exception

History

0.8.2 (2014-06-08)

  • Minor bugfixes.

0.8.1 (2013-10-25)

  • Workaround a problem with CFFI extension installation.

0.8.0 (2013-10-19)

  • Python 3.3 support. Pypy support.
  • PEP8 compliant.
  • Sphinx documentation.
  • Octet strings with a display hint are now treated differently than plain octet strings (unicode). Notably, they can now be set using the displayed format (for example, for MAC addresses).

0.7.0 (2013-09-23)

  • Major rewrite.
  • SNMP support is now provided through PySNMP.
  • MIB parsing is still done with libsmi but through CFFI instead of a C module.
  • More unittests. Many bugfixes.

0.6.4 (2013-03-21)

  • GETBULK support.
  • MacAddress SMI type support.

0.6.3 (2012-04-13)

  • Support for IPython 0.12.
  • Minor bugfixes.

0.6.2 (2012-01-19)

  • Ability to return None instead of getting an exception.

0.6.1 (2012-01-14)

  • Thread safety and efficiency.

0.6 (2012-01-10)

  • SNMPv3 support

0.5.1 (2011-08-07)

  • Compatibility with IPython 0.11.
  • Custom timeouts and retries.

0.5 (2010-02-03)

  • Check conformity of loaded modules.
  • Many bugfixes.

0.4 (2009-06-06)

  • Allow to cache requests.

0.3 (2008-11-23)

  • Provide a manual page.
  • Use a context manager to group SET requests.

0.2.1 (2008-09-28)

  • First release on PyPI.
 
File Type Py Version Uploaded on Size
snimpy-0.8.2.tar.gz (md5) Source 2014-06-08 57KB
  • Downloads (All Versions):
  • 14 downloads in the last day
  • 320 downloads in the last week
  • 1518 downloads in the last month