Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hh-h/aiosnmp
aiosnmp is an asynchronous SNMP client and trap server for use with asyncio.
https://github.com/hh-h/aiosnmp
asyncio python3 snmp snmpv2
Last synced: about 1 month ago
JSON representation
aiosnmp is an asynchronous SNMP client and trap server for use with asyncio.
- Host: GitHub
- URL: https://github.com/hh-h/aiosnmp
- Owner: hh-h
- License: mit
- Created: 2018-09-29T22:16:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-05T08:50:14.000Z (about 2 years ago)
- Last Synced: 2024-03-24T03:02:39.197Z (9 months ago)
- Topics: asyncio, python3, snmp, snmpv2
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 43
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-snmp - aiosnmp - Python package aiosnmp is an asynchronous SNMP client for use with asyncio. Only SNMP v2c is supported. ![GitHub last commit](https://img.shields.io/github/last-commit/hh-h/aiosnmp) (Libraries / Python)
README
aiosnmp
=======.. image:: https://dev.azure.com/6660879/aiosnmp/_apis/build/status/hh-h.aiosnmp?branchName=master
:target: https://dev.azure.com/6660879/aiosnmp/_build/results?buildId=38&view=results
:alt: Build Status.. image:: https://img.shields.io/codecov/c/github/hh-h/aiosnmp/master.svg?style=flat
:target: https://codecov.io/github/hh-h/aiosnmp?branch=master
:alt: Code Coverage.. image:: https://badge.fury.io/py/aiosnmp.svg
:target: https://badge.fury.io/py/aiosnmp
:alt: PyPI version.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg
:target: https://img.shields.io/badge/license-MIT-brightgreen.svg
:alt: License.. image:: https://img.shields.io/badge/code%20style-black-black.svg
:target: https://github.com/ambv/black
:alt: Code Style.. image:: https://img.shields.io/badge/python-3.7%2B-brightgreen.svg
:target: https://img.shields.io/badge/python-3.7%2B-brightgreen.svg
:alt: Python versionaiosnmp is an asynchronous SNMP client for use with asyncio.
Installation
------------.. code-block:: shell
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 supportedSource 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
-----------.. code-block:: python
import asyncio
import aiosnmpasync 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 testsLicense
-------aiosnmp is developed and distributed under the MIT license.
Run local tests
---------------.. code-block:: shell
pip install -r requirements-dev.txt
toxBefore submitting PR
--------------------.. code-block:: shell
pip install -r requirements-dev.txt
tox -e format