MIKNOTAURO / aiosnmp

aiosnmp is an asynchronous SNMP client and trap server for use with asyncio.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aiosnmp

Build Status Code Coverage PyPI version License Code Style Python version

aiosnmp is an asynchronous SNMP client for use with asyncio.

Installation

pip install aiosnmp

Notice

Only snmp v2c supported, v3 version is not supported
Oids should be like .1.3.6... or 1.3.6.... iso.3.6... is not supported

Basic Usage

import asyncio
import aiosnmp

async def main():
    async 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)

asyncio.run(main())

more in /examples

TODO

  • documentation
  • snmp v3 support
  • more tests

License

aiosnmp is developed and distributed under the MIT license.

Run local tests

pip install -r requirements-dev.txt
tox

Before submitting PR

pip install -r requirements-dev.txt
tox -e format

About

aiosnmp is an asynchronous SNMP client and trap server for use with asyncio.

License:MIT License


Languages

Language:Python 100.0%