Giter Site home page Giter Site logo

snimpy's Introduction

snimpy

https://badge.fury.io/py/snimpy.png https://travis-ci.org/vincentbernat/snimpy.png?branch=master https://coveralls.io/repos/vincentbernat/snimpy/badge.png

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.

Snimpy requires libsmi to work correctly. See the documentation for more information.

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

snimpy's People

Contributors

vincentbernat avatar unikmhz avatar daemonae avatar wroniasty avatar juliantaylor avatar maugier avatar stgraber avatar fragfutter avatar edouard-lopez avatar

Watchers

Xavier Brassoud avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.