Hi Coders, I've started to work on a small Python C extension package, incorporating your Net-SNMP Python bindings. It allows to query a SNMP table, and provides the result in form of a dictionary of dictionaries. See https://github.com/haxtibal/netsnmptable for more details, examples, and code.
A very brief example: import netsnmp import netsnmptable table = netsnmptable.Table(netsnmp.Session(Version=2, DestHost='localhost', Community='public')) table.parse_mib(netsnmp.Varbind('HOST-RESOURCES-MIB:hrStorageTable', 0)) tbldict = table.fetch() # Now access row 1, column hrStorageDescr. Cell value is stored in a netsnmp.Varbind object. print(tbldict[('1')]['hrStorageDescr'].val) Do you think it could be useful for the Net-SNMP folks? I'd be happy to contribute and could try to develop it towards your needs. It should be easy to merge, as it reuses code and concepts from Net-SNMP / python bindings (mainly from client_intf.c and snmptable.c). Anyway, there's still a lot to do, reviews and suggestions from netsnmp and Python people are welcome. Best regards Tobias (btw., I'm developing along with netsnmp 5.4.3 most of the time, but also tested with 5.7.2 some commits ago) ---------------------------------------------------------------- Profitieren Sie von der sicheren E-Mail-Übertragung Ihrer Daten mit einer kostenlosen E-Mail-Adresse der Telekom. www.t-online.de/email-kostenlos ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders