asyncio SNMP client
Project description
aiosnmp
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
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
- 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
Project details
Release history Release notifications | RSS feed
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.4.0-py3-none-any.whl
(15.6 kB
view details)
File details
Details for the file aiosnmp-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: aiosnmp-0.4.0-py3-none-any.whl
- Upload date:
- Size: 15.6 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02394ee8b6aa85fc52cbf24e386d884aedba1a7d1405aeffffb21d858e4486ce |
|
MD5 | 56afb6901e4fda8fd6fad2dbe83cfb29 |
|
BLAKE2b-256 | f01b518763b6e6f0b81146855dd124095c43217082c114355ece9e2c6f1d869b |