networka 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. networka-0.1.9/.gitignore +283 -0
  2. networka-0.1.9/LICENSE +73 -0
  3. networka-0.1.9/PKG-INFO +316 -0
  4. networka-0.1.9/README.md +244 -0
  5. networka-0.1.9/config/examples/README.md +126 -0
  6. networka-0.1.9/docs/assets/images/networka.png +0 -0
  7. networka-0.1.9/docs/assets/javascripts/extra.js +1 -0
  8. networka-0.1.9/docs/assets/stylesheets/extra.css +45 -0
  9. networka-0.1.9/docs/backups.md +26 -0
  10. networka-0.1.9/docs/configuration.md +141 -0
  11. networka-0.1.9/docs/development.md +369 -0
  12. networka-0.1.9/docs/documentation-guidelines.md +49 -0
  13. networka-0.1.9/docs/environment-variables.md +242 -0
  14. networka-0.1.9/docs/examples/recipes.md +44 -0
  15. networka-0.1.9/docs/examples/user_sequences/README.md +39 -0
  16. networka-0.1.9/docs/examples/user_sequences/arista_eos/custom.yml +9 -0
  17. networka-0.1.9/docs/examples/user_sequences/mikrotik_routeros/custom.yml +9 -0
  18. networka-0.1.9/docs/file_upload.md +176 -0
  19. networka-0.1.9/docs/getting-started.md +54 -0
  20. networka-0.1.9/docs/index.md +54 -0
  21. networka-0.1.9/docs/interactive-credentials.md +179 -0
  22. networka-0.1.9/docs/ip-address-support.md +100 -0
  23. networka-0.1.9/docs/multi-vendor-support.md +352 -0
  24. networka-0.1.9/docs/output-modes.md +28 -0
  25. networka-0.1.9/docs/overrides/home.html +125 -0
  26. networka-0.1.9/docs/overrides/partials/logo.html +3 -0
  27. networka-0.1.9/docs/platform-compatibility.md +154 -0
  28. networka-0.1.9/docs/reference/api.md +19 -0
  29. networka-0.1.9/docs/reference/cli.md +10 -0
  30. networka-0.1.9/docs/results.md +27 -0
  31. networka-0.1.9/docs/running-commands.md +99 -0
  32. networka-0.1.9/docs/shell-completion.md +267 -0
  33. networka-0.1.9/docs/tmux-ssh.md +123 -0
  34. networka-0.1.9/docs/transport.md +38 -0
  35. networka-0.1.9/docs/troubleshooting.md +42 -0
  36. networka-0.1.9/docs/vendors/arista/index.md +33 -0
  37. networka-0.1.9/docs/vendors/cisco/index.md +126 -0
  38. networka-0.1.9/docs/vendors/index.md +10 -0
  39. networka-0.1.9/docs/vendors/juniper/index.md +30 -0
  40. networka-0.1.9/docs/vendors/mikrotik/index.md +122 -0
  41. networka-0.1.9/pyproject.toml +296 -0
  42. networka-0.1.9/shell_completion/bash_completion_nw.sh +339 -0
  43. networka-0.1.9/src/network_toolkit/__about__.py +4 -0
  44. networka-0.1.9/src/network_toolkit/__init__.py +8 -0
  45. networka-0.1.9/src/network_toolkit/__main__.py +10 -0
  46. networka-0.1.9/src/network_toolkit/builtin_sequences/arista_eos/common.yml +53 -0
  47. networka-0.1.9/src/network_toolkit/builtin_sequences/mikrotik_routeros/common.yml +52 -0
  48. networka-0.1.9/src/network_toolkit/cli.py +265 -0
  49. networka-0.1.9/src/network_toolkit/commands/__init__.py +8 -0
  50. networka-0.1.9/src/network_toolkit/commands/backup.py +441 -0
  51. networka-0.1.9/src/network_toolkit/commands/complete.py +172 -0
  52. networka-0.1.9/src/network_toolkit/commands/config.py +1068 -0
  53. networka-0.1.9/src/network_toolkit/commands/diff.py +485 -0
  54. networka-0.1.9/src/network_toolkit/commands/download.py +197 -0
  55. networka-0.1.9/src/network_toolkit/commands/firmware.py +780 -0
  56. networka-0.1.9/src/network_toolkit/commands/info.py +377 -0
  57. networka-0.1.9/src/network_toolkit/commands/list.py +345 -0
  58. networka-0.1.9/src/network_toolkit/commands/routerboard_upgrade.py +204 -0
  59. networka-0.1.9/src/network_toolkit/commands/run.py +839 -0
  60. networka-0.1.9/src/network_toolkit/commands/schema_unified.py +91 -0
  61. networka-0.1.9/src/network_toolkit/commands/sequence.py +17 -0
  62. networka-0.1.9/src/network_toolkit/commands/ssh.py +540 -0
  63. networka-0.1.9/src/network_toolkit/commands/ssh_engines.py +0 -0
  64. networka-0.1.9/src/network_toolkit/commands/ssh_fallback.py +97 -0
  65. networka-0.1.9/src/network_toolkit/commands/ssh_platform.py +120 -0
  66. networka-0.1.9/src/network_toolkit/commands/upload.py +237 -0
  67. networka-0.1.9/src/network_toolkit/commands/vendor_config_backup.py +378 -0
  68. networka-0.1.9/src/network_toolkit/common/color_magic.py +177 -0
  69. networka-0.1.9/src/network_toolkit/common/command.py +135 -0
  70. networka-0.1.9/src/network_toolkit/common/command_base.py +135 -0
  71. networka-0.1.9/src/network_toolkit/common/command_helpers.py +214 -0
  72. networka-0.1.9/src/network_toolkit/common/credentials.py +86 -0
  73. networka-0.1.9/src/network_toolkit/common/defaults.py +17 -0
  74. networka-0.1.9/src/network_toolkit/common/errors.py +130 -0
  75. networka-0.1.9/src/network_toolkit/common/interactive_confirmation.py +144 -0
  76. networka-0.1.9/src/network_toolkit/common/logging.py +47 -0
  77. networka-0.1.9/src/network_toolkit/common/output.py +594 -0
  78. networka-0.1.9/src/network_toolkit/common/output_clean.py +244 -0
  79. networka-0.1.9/src/network_toolkit/common/paths.py +86 -0
  80. networka-0.1.9/src/network_toolkit/common/resolver.py +207 -0
  81. networka-0.1.9/src/network_toolkit/common/styles.py +199 -0
  82. networka-0.1.9/src/network_toolkit/common/table_generator.py +169 -0
  83. networka-0.1.9/src/network_toolkit/common/table_providers.py +716 -0
  84. networka-0.1.9/src/network_toolkit/config.py +1506 -0
  85. networka-0.1.9/src/network_toolkit/credentials.py +288 -0
  86. networka-0.1.9/src/network_toolkit/device.py +1658 -0
  87. networka-0.1.9/src/network_toolkit/device_transfers.py +170 -0
  88. networka-0.1.9/src/network_toolkit/exceptions.py +78 -0
  89. networka-0.1.9/src/network_toolkit/ip_device.py +241 -0
  90. networka-0.1.9/src/network_toolkit/platforms/__init__.py +21 -0
  91. networka-0.1.9/src/network_toolkit/platforms/base.py +267 -0
  92. networka-0.1.9/src/network_toolkit/platforms/cisco_ios/__init__.py +6 -0
  93. networka-0.1.9/src/network_toolkit/platforms/cisco_ios/constants.py +15 -0
  94. networka-0.1.9/src/network_toolkit/platforms/cisco_ios/operations.py +426 -0
  95. networka-0.1.9/src/network_toolkit/platforms/cisco_iosxe/__init__.py +6 -0
  96. networka-0.1.9/src/network_toolkit/platforms/cisco_iosxe/constants.py +15 -0
  97. networka-0.1.9/src/network_toolkit/platforms/cisco_iosxe/operations.py +580 -0
  98. networka-0.1.9/src/network_toolkit/platforms/cisco_shared/__init__.py +0 -0
  99. networka-0.1.9/src/network_toolkit/platforms/cisco_shared/operations.py +0 -0
  100. networka-0.1.9/src/network_toolkit/platforms/factory.py +190 -0
  101. networka-0.1.9/src/network_toolkit/platforms/mikrotik_routeros/__init__.py +8 -0
  102. networka-0.1.9/src/network_toolkit/platforms/mikrotik_routeros/confirmation_patterns.py +24 -0
  103. networka-0.1.9/src/network_toolkit/platforms/mikrotik_routeros/constants.py +31 -0
  104. networka-0.1.9/src/network_toolkit/platforms/mikrotik_routeros/operations.py +686 -0
  105. networka-0.1.9/src/network_toolkit/results_enhanced.py +364 -0
  106. networka-0.1.9/src/network_toolkit/schemas/__init__.py +8 -0
  107. networka-0.1.9/src/network_toolkit/sequence_manager.py +239 -0
  108. networka-0.1.9/src/network_toolkit/shell_completion/bash_completion_nw.sh +339 -0
  109. networka-0.1.9/src/network_toolkit/shell_completion/zsh_completion_nw.zsh +136 -0
  110. networka-0.1.9/src/network_toolkit/transport/__init__.py +15 -0
  111. networka-0.1.9/src/network_toolkit/transport/factory.py +113 -0
  112. networka-0.1.9/src/network_toolkit/transport/interfaces.py +46 -0
  113. networka-0.1.9/src/network_toolkit/transport/nornir_inventory.py +173 -0
  114. networka-0.1.9/src/network_toolkit/transport/nornir_netmiko.py +277 -0
  115. networka-0.1.9/src/network_toolkit/transport/scrapli_sync.py +36 -0
  116. networka-0.1.9/src/network_toolkit/tui/__init__.py +18 -0
  117. networka-0.1.9/src/network_toolkit/tui/app.py +1275 -0
  118. networka-0.1.9/src/network_toolkit/tui/clipboard.py +46 -0
  119. networka-0.1.9/src/network_toolkit/tui/compat.py +111 -0
  120. networka-0.1.9/src/network_toolkit/tui/constants.py +111 -0
  121. networka-0.1.9/src/network_toolkit/tui/controller.py +550 -0
  122. networka-0.1.9/src/network_toolkit/tui/data.py +149 -0
  123. networka-0.1.9/src/network_toolkit/tui/dialogs.py +196 -0
  124. networka-0.1.9/src/network_toolkit/tui/helpers.py +55 -0
  125. networka-0.1.9/src/network_toolkit/tui/keymap.py +31 -0
  126. networka-0.1.9/src/network_toolkit/tui/layout.py +111 -0
  127. networka-0.1.9/src/network_toolkit/tui/models.py +93 -0
  128. networka-0.1.9/src/network_toolkit/tui/output_manager.py +372 -0
  129. networka-0.1.9/src/network_toolkit/tui/prompt.py +172 -0
  130. networka-0.1.9/src/network_toolkit/tui/services.py +285 -0
