Skip to main content

Muninn

CI pre-commit PyPI version PyPI downloads Python versions License

Muninn is a library that transforms unstructured network device CLI output into structured, type-hinted Python data structures.

Why Muninn?

  • Standalone - No framework dependencies. Install and use it in any Python project.
  • Simple API - Muninn().parse(os, command, output) and you're done.
  • Well-tested - Every parser has test cases with platform and software version metadata.
  • Type-aware - Import individual parsers to get TypedDict return types that describe the parsed data structure, enabling IDE autocompletion and better AI-assisted coding.
  • Extensible - Load your own local parsers alongside built-in ones.

Installation

Muninn can be quickly and easily installed with uv as shown below:

uv add muninn-parsers

Or, if you prefer good old-fashioned pip, you can do so as shown below:

pip install muninn-parsers

Quick Examples

Auto-Discovering Parsers

Create a Muninn instance and call parse() with an OS identifier, the CLI command, and the raw output. Muninn automatically finds and runs the right parser:

from typing import Any

import muninn

mn = muninn.Muninn()

raw_output = """
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          1   FULL/DR         00:00:38    192.168.1.1     Ethernet1/1
10.1.1.2          1   FULL/BDR        00:00:33    192.168.1.2     Ethernet1/2
"""

result: dict[str, Any] = mn.parse("nxos", "show ip ospf neighbor", raw_output)

Returns:

{
  "10.1.1.1": {
    "priority": 1,
    "state": "FULL/DR",
    "dead_time": "00:00:38",
    "address": "192.168.1.1",
    "interface": "Ethernet1/1"
  },
  "10.1.1.2": {
    "priority": 1,
    "state": "FULL/BDR",
    "dead_time": "00:00:33",
    "address": "192.168.1.2",
    "interface": "Ethernet1/2"
  }
}

Using a Parser Directly

You can also import a specific parser and call it directly. This gives you access to the parser's TypedDict return type, which enables IDE autocompletion and helps AI coding assistants reason about the structure of the parsed data:

from muninn.parsers.nxos.show_ip_ospf_neighbor import (
    ShowIpOspfNeighborParser,
    ShowIpOspfNeighborResult,
)

raw_output = """
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          1   FULL/DR         00:00:38    192.168.1.1     Ethernet1/1
10.1.1.2          1   FULL/BDR        00:00:33    192.168.1.2     Ethernet1/2
"""

result: ShowIpOspfNeighborResult = ShowIpOspfNeighborParser.parse(raw_output)
# IDE autocompletion and type checking work here

Documentation

Full documentation is available at chartinolabs.github.io/Muninn.

Acknowledgments

Status

Early development. See the Design Philosophy page for project direction.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muninn_parsers-0.6.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

muninn_parsers-0.6.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file muninn_parsers-0.6.0.tar.gz.

File metadata

  • Download URL: muninn_parsers-0.6.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for muninn_parsers-0.6.0.tar.gz
Algorithm Hash digest
SHA256 bec536140e7776dfb2f21882980ae5e22db3068d19ec6ed3b059de103d0385a2
MD5 325feba6e667306012a62397e7dc02c7
BLAKE2b-256 48dc4cbddde086c730dc04ea68dc57c97423d163dbe337ed4cbf1856858af963

See more details on using hashes here.

Provenance

The following attestation bundles were made for muninn_parsers-0.6.0.tar.gz:

Publisher: publish.yml on ChartinoLabs/Muninn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file muninn_parsers-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: muninn_parsers-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for muninn_parsers-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb28110f6d53d6c30012e10bc77f39073476cd08e160247004e5ab99b1965654
MD5 ad1bfdb310d944a12528b48f929c1856
BLAKE2b-256 9e26e3bfd800d29d6b1d227eace20052c0e88e5caf2c429898ff1977436a9af5

See more details on using hashes here.

Provenance

The following attestation bundles were made for muninn_parsers-0.6.0-py3-none-any.whl:

Publisher: publish.yml on ChartinoLabs/Muninn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.0

2 files

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

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