Yangson inventory builder
This tool generates the inventory file, which is used by the Yangson python library to create a python object representation of an YANG model.
Installation and usage
To install the tool:
pip install yangson-inventory-builder
At the moment only Nokia YANG models are processed. For example, 7x50 YANG Model version 20.10.
To prepare an inventory file:
from yangson_inventory_builder.inventory_builder import NokiaYangsonInventory
from yangson_inventory_builder.inventory_classes import YangsonInventoryRequest
inventory_request: YangsonInventoryRequest = YangsonInventoryRequest(
yang_directory=Path("7x50_YangModels-sros_20.10/YANG/"),
root_config_module=Path("7x50_YangModels-sros_20.10/YANG/nokia-conf.yang"),
target_inventory_file_name=Path("nokia_20_10_yangson_library.json")
)
yangson_inventory: NokiaYangsonInventory = NokiaYangsonInventory(inventory_request)
yangson_inventory.create_inventory_file()
Then use it in a Yangson to get a root container:
from yangson.datamodel import DataModel
yangson_data_model: DataModel = DataModel.from_file(name=inventory_request.target_inventory_file_name.__str__(),
mod_path=(inventory_request.yang_directory.__str__(),))
root_container: list = yangson_data_model.schema.children[0].children
Metadata
Release files for yangson-inventory-builder 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yangson_inventory_builder-0.1.3.tar.gz | 6.1 kB | Without provenance | Details for yangson_inventory_builder-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yangson_inventory_builder-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for yangson_inventory_builder-0.1.3-py3-none-any.whl |
Total release size: 12.6 kB
Release files / yangson_inventory_builder-0.1.3.tar.gz
| Download URL | yangson_inventory_builder-0.1.3.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
295354b7ab8e9e3cca2a8c5ee0e7ceb8176a047a652c9eca8cfd8af43f612fca
|
|
BLAKE2b-256 checksum How to use checksums |
62e4fbc9f4e8401a98d437e87fd23f17c8e8584c8bc79cc16a2f075a4be7c490
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.2
|
Release files / yangson_inventory_builder-0.1.3-py3-none-any.whl
| Download URL | yangson_inventory_builder-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3909c4e032b19a43b92e4519c11d12f121ee7cc65d08eb7525bda7d012ff2e4f
|
|
BLAKE2b-256 checksum How to use checksums |
72961cff38a27a52ae4da98fd062dedb6372d62c21a678da094670b54a9a3edb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.2
|
Security for yangson-inventory-builder 0.1.3
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.