Skip to main content

Yangify

Yangify is a framework that allows you to easily write code that can map structured and unstructured data into data modelled using YANG models. Yangify can also do the opposite operation and convert data modelled with YANG models into other structured or non-structured data. This allows you to easily write code that can parse native output/data/configuration from network devices and map them into YANG models and vice-versa.

Installing yangify

You can install yangify with pip:

pip install yangify

Ways to Get Started with Yangify

Start Executing Yangify Juptyer Notebooks

Step 1

Clone the repository:

$ git clone https://github.com/networktocode/yangify

Step 2

Navigate into yangify:

$ cd yangify

Step 3

Build the containers needed.

$ make build_test_containers

Step 4

Start a container so you can run Jupyter notebooks:

make dev_jupyter

Step 5

Launch a browser and navigate to the following URL:

http://127.0.0.1:8888

You will find all of the notebooks in docs/tutorials and also docs/tutorials/parsing-quickstart.

These same notebooks can be viewed without being interactive in the Read the Docs.

Go Right into a Working Yangify Dev Environment

Note: this dev environment is built for parsing.

Step 1

Clone the repository:

$ git clone https://github.com/networktocode/yangify

Step 2

Navigate into yangify:

$ cd yangify

Step 3

Build the containers needed.

$ make build_test_containers

Step 4

Create a container that you'll use for development & testing. This container will get built such that you can modify files in your local directory and execute them within the container environment. Great for using your local text editor and executing in pre-buit enviornment.

make enter_dev_container

This will drop you right into the container.

Step 5

Install yangify with make install:

root@e726de8f2226:/yangify# make install
poetry install
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file

Nothing to install or update

  - Installing yangify (0.1.0)
A setup.py file already exists. Using it.
root@e726de8f2226:/yangify#

Step 6

Navigate into the parsing-quickstart directory (inside the container):

root@e726de8f2226:/yangify# cd docs/tutorials/parsing-quickstart/
root@e726de8f2226:/yangify/docs/tutorials/parsing-quickstart#

Step 7

Try out the dev-yangify.py script:

root@e726de8f2226:/yangify/docs/tutorials/parsing-quickstart# python dev-yangify.py --vlans
{
    "openconfig-vlan:vlans": {
        "vlan": [
            {
                "vlan-id": 10,
                "config": {
                    "vlan-id": 10,
                    "status": "ACTIVE"
                }
            },
            {
                "vlan-id": 20,
                "config": {
                    "vlan-id": 20,
                    "name": "web_vlan",
                    "status": "ACTIVE"
                }
            },
            {
                "vlan-id": 30,
                "config": {
                    "vlan-id": 30,
                    "name": "test_vlan",
                    "status": "ACTIVE"
                }
            }
        ]
    }
}
root@e726de8f2226:/yangify/docs/tutorials/parsing-quickstart#

Metadata

Release files for yangify 0.1.3

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

Source distribution (sdist)

Source distribution for yangify 0.1.3
File Size Uploaded Provenance Actions
yangify-0.1.3.tar.gz 19.8 kB Without provenance Details for yangify-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yangify 0.1.3
File Interpreter ABI Platform Actions
yangify-0.1.3-py3-none-any.whl Python 3 none any Details for yangify-0.1.3-py3-none-any.whl

Total release size: 42.1 kB

Release files / yangify-0.1.3.tar.gz

Download URL yangify-0.1.3.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9b5ce6d17c206399e88254ed0d7da4d34d3831fd729638d797bfcf36e4a19ff6
BLAKE2b-256 checksum
How to use checksums
6d22e6344d00c4ec778895ad2f37c8d13ef76064fb97e8d46d3a36da4817e163
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.6.7 Linux/4.15.0-1077-gcp

Release files / yangify-0.1.3-py3-none-any.whl

Download URL yangify-0.1.3-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3300a8d4642ba66659c1ce90d895eeb275dec3070cda269ab37465657ba38f15
BLAKE2b-256 checksum
How to use checksums
0a31b72133f7f0a295a3b120b552c184ea2803937e6bd49bbca8f63c25e74cb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.6.7 Linux/4.15.0-1077-gcp

Security for yangify 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.

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