$npx skillfedfor your agent

pyangbind

PyangBind is a plugin for pyang which converts YANG data models into a Python class hierarchy, such that Python can be used to manipulate data that conforms with a YANG model.

Worth itPyPI Code GeneratorsReleased Dec 2025380.9K downloads / moApache License, Version 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pyangbind-0.8.7-py3-none-any.whl
v0.8.7 · released 2025-12-10 · Python >=3.7 · 4 runtime deps: pyang, lxml, regex, enum34

Yes. PyangBind is actively maintained, has no known vulnerabilities, installs with low friction, and is essential infrastructure for anyone using pyang to generate Python bindings from YANG models. The Apache 2.0 license is permissive. Install it as a dependency when you need runtime support for YANG-derived Python classes.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires pyang to have already generated Python classes from your YANG models; this package provides the runtime support for those generated classes, not the generation itself.
  • Low friction: pure Python wheel with four straightforward runtime dependencies (pyang, lxml, regex, enum34).
  • Actively maintained with a recent release and no known vulnerabilities.

License · maintenance · safety

Apache License, Version 2.0 (permissive) — Apache License 2.0 is permissive; you can use, modify, and distribute this package freely in commercial or open-source projects with minimal restrictions.

last release 2025-12-10 (247 days) · last repo commit 2026-04-01 · 216 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 380,891 downloads/mo, #7,100 on PyPI

Verify before relying

pip install pyangbind

from pyangbind.base import PybindBase
from pyangbind.serialise import pybindJSONEncoder
import json

# Use generated YANG-derived classes to build and serialize data
data = YourYANGGeneratedClass()
json_output = json.dumps(data, cls=pybindJSONEncoder)
  • Whether enum34 is actually needed for Python 3.8+ (enum is built-in since 3.4)
  • Performance characteristics when working with large or deeply nested YANG models
  • Completeness of YANG type coverage (e.g., all YANG 1.1 types, extension handling)
Same gist for agents: .md · .json

What it is and what it does

PyangBind is the runtime library that powers YANG-to-Python code generation. When you use the pyang plugin to convert a YANG network model into Python classes, those generated classes inherit from and rely on PyangBind's base classes and utility functions. The package provides the foundational infrastructure: a base class for all YANG containers and modules, JSON serialization and deserialization, XPATH-based object lookup, and type wrappers that enforce YANG constraints like ranges, patterns, and restricted decimal precision.

You typically use PyangBind indirectly—by installing it alongside pyang, running pyang's code generator on your YANG files, and then importing the generated Python modules. The generated code uses PyangBind's classes and helpers to validate data, convert between Python objects and JSON, and query object hierarchies. It's essential for anyone building network configuration management tools, device simulators, or data-driven applications that work with YANG-modeled network state.

Use it for

  • Generate Python APIs from YANG network models and use PyangBind to serialize/deserialize configuration to JSON for REST APIs.
  • Build network device simulators or test harnesses that validate configuration against YANG constraints using generated PyangBind classes.
  • Query and manipulate complex network state hierarchies using XPATH expressions through YANGPathHelper.
  • Enforce YANG type restrictions (ranges, patterns, decimal precision) on Python objects without manual validation code.
  • Migrate or translate network configuration between formats by loading JSON into YANG-derived classes and exporting to other formats.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

PyangBind is actively maintained, has no known vulnerabilities, installs with low friction, and is essential infrastructure for anyone using pyang to generate Python bindings from YANG models. The Apache 2.0 license is permissive. Install it as a dependency when you need runtime support for YANG-derived Python classes.

Install

pyangbind on PyPI

Before you install

Low friction: pure Python wheel with four straightforward runtime dependencies (pyang, lxml, regex, enum34). Actively maintained with a recent release and no known vulnerabilities.

Requires pyang to have already generated Python classes from your YANG models; this package provides the runtime support for those generated classes, not the generation itself.

License in practice