@@ -0,0 +1,283 @@
1
+ # Byte-compiled / optimized / bytecode files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be added to the global gitignore or merged into this project gitignore. For a PyCharm
158
+ # project, it is recommended to exclude entire .idea directory.
159
+ .idea/
160
+
161
+ # VS Code
162
+ .vscode/
163
+ *.code-workspace
164
+
165
+ # Network Toolkit specific files
166
+ # Configuration files with sensitive data
167
+ devices.yml.local
168
+ devices.yml.prod
169
+ devices.yml.backup
170
+ *.yml.bak
171
+
172
+ # Firmware files
173
+ *.npk
174
+ *.bin
175
+ *.hex
176
+ firmware/
177
+ firmware_images/
178
+
179
+ # Backup files
180
+ backups/
181
+ *.backup
182
+ *.bak
183
+ *.orig
184
+
185
+ # Log files
186
+ logs/
187
+ *.log
188
+ *.log.*
189
+ log/
190
+
191
+ # Results and output files
192
+ results/
193
+ output/
194
+ reports/
195
+ *.out
196
+ *.txt.results
197
+
198
+ # Temporary files
199
+ tmp/
200
+ temp/
201
+ .tmp/
202
+ *.tmp
203
+ *.temp
204
+
205
+ # SSH keys and certificates
206
+ *.pem
207
+ *.key
208
+ *.crt
209
+ *.cer
210
+ *.p12
211
+ *.pfx
212
+ id_rsa*
213
+ id_ed25519*
214
+ authorized_keys
215
+ known_hosts
216
+
217
+ # Network configuration exports
218
+ *.rsc
219
+ *.cfg
220
+ *.conf.backup
221
+
222
+ # Development and testing artifacts
223
+ .coverage.*
224
+ htmlcov/
225
+ *.prof
226
+ *.cprof
227
+
228
+ # OS specific files
229
+ .DS_Store
230
+ .DS_Store?
231
+ ._*
232
+ .Spotlight-V100
233
+ .Trashes
234
+ ehthumbs.db
235
+ Thumbs.db
236
+ *.swp
237
+ *.swo
238
+ *~
239
+
240
+ # Editor backups
241
+ *~
242
+ .#*
243
+ #*#
244
+
245
+ # Local development overrides
246
+ local.py
247
+ settings_local.py
248
+ config_local.py
249
+
250
+ # Database files
251
+ *.db
252
+ *.sqlite
253
+ *.sqlite3
254
+
255
+ # Archives
256
+ *.zip
257
+ *.tar.gz
258
+ *.rar
259
+ *.7z
260
+
261
+ # uv specific (keep uv.lock for reproducible builds)
262
+ # uv.lock is intentionally NOT ignored - keep it for dependency management
263
+
264
+ # Ruff cache
265
+ .ruff_cache/
266
+
267
+ # Pre-commit
268
+ .pre-commit-config.yaml.bak
269
+
270
+ # Task runner cache and binaries
271
+ .task/
272
+ bin/task
273
+
274
+ # config dirs with sensitive data - ignore content but keep directories
275
+ config/devices/*
276
+ !config/devices/.gitkeep
277
+ config/groups/*
278
+ !config/groups/.gitkeep
279
+ config/sequences/*
280
+ !config/sequences/.gitkeep
281
+
282
+ # Keep examples directory
283
+ !config/examples/
networka-0.1.9/LICENSE ADDED
@@ -0,0 +1,73 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [2025] [Network Team]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
@@ -0,0 +1,316 @@
1
+ Metadata-Version: 2.4
2
+ Name: networka
3
+ Version: 0.1.9
4
+ Summary: Modern async Python toolkit for network device automation
5
+ Project-URL: Homepage, https://github.com/narrowin/networka
6
+ Project-URL: Documentation, https://narrowin.github.io/networka/
7
+ Project-URL: Repository, https://github.com/narrowin/networka.git
8
+ Project-URL: Bug Tracker, https://github.com/narrowin/networka/issues
9
+ Project-URL: Changelog, https://github.com/narrowin/networka/blob/main/CHANGELOG.md
10
+ Project-URL: Source Code, https://github.com/narrowin/networka
11
+ Project-URL: CI/CD, https://github.com/narrowin/networka/actions
12
+ Author-email: narrowin <contact@narrowin.com>
13
+ Maintainer-email: narrowin <contact@narrowin.com>
14
+ License: Apache-2.0
15
+ License-File: LICENSE
16
+ Keywords: async,automation,cli,infrastructure,mikrotik,narrowin,network,networking,routeros
17
+ Classifier: Development Status :: 4 - Beta
18
+ Classifier: Environment :: Console
19
+ Classifier: Intended Audience :: Developers
20
+ Classifier: Intended Audience :: System Administrators
21
+ Classifier: Intended Audience :: Telecommunications Industry
22
+ Classifier: License :: OSI Approved :: Apache Software License
23
+ Classifier: Operating System :: MacOS
24
+ Classifier: Operating System :: Microsoft :: Windows
25
+ Classifier: Operating System :: OS Independent
26
+ Classifier: Operating System :: POSIX :: Linux
27
+ Classifier: Programming Language :: Python :: 3
28
+ Classifier: Programming Language :: Python :: 3 :: Only
29
+ Classifier: Programming Language :: Python :: 3.11
30
+ Classifier: Programming Language :: Python :: 3.12
31
+ Classifier: Programming Language :: Python :: 3.13
32
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
33
+ Classifier: Topic :: System :: Networking
34
+ Classifier: Topic :: System :: Systems Administration
35
+ Classifier: Topic :: Utilities
36
+ Classifier: Typing :: Typed
37
+ Requires-Python: >=3.11
38
+ Requires-Dist: asyncssh>=2.21.0
39
+ Requires-Dist: libtmux>=0.46.2
40
+ Requires-Dist: pydantic>=2.5.0
41
+ Requires-Dist: python-dotenv>=1.0.0
42
+ Requires-Dist: pyyaml>=6.0
43
+ Requires-Dist: rich>=13.0.0
44
+ Requires-Dist: scrapli-community>=2025.1.30
45
+ Requires-Dist: scrapli[community]>=2023.7.30
46
+ Requires-Dist: scrapli[paramiko]>=2023.7.30
47
+ Requires-Dist: textual>=0.58.0
48
+ Requires-Dist: typer>=0.12.0
49
+ Provides-Extra: dev
50
+ Requires-Dist: bandit>=1.7.0; extra == 'dev'
51
+ Requires-Dist: build>=0.10.0; extra == 'dev'
52
+ Requires-Dist: cffconvert>=2.0.0; extra == 'dev'
53
+ Requires-Dist: detect-secrets>=1.4.0; extra == 'dev'
54
+ Requires-Dist: mypy>=1.7.0; extra == 'dev'
55
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
56
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
57
+ Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
58
+ Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
59
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
60
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
61
+ Requires-Dist: twine>=4.0.0; extra == 'dev'
62
+ Requires-Dist: types-paramiko>=3.0.0; extra == 'dev'
63
+ Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
64
+ Provides-Extra: docs
65
+ Requires-Dist: mkdocs-click>=0.9.0; extra == 'docs'
66
+ Requires-Dist: mkdocs-material>=9.0.0; extra == 'docs'
67
+ Requires-Dist: mkdocs>=1.5.0; extra == 'docs'
68
+ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'docs'
69
+ Provides-Extra: tmux
70
+ Requires-Dist: libtmux>=0.21.0; extra == 'tmux'
71
+ Description-Content-Type: text/markdown
72
+
73
+ <div align="center"><img src="https://raw.githubusercontent.com/narrowin/networka/main/docs/assets/images/networka.png" alt="Networka Logo" width="320"/>
74
+
75
+ <p><a href="https://narrowin.github.io/networka/">Full documentation →</a></p>
76
+ </div>
77
+
78
+ <br/>
79
+
80
+ **Networka: `Eierlegende Wollmilchsau` of network operations — optimized for your daily workflows.**
81
+
82
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
83
+ [![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey.svg)](https://github.com/narrowin/networka)
84
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
85
+ [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
86
+ [![Type checked with mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](http://mypy-lang.org/)
87
+ [![CI](https://github.com/narrowin/networka/actions/workflows/ci.yml/badge.svg)](https://github.com/narrowin/networka/actions/workflows/ci.yml)
88
+ [![Docs](https://img.shields.io/github/actions/workflow/status/narrowin/networka/docs.yml?label=Docs&logo=github)](https://narrowin.github.io/networka/)
89
+
90
+ Networka is a modern async CLI tool for automating network devices across multiple vendors. Built with async/await patterns for high performance and reliability. Designed for network engineers who want fast, scalable automation with full cross-platform support.
91
+
92
+ ---
93
+
94
+ ## _The Networka Monologue_
95
+
96
+ _“People ask the question…_ <br>
97
+ **what’s a Networka?** <br>
98
+
99
+ And I tell 'em — <br>
100
+ it's **not** about cables, configs, and pings. <br>
101
+ _Oh no._ <br>
102
+ There’s more to it than that, my friend. <br>
103
+
104
+ We all like a bit of the good life — <br>
105
+ some the uptime, some the security, <br>
106
+ others the automation, the visibility, or the compliance. <br>
107
+
108
+ But a **Networka**, oh, they're different. <br>
109
+ Why? <br>
110
+ Because a real **Networka** wants the f\*ing lot.”<br><br>
111
+ (inspired by: [RockNRolla](https://www.youtube.com/watch?v=s4YLBqMJYOo))
112
+
113
+ ## Getting Started
114
+
115
+ - Installation: see the docs → https://narrowin.github.io/networka/getting-started/
116
+ - Platform compatibility → https://narrowin.github.io/networka/platform-compatibility/
117
+ - Shell completion → https://narrowin.github.io/networka/shell-completion/
118
+ - CLI reference → https://narrowin.github.io/networka/reference/cli/
119
+ - API reference → https://narrowin.github.io/networka/reference/api/
120
+
121
+ ## Features
122
+
123
+ ### **Core Capabilities**
124
+
125
+ - **Multi-vendor network automation**: Native support for MikroTik RouterOS, Cisco IOS/IOS-XE/NX-OS, Arista EOS, Juniper JunOS, and more
126
+ - **Scalable device management**: Execute commands across individual devices or groups concurrently with async/await architecture
127
+ - **Cross-platform compatibility**: Full support for Linux, macOS, and Windows environments
128
+ - **Flexible configuration**: YAML and CSV configuration options with powerful device tagging and grouping
129
+
130
+ ### **Operational Features**
131
+
132
+ - **Command execution**: Run single commands or predefined sequences across devices and groups
133
+ - **File management**: Upload/download files to/from network devices with verification and error handling
134
+ - **Device backup**: Automated configuration and comprehensive backups with vendor-specific implementations
135
+ - **Firmware management**: Upgrade, downgrade, and BIOS operations with platform validation
136
+ - **SSH session management**: Direct SSH access with tmux integration for interactive sessions
137
+
138
+ ### **Advanced Features**
139
+
140
+ - **Intelligent completions**: Context-aware shell completions for devices, groups, and sequences
141
+ - **Vendor-aware sequences**: Predefined command sets optimized for different network platforms
142
+ - **Results management**: Organized storage with multiple output formats and automatic timestamping
143
+ - **Configuration validation**: Schema-based validation with detailed error reporting
144
+ - **Credential management**: Secure credential handling via environment variables with device-specific overrides
145
+
146
+ ### **Developer & Integration Features**
147
+
148
+ - **Type safety**: Full mypy type checking for reliability and maintainability
149
+ - **Modern architecture**: Built with async/await patterns for high performance
150
+ - **Extensible design**: Plugin-friendly architecture for adding new vendors and operations
151
+ - **Rich output**: Professional CLI interface with color coding and structured information display
152
+
153
+ ## Installation
154
+
155
+ ### System Requirements
156
+
157
+ - **Operating System**: Linux, macOS, or Windows
158
+ - **Python**: 3.11, 3.12, or 3.13
159
+ - **Network Access**: SSH connectivity to target devices
160
+ - **Package Manager**: uv (recommended) or pip
161
+
162
+ ### Quick Install (recommended)
163
+
164
+ Not on PyPI yet — install from GitHub.
165
+
166
+ ```bash
167
+ # Recommended (isolated, user-wide)
168
+ uv tool install git+https://github.com/narrowin/networka.git
169
+
170
+ # Alternative
171
+ pipx install git+https://github.com/narrowin/networka.git
172
+
173
+ # Verify installation
174
+ nw --help
175
+ ```
176
+
177
+ #### If `nw` is not found
178
+
179
+ - Check: `command -v nw` (Linux/macOS) or `where nw` (Windows)
180
+ - If using pipx: ensure PATH is set, then reload shell
181
+ ```bash
182
+ pipx ensurepath
183
+ exec $SHELL
184
+ ```
185
+ - Linux/macOS: add user bin to PATH if needed
186
+ ```bash
187
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
188
+ exec $SHELL
189
+ ```
190
+ - Windows (native, best-effort): prefer WSL2; if native, run `pipx ensurepath` and restart the terminal
191
+
192
+ More → PATH troubleshooting: https://narrowin.github.io/networka/troubleshooting/#path-nw-not-found
193
+
194
+ ### Upgrade & Remove
195
+
196
+ ```bash
197
+ # Upgrade to latest version (from GitHub)
198
+ uv tool install --force git+https://github.com/narrowin/networka.git
199
+ # or
200
+ pipx install --force git+https://github.com/narrowin/networka.git
201
+
202
+ # Remove installation
203
+ uv tool uninstall nw
204
+ # or
205
+ pipx uninstall networka
206
+ ```
207
+
208
+ ### Platform-Specific Notes
209
+
210
+ **Linux/macOS**: No additional dependencies required
211
+
212
+ **Windows**: Scrapli (the default transport) does not officially support native Windows. While it may work with Paramiko or ssh2-python drivers, the recommended approach is to run Networka on WSL2 (Ubuntu) for a fully supported POSIX environment. Native Windows usage is best-effort.
213
+
214
+ WSL2 quickstart (recommended):
215
+
216
+ ```bash
217
+ # In Ubuntu on WSL2
218
+ curl -LsSf https://astral.sh/uv/install.sh | sh
219
+ exec $SHELL
220
+ uv tool install git+https://github.com/narrowin/networka.git
221
+ nw --help
222
+ ```
223
+
224
+ Details → https://narrowin.github.io/networka/platform-compatibility/#wsl2-quickstart-recommended
225
+
226
+ ## Quick Start
227
+
228
+ Get up and running with config init command:
229
+
230
+ ````bash
231
+ # Initialize in default location with interactive prompts
232
+ nw config init
233
+
234
+ ````
235
+
236
+ ### One-liners (no config)
237
+
238
+ Run directly against an IP without creating files. `--platform` selects the network OS driver; `--interactive-auth` prompts for credentials.
239
+
240
+ ```bash
241
+ # MikroTik RouterOS
242
+ nw run --platform mikrotik_routeros 192.0.2.10 "/system/identity/print" --interactive-auth
243
+ ```
244
+
245
+ ```bash
246
+ # Cisco IOS-XE
247
+ nw run --platform cisco_iosxe 198.51.100.20 "show version" --interactive-auth
248
+ ```
249
+
250
+ ## Terminology: device_type vs hardware platform vs transport
251
+
252
+ - device_type: Network OS driver used for connections and commands (Scrapli "platform"). Examples: mikrotik_routeros, cisco_iosxe, arista_eos, juniper_junos.
253
+ - platform (hardware/firmware): Hardware architecture used for firmware-related operations (x86, x86_64, arm, mipsbe, tile).
254
+ - transport: Connection backend. Default is scrapli.
255
+
256
+ Note: When targeting IPs directly, `--platform` refers to the network driver (device_type), not hardware architecture.
257
+
258
+ ## Quick links
259
+
260
+ - Getting started → https://narrowin.github.io/networka/getting-started/
261
+ - Running commands → https://narrowin.github.io/networka/running-commands/
262
+ - Configuration → https://narrowin.github.io/networka/configuration/
263
+ - Environment variables → https://narrowin.github.io/networka/environment-variables/
264
+ - Results → https://narrowin.github.io/networka/results/
265
+ - Output modes → https://narrowin.github.io/networka/output-modes/
266
+ - Backups → https://narrowin.github.io/networka/backups/
267
+ - CLI reference → https://narrowin.github.io/networka/reference/cli/
268
+ - API reference → https://narrowin.github.io/networka/reference/api/
269
+
270
+ ## CLI overview
271
+
272
+ - For current usage and commands, see the CLI reference:
273
+ - https://narrowin.github.io/networka/reference/cli/
274
+ - Quick checks: `nw --help` and `nw --version`
275
+
276
+ ## Community & support
277
+
278
+ - Visit our [documentation](https://narrowin.github.io/networka/) for detailed guides and examples
279
+ - Create [GitHub Issues](https://github.com/narrowin/networka/issues) for bug reports and feature requests
280
+ - See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines
281
+ - Check [SECURITY.md](SECURITY.md) for security policy and reporting vulnerabilities
282
+
283
+ ## Contributing
284
+
285
+ Have a look through existing [Issues](https://github.com/narrowin/networka/issues) and [Pull Requests](https://github.com/narrowin/networka/pulls) that you could help with. If you'd like to request a feature or report a bug, please create a GitHub Issue using one of the templates provided.
286
+
287
+ [See contribution guide →](CONTRIBUTING.md)
288
+
289
+ ## Documentation
290
+
291
+ - Docs Home → https://narrowin.github.io/networka/
292
+ - Platform Compatibility → https://narrowin.github.io/networka/platform-compatibility/
293
+ - Development Guide → https://narrowin.github.io/networka/development/
294
+ - Multi-Vendor Support → https://narrowin.github.io/networka/multi-vendor-support/
295
+ - IP Address Support → https://narrowin.github.io/networka/ip-address-support/
296
+ - Transport Selection → https://narrowin.github.io/networka/transport/
297
+ - Environment Variables → https://narrowin.github.io/networka/environment-variables/
298
+ - File Upload Guide → https://narrowin.github.io/networka/file_upload/
299
+ - Interactive Credentials → https://narrowin.github.io/networka/interactive-credentials/
300
+
301
+ ## License
302
+
303
+ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
304
+
305
+ ## Acknowledgments
306
+
307
+ - [Scrapli](https://github.com/carlmontanari/scrapli) - Network device connections
308
+ - [Nornir](https://github.com/nornir-automation/nornir) - Network automation framework
309
+ - [Netmiko](https://github.com/ktbyers/netmiko) - Multi-vendor CLI connections to network devices
310
+ - [Typer](https://github.com/tiangolo/typer) - CLI framework
311
+ - [Pydantic](https://github.com/pydantic/pydantic) - Data validation
312
+ - [Rich](https://github.com/Textualize/rich) - Terminal formatting
313
+
314
+ ---
315
+
316
+ _Built for network engineers who value clean, reliable automation_