{"id":44518722,"url":"https://github.com/grnet/juniper-nxpy","last_synced_at":"2026-02-13T17:30:53.208Z","repository":{"id":57438236,"uuid":"184614561","full_name":"grnet/juniper-nxpy","owner":"grnet","description":"Network XML Python Proxy: Juniper device-xml-configuration to python mapper","archived":false,"fork":false,"pushed_at":"2019-05-03T12:14:37.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-22T16:10:14.492Z","etag":null,"topics":["automation","juniper","ncclient","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-02T16:26:32.000Z","updated_at":"2019-05-03T12:14:38.000Z","dependencies_parsed_at":"2022-08-29T03:01:31.837Z","dependency_job_id":null,"html_url":"https://github.com/grnet/juniper-nxpy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/grnet/juniper-nxpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grnet%2Fjuniper-nxpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grnet%2Fjuniper-nxpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grnet%2Fjuniper-nxpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grnet%2Fjuniper-nxpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grnet","download_url":"https://codeload.github.com/grnet/juniper-nxpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grnet%2Fjuniper-nxpy/sbom","scorecard":{"id":446019,"data":{"date":"2025-08-11","repo":{"name":"github.com/grnet/juniper-nxpy","commit":"45805cfbe6db3fd11a7fa7524353227fff83d213"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T06:44:02.915Z","repository_id":57438236,"created_at":"2025-08-19T06:44:02.915Z","updated_at":"2025-08-19T06:44:02.915Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29413363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","juniper","ncclient","python"],"created_at":"2026-02-13T17:30:52.808Z","updated_at":"2026-02-13T17:30:53.189Z","avatar_url":"https://github.com/grnet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nxpy: Network XML Python Proxy\n\n`nxpy` maps exported XML configuration (from Juniper network devices) to python\nclasses. It is compatible only with Junipers' xml configuration and is developed\nto work alongside [ncclient](https://github.com/ncclient/ncclient).\n\n## Description\n\nnxpy allows for retrieving the device configuration in xml format (using either\nnetconf or \"show configuration | display xml\" via an expect script), transform\nthe configuration to python classes in order to manipulate them (view, edit,\ndelete).  After editing, the configuration can be applied back to the device via\nnetconf or cli expect.\n\nFurthermore, it allows for building configuration via python classes, and apply\nit to the device(s) via netconf or cli expect.  For the time, it supports\nlimited configuration changes.\n\n![nxpy flow graph](nxpy.png)\n\n\n## Installing\n\nAs of v0.4.2, nxpy is available on Pypi, so you can install with pip:\n\n```\npip install juniper-nxpy\n```\n\nOr you can install manually. After cloning the project run:\n\n```\npython setup.py install\n```\n\nRequirements:\n\n* Python 2.6 \u003c= version \u003c 3.0\n* lxml (tested with 2.2.6)\n\n## Supported Configuration Mappings\n\n* Configuration\n  * Interfaces\n  * Vlans\n* Interface\n  * Name\n  * Description\n  * Unit(s)\n* Vlan\n  * Name\n  * Vlan Id\n* Unit\n  * Name\n  * Description\n  * Vlan Id\n  * Family\n    * Name\n    * Addresses\n      * Address\n      * Name\n    * MTU\n    * Vlan Members\n\n## Examples\n\n### Parse configuration from device\n\n* Grab the configuration in xml format\n\nXML configuration can be retrieved from devices that support export to XML:\n\n* via netconf\n* via cli\n* via cli expect scripts.\n\nYou can use also run \"show configuration | display xml\" (and\ncopy paste the output to a file), or use an automated cli excpect script or\ninvoke netconf.\n\n* Feed the configuration to nxpy\n\n```python\nimport nxpy as np\nconf = np.Parser(\u003cconfiguration_file_OR_configuration_text\u003e)\nconf = conf.export()\n```\n\nTo check if it worked:\n\n```python\nconf.interfaces\n```\n\n(...you should get the list of device interfaces)\n\n### Create config\n\nYou can also create configuration from scratch:\n\n```python\nfrom lxml import etree as ET\nimport nxpy as np\ndevice = np.Device()\nifce = np.Interface()\nifce.name = 'ge-0/0/0'\nifce.description = 'NEW_DESCRIPTION'\ndevice.interfaces.append(ifce)\n\ndevice = device.export()\nconfiguration = ET.tostring(device)\n\nprint configuration\n```\n\nThis will return XML formatted device configuration.\n\n## Apply the change with NCCLIENT\n\nYou can use ncclient to apply the configuration created in the previous example:\n\n```python\n# import the ncclient library\nfrom ncclient import manager\n# AND replace:\ndevice = device.export()\n# with:\ndevice = device.export(netconf_config=True)\n# to make configuration netconf-compatible\n# Now to pass configuration to device:\n\nwith manager.connect(host=\u003cHOSTNAME\u003e, port=830, username=\u003cUSERNAME\u003e, password=\u003cPASSWORD\u003e) as m:\n    m.edit_config(target='candidate', config=configuration, test_option='test-then-set')\n    m.commit(confirmed=True, timeout='120')\n    m.commit(confirmed=False)\n\n# the above should change the description of interface ge-0/0/0 to NEW_DESCRIPTION\n```\n\n## Changelog\n\n* v0.4.2:\n  * Python packaging changes (README,setup.py)\n  * Change license to GPLv3\n  * Preliminary support for L2VPNS\n  * Ethernet OAM support\n* v0.4.1:\n  * Fix version in setup.py\n* v0.4:\n  * Added full support for bgp flowspec (routing-options flow) configuration\n* v0.3:\n  * Support for basic interface configuration (name, description, vlan)\n  * Support for basic vlan configuration\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to\ndiscuss what you would like to change.\n\nThis repository is managed by [GRNET](https://github.com/grnet). You can contact\nus at dev [at] noc [dot] grnet [dot] gr.\n\n## License\n\nThis project is licensed under the GPL License - see the [LICENSE](LICENSE) file\nfor details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrnet%2Fjuniper-nxpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrnet%2Fjuniper-nxpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrnet%2Fjuniper-nxpy/lists"}