Skip to main content

Small, standalone Cisco CLI parsers derived from Cisco's Genie parsers

Project description

Yenie Parser

Yenie Parser is a small Python package for parsing Cisco CLI command output into structured dictionaries without importing the full Cisco Genie/pyATS stack.

The IOS-XE parser set covers command templates adapted from Cisco Genie parser files. Results use Genie-compatible dictionary shapes where the upstream parser defines them.

Install

This package is intended to work with normal Python packaging tools once published:

pip install yenie-parser

For local development with uv:

uv sync
uv run pytest

Usage

import yenie_parser

parsed = yenie_parser.parse(
    platform="iosxe",
    command="show device-tracking database",
    raw_output=raw_cli_output,
)

The parser accepts only raw command output. It does not connect to devices or execute commands.

Command matching strips extra whitespace and is case-insensitive. It does not rewrite Cisco command tokens, so device-tracking and device tracking are different commands.

Available command templates can be inspected with:

commands = yenie_parser.supported_commands("iosxe")

Attribution

Parser behavior is derived from the Apache-2.0 licensed Cisco Genie parser project:

  • Repository: https://github.com/CiscoTestAutomation/genieparser
  • Source paths:
    • src/genie/libs/parser/iosxe/show_device_tracking.py
    • src/genie/libs/parser/iosxe/show_authentication_sessions.py
    • src/genie/libs/parser/iosxe/show_inventory.py
    • src/genie/libs/parser/iosxe/show_cdp.py
    • src/genie/libs/parser/iosxe/show_arp.py
    • src/genie/libs/parser/iosxe/show_fdb.py
    • src/genie/libs/parser/iosxe/show_interface.py
    • src/genie/libs/parser/iosxe/show_run.py
    • src/genie/libs/parser/iosxe/show_routing.py
    • src/genie/libs/parser/iosxe/show_aaa.py

See docs/conversions/ for conversion metadata.

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

yenie_parser-0.3.0.tar.gz (159.1 kB view details)

Uploaded Source

Built Distribution

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

yenie_parser-0.3.0-py3-none-any.whl (166.7 kB view details)

Uploaded Python 3

File details

Details for the file yenie_parser-0.3.0.tar.gz.

File metadata

  • Download URL: yenie_parser-0.3.0.tar.gz
  • Upload date:
  • Size: 159.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yenie_parser-0.3.0.tar.gz
Algorithm Hash digest
SHA256 592d8a1f65d8cb9f50c5359710c60ddad4cbd904a3a9b4151742686d41108259
MD5 3c9fecb280482ddab9f68da1cfa740de
BLAKE2b-256 5a603160adbfe5b9b5ac24e9e5b42ef337ca25b0c7273e8ed4965c41323d5350

See more details on using hashes here.

File details

Details for the file yenie_parser-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: yenie_parser-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 166.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yenie_parser-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b95728645dd6680b30ad481b1037c8f5c106408317cc41c26552d008174ba32b
MD5 01c2b6a80774949d1f2fc499ebddc8b2
BLAKE2b-256 09f8f71bc393a1e27bf6be630770f585b6b0042b925480c77e1c219f042064bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page