Name | yangtree JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | A project for generating YANG tree views. |
upload_time | 2024-06-26 15:55:50 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2024 Joachim Wiberg <troglobit@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
yang
tree
libyang
html
jstree
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
YANG Tree Viewer
================
Very limited YANG tree viewer based on libyang, similar output to that
of `pyang -f jstree`. The default output is a standalone HTML file,
called `yangtree.html`, that can be included in documentation bundles.
Usage
-----
See below [setup instructions](#setup) first.
```
~/src/yangtree(main)$ python main.py -p yang -m ietf-system -e authentication -e local-users -e ntp -e ntp-udp-port -e timezone-name -m ietf-interfaces -e if-mib
INFO: Parsing ietf-system, enabling features: ['authentication', 'local-users', 'ntp', 'ntp-udp-port', 'timezone-name']
WARNING: Warning: failed to parse module: Data model "ietf-netconf-acm" not found in local searchdirs.: Loading "ietf-netconf-acm" module failed.: Parsing module "ietf-system" failed.
INFO: Parsing ietf-interfaces, enabling features: ['if-mib']
INFO: Processing module ietf-interfaces
INFO: HTML file generated: yangtree.html
x-www-browser yang_tree_view.html
~/src/yangtree(main)$ x-www-browser yang_tree_view.html
```
Screenshot
----------
![](screenshot.png)
Setup
-----
> The following instructions have been tested on Linux Mint 21.3, but
> are mostly the same for other operating systems.
Clone the repository to your home directory:
```
~$ cd src/
~/src$ git clone https://github.com/troglobit/yangtree
~/src$ cd yangtree
~/src/yangtree(main)$
```
Set up your virtual environment, this ensures all python packages
installed from `requirements.txt` are installed only in `.venv/`:
```
~/src/yangtree(main)$ python -m venv .venv
~/src/yangtree(main)$ source .venv/bin/activate
```
Install all required packages:
```
~/src/yangtree(main)$ sudo apt install libyang2
~/src/yangtree(main)$ pip install -r requirements.txt
```
Developer Notes
---------------
Use `pip-compile` from pip-tools to [manage Python requirements][4],
this makes life a lot easier since we only need pyproject.toml for all
our packaging needs.
To install locally, or just build, verifying pyproject.toml:
```
~/src/yangtree(main)$ pip install -e .
~/src/yangtree(main)$ python -m build
```
For uploading to PyPi, remember to install twine:
```
~/src/yangtree(main)$ pip install twine
```
Then build and test upload:
```
~/src/yangtree(main)$ python -m build
~/src/yangtree(main)$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```
Verify upload and then upload to PyPi proper:
```
~/src/yangtree(main)$ twine upload dist/*
```
[1]: https://massimilianobruni-92986.medium.com/fix-your-python-requirements-with-pip-tools-856765d8c061
Raw data
{
"_id": null,
"home_page": null,
"name": "yangtree",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "YANG, tree, libyang, HTML, jstree",
"author": null,
"author_email": "Joachim Wiberg <troglobit@gmail.com>",
"download_url": null,
"platform": null,
"description": "YANG Tree Viewer\n================\n\nVery limited YANG tree viewer based on libyang, similar output to that\nof `pyang -f jstree`. The default output is a standalone HTML file,\ncalled `yangtree.html`, that can be included in documentation bundles.\n\n\nUsage\n-----\n\nSee below [setup instructions](#setup) first.\n\n```\n~/src/yangtree(main)$ python main.py -p yang -m ietf-system -e authentication -e local-users -e ntp -e ntp-udp-port -e timezone-name -m ietf-interfaces -e if-mib\nINFO: Parsing ietf-system, enabling features: ['authentication', 'local-users', 'ntp', 'ntp-udp-port', 'timezone-name']\nWARNING: Warning: failed to parse module: Data model \"ietf-netconf-acm\" not found in local searchdirs.: Loading \"ietf-netconf-acm\" module failed.: Parsing module \"ietf-system\" failed.\nINFO: Parsing ietf-interfaces, enabling features: ['if-mib']\nINFO: Processing module ietf-interfaces\nINFO: HTML file generated: yangtree.html\nx-www-browser yang_tree_view.html\n~/src/yangtree(main)$ x-www-browser yang_tree_view.html\n```\n\n\nScreenshot\n----------\n\n![](screenshot.png)\n\n\nSetup\n-----\n\n> The following instructions have been tested on Linux Mint 21.3, but\n> are mostly the same for other operating systems.\n\nClone the repository to your home directory:\n\n```\n~$ cd src/\n~/src$ git clone https://github.com/troglobit/yangtree\n~/src$ cd yangtree\n~/src/yangtree(main)$\n```\n\nSet up your virtual environment, this ensures all python packages\ninstalled from `requirements.txt` are installed only in `.venv/`:\n\n```\n~/src/yangtree(main)$ python -m venv .venv\n~/src/yangtree(main)$ source .venv/bin/activate\n```\n\nInstall all required packages:\n\n```\n~/src/yangtree(main)$ sudo apt install libyang2\n~/src/yangtree(main)$ pip install -r requirements.txt\n```\n\n\nDeveloper Notes\n---------------\n\nUse `pip-compile` from pip-tools to [manage Python requirements][4],\nthis makes life a lot easier since we only need pyproject.toml for all\nour packaging needs.\n\nTo install locally, or just build, verifying pyproject.toml:\n\n```\n~/src/yangtree(main)$ pip install -e .\n~/src/yangtree(main)$ python -m build\n```\n\nFor uploading to PyPi, remember to install twine:\n\n```\n~/src/yangtree(main)$ pip install twine\n```\n\nThen build and test upload:\n\n```\n~/src/yangtree(main)$ python -m build\n~/src/yangtree(main)$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n```\n\nVerify upload and then upload to PyPi proper:\n\n```\n~/src/yangtree(main)$ twine upload dist/*\n```\n\n\n[1]: https://massimilianobruni-92986.medium.com/fix-your-python-requirements-with-pip-tools-856765d8c061\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Joachim Wiberg <troglobit@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A project for generating YANG tree views.",
"version": "0.2.0",
"project_urls": {
"homepage": "https://github.com/troglobit/yangtree",
"repository": "https://github.com/troglobit/yangtree"
},
"split_keywords": [
"yang",
" tree",
" libyang",
" html",
" jstree"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7c33217a604c0bfee823818d57662eb277bb6cc9a6b4b32e227688f4f674a2f6",
"md5": "7d78be529aff79612bb8312e8acf46df",
"sha256": "6ac38875ed74cb912674e27aaf802cbbf34613565ec66c988689de0f31d790d3"
},
"downloads": -1,
"filename": "yangtree-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7d78be529aff79612bb8312e8acf46df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8164,
"upload_time": "2024-06-26T15:55:50",
"upload_time_iso_8601": "2024-06-26T15:55:50.682383Z",
"url": "https://files.pythonhosted.org/packages/7c/33/217a604c0bfee823818d57662eb277bb6cc9a6b4b32e227688f4f674a2f6/yangtree-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-26 15:55:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "troglobit",
"github_project": "yangtree",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "yangtree"
}