A comprehensive Python SNMP library supporting v1/v2c/v3 with authentication and privacy protocols
84
A Python tool for walking SNMP MIB trees with fine-grained control over traversal behavior, result limits, and error handling.
@generates
import asyncio
from typing import List, Dict, Any
async def walk_mib_subtree(
host: str,
community: str,
oid: str,
port: int = 161,
lexicographic_mode: bool = False,
max_rows: int = 0,
ignore_non_increasing: bool = False
) -> List[Dict[str, Any]]:
"""
Walk an SNMP MIB tree starting from the specified OID.
Parameters:
- host: Target SNMP agent hostname or IP address
- community: SNMP community string for authentication
- oid: Starting OID for the walk operation
- port: SNMP agent port (default: 161)
- lexicographic_mode: If True, continue beyond the initial subtree; if False, stop at subtree boundary
- max_rows: Maximum number of rows to retrieve (0 for unlimited)
- ignore_non_increasing: If True, skip non-increasing OID errors; if False, stop on error
Returns:
- List of dictionaries, each containing:
- 'oid': The retrieved OID as a string
- 'value': The value associated with the OID
- 'type': The SNMP data type of the value
Raises:
- Exception if network errors occur during the walk
"""
passProvides SNMP protocol implementation with async/await support for walking MIB trees with advanced parameters.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-pysnmpevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10