--- id: pysmi version: "2.0.0" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # pysmi — A pure-Python implementation of SNMP/SMI MIB parsing and conversion library. License: permissive · Maintenance: active · Downloads: 2.0M/mo ## What it is and what it does PySMI is a pure-Python tool that reads SNMP MIB files written in ASN.1 and translates them into usable Python code or structured data. It understands multiple SNMP MIB dialects (SMIv1, SMIv2, and non-standard variants) and can generate either PySNMP-compatible Python modules or JSON representations. The tool handles MIB dependencies automatically, pulling source files from local directories, ZIP archives, or HTTP servers as needed. You would use PySMI when you need to work with SNMP network management data in Python—typically to generate Python classes from vendor or standard MIBs so you can query network devices, or to convert MIB definitions into JSON for documentation or downstream processing. It depends on Jinja2 for templating, lark for parsing, and requests for fetching remote MIB files. Use it for: - Generate PySNMP classes from vendor MIBs to query network devices programmatically - Convert SNMP MIB definitions to JSON for API documentation or configuration management - Build a searchable index of MIB objects across multiple MIB modules for network inventory tools - Automate MIB compilation in CI/CD pipelines when deploying network monitoring solutions - Parse custom or proprietary SNMP MIBs to integrate legacy network equipment into modern Python applications ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PySMI parses SNMP MIB files in ASN.1 format and converts them to PySNMP classes or JSON documents, supporting SMIv1, SMIv2, and dialect variants. Yes. PySMI is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive license. It fills a specific and necessary role in SNMP tooling—there is no standard library alternative for MIB parsing. Install it if you need to work with SNMP MIBs in Python. ## Install pip install pysmi uv add pysmi poetry add pysmi ## Installing pysmi Before you install: Low friction installation with three lightweight runtime dependencies (Jinja2, lark, requests). Actively maintained with a recent release 110 days ago and ongoing repository activity. License in practice: BSD-2-Clause permissive license allows commercial and private use with minimal restrictions; you must retain copyright notices and license text. Quickstart: pip install pysmi from pysmi.parser import Parser from pysmi.codegen import PySnmpWriter parser = Parser() writer = PySnmpWriter() # Parse a MIB file and generate PySNMP module Requires Python 3.10 or later; MIB source files must be accessible locally, in ZIP archives, or via HTTP. Verify before relying: - Whether the package handles all real-world MIB dialects beyond the documented SMIv1, SMIv2, and de-facto variants - Performance characteristics when processing large MIB hierarchies or many interdependent modules ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags SNMP MIB parser, ASN.1 MIB compiler, MIB to JSON conversion, SNMP management information base, MIB to PySNMP classes, network management MIB parsing, SNMP SMI compiler, snmp, network-management, asn1-parsing [View on SkillFed](https://skillfed.io/packages/pysmi) · [View on PyPI](https://pypi.org/project/pysmi/)