Apache License 2.0 is permissive; you can use, modify, and distribute this package freely in commercial or open-source projects with minimal restrictions.

Quickstart

pip install pyangbind

from pyangbind.base import PybindBase
from pyangbind.serialise import pybindJSONEncoder
import json

# Use generated YANG-derived classes to build and serialize data
data = YourYANGGeneratedClass()
json_output = json.dumps(data, cls=pybindJSONEncoder)

Verify before relying

  • Whether enum34 is actually needed for Python 3.8+ (enum is built-in since 3.4)
  • Performance characteristics when working with large or deeply nested YANG models
  • Completeness of YANG type coverage (e.g., all YANG 1.1 types, extension handling)

Package facts

LicenseApache License, Version 2.0 permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
pyanglxmlregexenum34
MaintenanceActively maintained 247 days since the last release
Last repo commit
First released
Downloads380,891 / month, #7,100 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Code Generators

Evidence: pyangbind-0.8.7-py3-none-any.whl

Tags

Capabilities
YANG model to Python classesYANG data model bindingpyang Python pluginYANG JSON serializationnetwork configuration modelingYANG schema validation
Topics
yang-modelingnetwork-configcode-generation
PyPI keywords
yangpyang

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “YANG model to Python classes”

  • pyangbindPyangBind converts YANG data models into Python class hierarchies,…
  • pyangpyang validates YANG data models (RFC 7950), converts between YANG…
  • yang.connectorProvides NETCONF and gRPC/GNMI client implementations for connecting…

Give your agent the search over MCP, or paste the wish link into any chat.

More Code Generators packages

proto-plus Worth it
PyPI · Python Modules · released Aug 2026

Proto Plus wraps protocol buffers to provide Python classes that behave like native Python types while maintaining protocol buffer serialization and schema validation.

Install it if you're working with protocol buffers in Python and want a more Pythonic interface, or if you're using Google Cloud libraries that depend on it.

Apache-2.0pure Python · 3.10+
343.8Mdownloads / mo
Cython Worth it
PyPI · Python Modules · released Jul 2026

Cython is a source code translator that compiles Python code to C, enabling optional static typing and direct C/C++ interoperability to generate efficient native extensions.

Install it if you need to optimize Python performance, wrap C/C++ libraries, or build fast native extensions.

permissive licensepure Python · 3.8+
136.1Mdownloads / mo
asttokens Worth it
PyPI · Python Modules · released Jul 2026

Annotates Python abstract syntax trees with the positions of tokens and source code text, enabling tools to map AST nodes back to their originating code for refactoring, analysis, and transformation.

permissive licensepure Python · 3.8+
134.8Mdownloads / mo
beartype Worth it
PyPI · Python Modules · released Dec 2025

Beartype is a runtime type checker that validates Python type hints at function call time, catching type violations before they cause downstream bugs.

Install it if you want runtime type safety for your annotated code or need to validate type hints on third-party packages.

MITpure Python · 3.10+
99.1Mdownloads / mo
llvmlite With conditions
PyPI · Code Generators · released Aug 2026

llvmlite provides a lightweight Python binding to LLVM's IR builder, optimizer, and JIT compiler APIs, enabling you to write JIT compilers and code generators without needing the full LLVM C++ API surface.

BSD-2-Clause AND Apache-2.0 WITH LLVM-exceptioncompiled wheel · 3.10+
69.3Mdownloads / mo
astor Worth it
PyPI · Code Generators · released Dec 2019

astor converts Python abstract syntax trees (ASTs) back to readable source code and provides tools for AST manipulation, inspection, and non-recursive tree traversal.

Install it if you need AST round-tripping or advanced tree inspection.

BSD-3-Clausepure Python
20.0Mdownloads / mo

See also pyang · yang.connector · xml-python · pydantic-xml · dynamic-yaml · py-ubjson · json-encoder · numpyencoder · hjson · simplejson