A modern SNMP runtime and manager with optional tsmi-powered MIB enrichment
Project description
trishul-snmp
A modern SNMP runtime and manager written in Python.
trishul-snmp (tsnmp) is a package-first SNMP runtime for manager-side use.
It keeps the protocol runtime independent from MIB compilation and uses compiled
JSON artifacts only when symbolic enrichment is desired.
The split with trishul-smi (tsmi) is intentional:
tsnmpRuntime, transport, manager API, thin CLI, optional enrichment consumertsmiParser/compiler that produces compiled JSON artifacts
The primary product is the importable Python package. The CLI is intentionally thin and secondary.
Features
- async-first Python API
- manager-only SNMPv2c runtime
- read-only operations:
getget_nextget_bulkwalkbulkwalk
- in-tree BER / ASN.1 / SNMPv2c wire codec
- UDP transport and request dispatcher
- optional symbolic translation and display enrichment from compiled JSON MIB artifacts
- works with numeric OIDs and no MIB bundle loaded
Scope
Current v0.1 baseline:
- manager-only
- SNMPv2c-only
- read-only operations only
- async-first Python API first, CLI second
- optional compiled-JSON enrichment via
tsmiartifacts - no runtime dependency on
trishul-smi
Deliberately deferred:
- raw MIB file or raw MIB directory ingestion
pysnmpAPI compatibility shims- direct runtime dependency on the
trishul-smiPython package - sync wrapper
- SNMPv1
- SNMPv3
set- traps / listener
- agent/responder support
- compiler workflows inside
tsnmp
Installation
pip install trishul-snmp
For local development:
pip install -e .[dev]
Requires Python >=3.10.
Quick Start
Numeric GET with no bundle:
import asyncio
from trishul_snmp import V2cManager
async def main() -> None:
async with V2cManager(host="10.0.0.10", community="public") as manager:
response = await manager.get("1.3.6.1.2.1.1.3.0")
for varbind in response.varbinds:
print(varbind.oid_str, varbind.value_type, varbind.display_value)
asyncio.run(main())
Symbolic GET with a compiled JSON bundle:
import asyncio
from trishul_snmp import V2cManager, load_bundle
bundle = load_bundle("./IF-MIB.json")
async def main() -> None:
async with V2cManager(
host="10.0.0.10",
community="public",
bundle=bundle,
) as manager:
response = await manager.get("IF-MIB::ifDescr.1")
for varbind in response.varbinds:
print(varbind.display_name, "=", varbind.display_value)
asyncio.run(main())
Documentation
- Documentation Index — entry point for package docs
- Getting Started — install, first requests, and runtime flows
- Python API —
V2cManager,load_bundle, and public types - CLI Reference — commands, options, exit codes, and examples
- Configuration — manager constructor and bundle/runtime knobs
- Architecture — layering, package structure, and call flows
- Bundle Contract — compiled JSON inputs, sidecars, validation, scope
- Roadmap — shipped scope and deferred work
- Contributing — dev setup and quality gates
- Changelog — version history
- v0.1.0 Release Notes — archived initial release notes
- v0.1 Design Plan — historical planning and design doc
Repository Layout
trishul_snmp/Package sourcetests/Test suitedocs/Application and design documentationdocs/archive/Archived planning and historical release notesREADME.mdRepository/GitHub landing page
Community
Canonical package docs live under docs/. GitHub/community entry
points live under .github/.
Development
Checks used in this repo:
python3 -m pytest -q
python3 -m ruff check .
python3 -m ruff format --check trishul_snmp tests
python3 -m mypy
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trishul_snmp-0.1.1.tar.gz.
File metadata
- Download URL: trishul_snmp-0.1.1.tar.gz
- Upload date:
- Size: 62.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
438b4e38efdf203095bda8b26a6c6c610b849831d53fa4c0d297a115e473d1a8
|
|
| MD5 |
aafeeeee7b9321da6497b7b3295141fd
|
|
| BLAKE2b-256 |
60bd525b879b966bef60ccb258d6798604029db5b48696c37d266d81b6d3a964
|
Provenance
The following attestation bundles were made for trishul_snmp-0.1.1.tar.gz:
Publisher:
release.yml on tosumitdhaka/trishul-snmp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trishul_snmp-0.1.1.tar.gz -
Subject digest:
438b4e38efdf203095bda8b26a6c6c610b849831d53fa4c0d297a115e473d1a8 - Sigstore transparency entry: 1461664812
- Sigstore integration time:
-
Permalink:
tosumitdhaka/trishul-snmp@d8bfeb20987718fdd6da6fbfb4b48b36423812ae -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tosumitdhaka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d8bfeb20987718fdd6da6fbfb4b48b36423812ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file trishul_snmp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: trishul_snmp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f437a16bfc808ba5aadd87da33484e8540d12ecf8de39dad43d39ad472ce2fe5
|
|
| MD5 |
cf0d1a32b54582e6cb8d758360df7dff
|
|
| BLAKE2b-256 |
bc897b0e5463d380efeb44944977aab31cb708a0c72cef724d0e155817ace183
|
Provenance
The following attestation bundles were made for trishul_snmp-0.1.1-py3-none-any.whl:
Publisher:
release.yml on tosumitdhaka/trishul-snmp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trishul_snmp-0.1.1-py3-none-any.whl -
Subject digest:
f437a16bfc808ba5aadd87da33484e8540d12ecf8de39dad43d39ad472ce2fe5 - Sigstore transparency entry: 1461664879
- Sigstore integration time:
-
Permalink:
tosumitdhaka/trishul-snmp@d8bfeb20987718fdd6da6fbfb4b48b36423812ae -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tosumitdhaka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d8bfeb20987718fdd6da6fbfb4b48b36423812ae -
Trigger Event:
push
-
Statement type: