Skip to main content

Shamelessly (ab)using NET-SNMP shell commands for a quick-and-dirty Python SNMP lib

Why

  • I’m not fond of the pySNMP API

  • snimpy requires loading libffi-dev and libsmi-dev (i.e. root privs) on the system

  • It’s fast enough

Usage

Be sure you have MIB files loaded on your system. You can download them from Cisco’s FTP site like this… wget ftp://ftp.cisco.com/pub/mibs/v2/MIB-NAME.my

from shellsnmp.Poller import SNMP

snmp = SNMP(community='public', host='172.16.1.3')
status, time = snmp.bulkwalk(mibfile='/path/to/IF-MIB.my',
    oidspec='ifOperStatus')

Note that only bulkwalk() has been implemented at this time.

Installation

pip install shellsnmp

Metadata

Release files for shellsnmp 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shellsnmp 0.1.7
File Size Uploaded Provenance Actions
shellsnmp-0.1.7.tar.gz 4.6 kB Without provenance Details for shellsnmp-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shellsnmp 0.1.7
File Interpreter ABI Platform Actions
shellsnmp-0.1.7-py2-none-any.whl Python 2 none any Details for shellsnmp-0.1.7-py2-none-any.whl

Total release size: 9.4 kB

Release files / shellsnmp-0.1.7.tar.gz

Download URL shellsnmp-0.1.7.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5414da50b0a994893e92ad42ae7f3ac428c37ed68552f24e8f2a6f2f2e104334
BLAKE2b-256 checksum
How to use checksums
8e6f9c2ff8b3fff57f31bddc4873bb215d26cd6d902a600957173530d3436cb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / shellsnmp-0.1.7-py2-none-any.whl

Download URL shellsnmp-0.1.7-py2-none-any.whl
Size 4.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
98ec332c2a2ffe059c35bd8060603ea9925a3c6e76c5b1adc96a29d4bd04d8ab
BLAKE2b-256 checksum
How to use checksums
9b726aab671105a6a4c850ad89264df9015903b92c990004d21be164a2cd1850
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for shellsnmp 0.1.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page