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 JTable为空   java将json发送到php并插入mysql,但返回null   java Spring引导JNDI CommonJ资源   从不同PC创建和合并后的Java servlet问题   java如何在使用findelements时从xpath获取文本   java使用spring boot使用gmail smtp发送电子邮件   java在不使用pojo、bean或getter和setter的情况下获取Json标题的Json数组   Java中的OpenFile对话框将null作为响应   JavaBuilder模式。扩展接口   java中无需替换的数据结构选取   java如何评价Encog中的预测神经网络   java如何在安卓中使用实际的HttpURLConnection进行单元测试?   java使用XML配置禁用WebSocket中的CSRF保护   java如何通过hibernate从多表查询中获取数据?   mysql如何在java中获取更新的行Id   java AEM/CQ组件单一组件/有限组件   java FFmpeg Javacv延迟问题   显示整数数组的java不起作用