Installation
Debian 7+ Python 2.7
# apt-get install libsnmp30 libsnmp30-dev python-zmq libczmq3 libczmq-dev # pip install netsnmp-py
Debian 7+ Python 3
# apt-get install libsnmp30 libsnmp30-dev libczmq3 libczmq-dev # pip3 install pyzmq # pip3 install netsnmp-py
Basic usage
SNMP GET
>>> with netsnmp.SNMPSession('archt01', 'public') as ss:
... ss.get(['.1.3.6.1.2.1.1.1.0', '.1.3.6.1.2.1.1.3.0', '.1.3.6.1.2.1.1.5.0'])
...
[('.1.3.6.1.2.1.1.1.0', 'STRING', '"Linux archt01 ... 2015 x86_64"'), ('.1.3.6.1.2.1.1.3.0', 'Timeticks', '1:11:36:30.56'), ('.1.3.6.1.2.1.1.5.0', 'STRING', '"archt01"')]
SNMP GETNEXT
>>> with netsnmp.SNMPSession('archt01', 'public') as ss:
... ss.getnext(['.1.3.6.1.2.1.1.1', '.1.3.6.1.2.1.1.2.0', '.1.3.6.1.2.1.1.4.0'])
...
[('.1.3.6.1.2.1.1.1.0', 'STRING', '"Linux archt01 ... 2015 x86_64"'), ('.1.3.6.1.2.1.1.3.0', 'Timeticks', '1:11:39:35.05'), ('.1.3.6.1.2.1.1.5.0', 'STRING', '"archt01"')]
SNMP WALK (generator)
>>> with netsnmp.SNMPSession('archt01', 'public') as ss:
... [response for response in ss.walk(['.1.3.6.1.4.1.2021.10.1.3'])]
...
[('.1.3.6.1.4.1.2021.10.1.3.1', 'STRING', '"0.37"'), ('.1.3.6.1.4.1.2021.10.1.3.2', 'STRING', '"0.25"'), ('.1.3.6.1.4.1.2021.10.1.3.3', 'STRING', '"0.29"')]
IPv6 support, if included in NET-SNMP
>>> with netsnmp.SNMPSession('udp6:[fe80::c67:bb2b:dbb4:8c63]', 'public') as ss:
... ss.get(['.1.3.6.1.2.1.1.1.0'])
...
[('.1.3.6.1.2.1.1.1.0', 'STRING', '"Linux archt01 4.3.0-1-ck #1 SMP PREEMPT Sun Nov 15 13:24:29 EST 2015 x86_64"')]
Metadata
Release files for netsnmp-py 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| netsnmp-py-0.2.tar.gz | 23.7 kB | Without provenance | Details for netsnmp-py-0.2.tar.gz |
Release files / netsnmp-py-0.2.tar.gz
| Download URL | netsnmp-py-0.2.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c654c82d84f5d132baa86500fd1966282dde4cff42b67c3270557bb45541a93e
|
|
BLAKE2b-256 checksum How to use checksums |
6cdbad5c68d3af4195e45ac8e1fb91ff6015d294d39668ee789765d9dc3ff6d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for netsnmp-py 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.