1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
Metadata-Version: 2.4
Name: snimpy
Version: 1.1.0
Summary: interactive SNMP tool
Author-email: Vincent Bernat <bernat@luffy.cx>
License-Expression: ISC
Project-URL: Homepage, https://github.com/vincentbernat/snimpy
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Networking
Classifier: Topic :: Utilities
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: AUTHORS.rst
Requires-Dist: cffi>=1.0.0
Requires-Dist: pysnmp>=7
Requires-Dist: pysnmpcrypto
Requires-Dist: setuptools
Dynamic: license-file
===============================
snimpy
===============================
.. image:: https://badge.fury.io/py/snimpy.svg
:target: http://badge.fury.io/py/snimpy
.. image:: https://github.com/vincentbernat/snimpy/workflows/Tests/badge.svg
.. image:: https://coveralls.io/repos/vincentbernat/snimpy/badge.svg
:target: https://coveralls.io/r/vincentbernat/snimpy
---
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.
.. _IPython: http://ipython.org
* Free software: ISC license
* Documentation: http://snimpy.rtfd.org.
*Snimpy* requires libsmi_ to work correctly. See the documentation for
more information.
.. _libsmi: https://www.ibr.cs.tu-bs.de/projects/libsmi/
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
|