net-snmp上的python包装器

yahoo-panoptes-snmp的Python项目详细描述


Build Status

全景SNMP

A Python wrapper on Net-SNMP

目录

简介

这个库是优秀的EasySNMP library的分支,它提供了一个pythonic包装器 在Net-SNMPc库的顶部。

背景

与上游库的主要区别是:

  • 包括net snmp源代码,用于在安装过程中生成共享对象,从而生成自包含的分发版
  • net snmp库的锁定选项:例如,snmpv1是,应用程序被禁用
  • 发行版中不包含MIB—这是设计的,因为使用符号oid比较慢
  • 基于python的bulk-walk实现
  • 修复对隧道式SNMP连接的支持

安装

通过运行以下命令进行安装:

pip install yahoo_panoptes_snmp

用法

这个api类似于easysnmp,它是documented here

散散步

bulkwalk的实现基于执行bulkgets并使用oid树的“脱落”来终止。

方法签名如下:

defbulk_walk(self,oids,non_repeaters=0,max_repetitions=10):"""    Performs a series of bulk SNMP GET operation using the prepared session to    retrieve multiple pieces of information in a single packet.    :param oids: you may pass in a list of OIDs or single item; each item                 may be a string representing the entire OID                 (e.g. 'sysDescr.0') or may be a tuple containing the                 name as its first item and index as its second                 (e.g. ('sysDescr', 0))    :param non_repeaters: the number of objects that are only expected to                          return a single GETNEXT instance, not multiple                          instances    :param max_repetitions: the number of objects that should be returned                            for all the repeating OIDs    :return: a list of SNMPVariable objects containing the values that             were retrieved via SNMP    """

贡献

我们欢迎提出问题、问题和请求-请查看contributing以了解如何这样做。

维护人员

许可证

这个项目是根据BSD开源许可的条款授权的。请参阅LICENSE了解完整条款。

学分

请参阅CREDITS file以获取完整的信用列表。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用JSR223从Jython脚本获取数据   java JSON到POJO字段的空检查   java RObject。isExists()检查内存还是服务器?   java停止线程未使用函数setRunning(false)   java在超类中访问childs实例变量?   java更改主题会导致双操作栏故障   java为什么我的RMIsocket只发送一个字节?   java如何跨文件提取方法?   hibernate命名查询的java问题   java Spark因SerializedLambda的ClassNotFoundException失败   java为什么这个列表有错误?   java JavaFX/Aurdino编译器未显示图形/数据不知道原因   java连接某些舱室的最低成本   集合Java HashMap初始化?   java更改手机壁纸在片段中无法工作   java分页ArrayList   继承是子类继承的超类的私有成员。。。JAVA   多参数java 8流过滤器   java我应该如何存储我希望访问的对象,以与我放置它们的方式相反的顺序