aiosnmp is an asynchronous SNMP client for use with asyncio.
pip install aiosnmp
Only snmp v2c supported, no v3 support
import asyncio
import aiosnmp
async def main():
with aiosnmp.Snmp(host="127.0.0.1", port=161, community="public") as snmp:
for res in await snmp.get(".1.3.6.1.2.1.1.1.0"):
print(res.oid, res.value)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
more in /examples
- documentation
- snmp v3 support
- more tests
aiosnmp is developed and distributed under the MIT license.