Skip to main content

asyncio SNMP client

Project description

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

Documentation

https://aiosnmp.readthedocs.io/en/latest/api.html

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

Source address (host and port) validation

By default, v2c should not validate source addr, but in this library, it is enabled by default. You can disable validation by passing validate_source_addr=False to Snmp.

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

  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

aiosnmp-0.5.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file aiosnmp-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: aiosnmp-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for aiosnmp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21e64cb013d5d8aaef1b115ba7415421a8e0f8f0151fc137296789ef02f5ab56
MD5 bc210430c999730af72693e07f140309
BLAKE2b-256 9cdc897e6ac0afb8b620fc4942d056ea588e8b3ea449660c3b750bb3c8cb50a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page