Skip to main content

Hierarchical Configuration

Hierarchical Configuration, also known as hier_config, is a Python library designed to query and compare network devices configurations. Among other capabilities, it can compare the running config to an intended configuration to determine the commands necessary to bring a device into compliance with its intended configuration.

Hierarchical Configuration has been used extensively on:

  • Cisco IOS
  • Cisco IOSXR
  • Cisco NXOS
  • Arista EOS
  • Fortinet FortiOS
  • HP Procurve (Aruba AOSS)
  • HP Comware5 / H3C
  • Huawei VRP

In addition to the Cisco-style syntax, hier_config offers experimental support for Juniper-style configurations using set and delete commands. This allows users to remediate Junos configurations in native syntax. However, please note that Juniper syntax support is still in an experimental phase and has not been tested extensively. Use with caution in production environments.

  • Juniper JunOS
  • Nokia SRL (Service Router Linux)
  • Ruckus/Brocade FastIron (ICX)
  • VyOS

Newer drivers start life as experimental until they have seen wider production use — currently Aruba AOS-CX joins the list above in that status. See Supported Platforms for the authoritative per-platform status.

Hier Config is compatible with any NOS that utilizes a structured CLI syntax similar to Cisco IOS or Junos OS.

The code documentation can be found at: Hier Config documentation.

Why hier_config?

Network devices continuously drift from their intended state — VLANs appear, ACL entries change, BGP timers shift. hier_config solves this by parsing configuration text into a hierarchical tree and performing deterministic, line-level diffs that respect the vendor's own syntax rules. Rather than string-matching raw text, it understands the structure of commands so that remediation output is minimal, ordered, and safe to apply.

Highlights

See the Architecture Overview for how the tree, driver, and workflow layers fit together.

Installation

PIP

Version 4 is currently published as a prerelease; pip skips prereleases by default, so pass --pre:

pip install --pre hier-config

(The Quick Start below uses the v4 API. pip install hier-config without --pre installs the latest stable v3 release — see the v3 documentation for that API.)

Quick Start

Step 1: Import Required Classes

from hier_config import WorkflowRemediation, HConfig, Platform
from hier_config.utils import read_text_from_file

Step 2: Load Configurations

Load the running and intended configurations as strings:

running_config_text = read_text_from_file("./tests/fixtures/running_config.conf")
generated_config_text = read_text_from_file("./tests/fixtures/generated_config.conf")

Step 3: Create HConfig Objects

Specify the device platform (e.g., Platform.CISCO_IOS):

running_config = HConfig.from_text(Platform.CISCO_IOS, running_config_text)
generated_config = HConfig.from_text(Platform.CISCO_IOS, generated_config_text)

Step 4: Initialize WorkflowRemediation

Compare configurations and generate remediation steps:

workflow = WorkflowRemediation(running_config, generated_config)

print("Remediation Configuration:")
print(workflow.remediation_config)

This guide gets you started with Hier Config in minutes! For more details, visit Hier Config Documentation Site.

Metadata

Release files for hier-config 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hier-config 4.0.0
File Size Uploaded Provenance Actions
hier_config-4.0.0.tar.gz 281.5 kB Without provenance Details for hier_config-4.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for hier-config 4.0.0
File Actions
hier_config-4.0.0-cp311-abi3-win_arm64.whl CPython 3.11 abi3 Windows ARM64 Details for hier_config-4.0.0-cp311-abi3-win_arm64.whl
hier_config-4.0.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for hier_config-4.0.0-cp311-abi3-win_amd64.whl
hier_config-4.0.0-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for hier_config-4.0.0-cp311-abi3-musllinux_1_2_x86_64.whl
hier_config-4.0.0-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details for hier_config-4.0.0-cp311-abi3-musllinux_1_2_aarch64.whl
hier_config-4.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for hier_config-4.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
hier_config-4.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for hier_config-4.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
hier_config-4.0.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for hier_config-4.0.0-cp311-abi3-macosx_11_0_arm64.whl
hier_config-4.0.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for hier_config-4.0.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 15.2 MB

Release files / hier_config-4.0.0.tar.gz

Download URL hier_config-4.0.0.tar.gz
Size 281.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a52cafcd6f23cb2b01a2f03dd37185589fab189104cd8fd9dabdfb306eacc1d9
BLAKE2b-256 checksum
How to use checksums
ebddb2fcded1022dc9ef9912d1e273a264f2299ee395abc42e219d617dd9cbe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / hier_config-4.0.0-cp311-abi3-win_arm64.whl

Download URL hier_config-4.0.0-cp311-abi3-win_arm64.whl
Size 1.6 MB
Tags CPython 3.11 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
f235e73d3586362f5772c671ddd58b1622f61f32c8aecbcf14884500b7ff67eb
BLAKE2b-256 checksum
How to use checksums
520a73d1aa16b0dcbcf7289d36384b5f11dd6ebbc37a57e40dcefb3901d802f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / hier_config-4.0.0-cp311-abi3-win_amd64.whl

Download URL hier_config-4.0.0-cp311-abi3-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
bd2e3cbe83ad389b0651cdd851464ff408e550812b31c41cc4d676441138de8d
BLAKE2b-256 checksum
How to use checksums
a68217a261ad5007898107ecdc0e18c15bb9e2a967ec1ebcd03cf5b21db9409e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / hier_config-4.0.0-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL hier_config-4.0.0-cp311-abi3-musllinux_1_2_x86_64.whl
Size 2.1 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
53f0584c48adb621da413fc6d741747297a48c260e5f67cb96cf9e39f2dbc0d6
BLAKE2b-256 checksum
How to use checksums
5440229a05c5b59f752dda35e98e7706a834d1bf100adeef88c9e4c774c73f5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / hier_config-4.0.0-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL hier_config-4.0.0-cp311-abi3-musllinux_1_2_aarch64.whl
Size 2.0 MB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
912512df614ee482f86df9c81b8791fd68aaaaf7490e7fd95af37fc9e56b571a
BLAKE2b-256 checksum
How to use checksums
0436f68ef14ee63a7ee622631986bb42e9992d92dd2bcc99d3c76adac1f3b282
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / hier_config-4.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL hier_config-4.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
af95d768a9fa6f3a15a269cfe5d7486d99f581d51fe727ed7bace00de8ab922e
BLAKE2b-256 checksum
How to use checksums
3f113799e8c65cdd5ed28b5766c130a95169fc37442fa7ca85cd2008cd22c485
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / hier_config-4.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL hier_config-4.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.8 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
6bd466e69606064badf6079d736a60f873c2474966dd6460cc3a6d2368a5dc86
BLAKE2b-256 checksum
How to use checksums
c417804caab28002dc496a8d827394e460507827e0d5eac16c4396344e5decc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / hier_config-4.0.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL hier_config-4.0.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e613febf561128c119258ecc29774637b32b5fb08aea4268f3c880dc8898275d
BLAKE2b-256 checksum
How to use checksums
7483f3d373af27453888bf8c90a885f10ac9bc0a7c5b9f29cd02e4a030255413
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / hier_config-4.0.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL hier_config-4.0.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7933e01a523fe25ec5d27fd1bd53623272a707202639005dd2ca771d1ca284e0
BLAKE2b-256 checksum
How to use checksums
07e9c9127bea9cd4ffade5fd8c63d00ddb1fe49a1fbf8ed7b724cc75668265b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for hier-config 4.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.0.0 This release

9 release files No provenance

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