Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: netmiko
3 Version: 4.6.0
4 Summary: Multi-vendor library to simplify legacy CLI connections to network devices
5 Home-page: https://github.com/ktbyers/netmiko
6 License: MIT
7 Author: Kirk Byers
8 Author-email: [email protected]
9 Requires-Python: >=3.9,<4.0
10 Classifier: License :: OSI Approved :: MIT License
11 Classifier: Programming Language :: Python :: 3
12 Classifier: Programming Language :: Python :: 3.9
13 Classifier: Programming Language :: Python :: 3.10
14 Classifier: Programming Language :: Python :: 3.11
15 Classifier: Programming Language :: Python :: 3.12
16 Classifier: Programming Language :: Python :: 3.13
17 Requires-Dist: ntc-templates (>=3.1.0)
18 Requires-Dist: paramiko (>=2.9.5)
19 Requires-Dist: pyserial (>=3.3)
20 Requires-Dist: pyyaml (>=6.0.2)
21 Requires-Dist: rich (>=13.8)
22 Requires-Dist: ruamel.yaml (>=0.17)
23 Requires-Dist: scp (>=0.13.6)
24 Requires-Dist: textfsm (>=1.1.3)
25 Project-URL: Repository, https://github.com/ktbyers/netmiko
26 Description-Content-Type: text/markdown
27
28 [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/netmiko.svg)](https://img.shields.io/pypi/pyversions/netmiko)
29 [![PyPI](https://img.shields.io/pypi/v/netmiko.svg)](https://pypi.python.org/pypi/netmiko)
30 [![Downloads](https://static.pepy.tech/badge/netmiko)](https://static.pepy.tech/badge/netmiko)
31 [![GitHub contributors](https://img.shields.io/github/contributors/ktbyers/netmiko.svg)](https://GitHub.com/ktbyers/netmiko/graphs/contributors/)
32 [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
33
34 <img src="https://ktbyers.github.io/netmiko/images/netmiko_logo_gh.png" width="320">
35
36 Netmiko
37 =======
38
39 Multi-vendor library to simplify CLI connections to network devices
40
41 <br />
42
43 ## Contributing to Netmiko
44
45 [CONTRIBUTING.md](https://github.com/ktbyers/netmiko/blob/develop/CONTRIBUTING.md)
46
47 <br />
48
49 ## Why Netmiko?
50 Network automation to screen-scraping devices is primarily concerned with gathering output from show commands and with making configuration changes.
51
52 Netmiko aims to accomplish both of these operations and to do it across a very broad set of platforms. It seeks to do this while abstracting away low-level state control (i.e. eliminate low-level regex pattern matching to the extent practical).
53
54 <br />
55
56 ## Getting Started
57 - [Getting Started](#getting-started-1)
58
59 <br />
60
61 ## Examples
62 *You really should look here.*
63
64 - [Netmiko Examples](https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md)
65
66 <br />
67
68
69 ## Supported Platforms
70
71 [PLATFORMS](https://github.com/ktbyers/netmiko/blob/develop/PLATFORMS.md)
72
73 <br />
74
75
76 ## Installation
77
78 To install netmiko, simply use pip:
79
80 ```
81 $ pip install netmiko
82 ```
83
84 <br />
85
86 ## API-Documentation
87
88 [API-Documentation](https://ktbyers.github.io/netmiko/docs/netmiko/index.html)
89
90 <br />
91
92 ## Common Issues/FAQ
93
94 Answers to some [common_questions](https://github.com/ktbyers/netmiko/blob/develop/COMMON_ISSUES.md)
95
96 <br />
97
98 ### Tutorials
99
100 - [Netmiko Overview](https://pynet.twb-tech.com/blog/automation/netmiko.html)
101 - [Secure Copy](https://pynet.twb-tech.com/blog/automation/netmiko-scp.html)
102 - [Netmiko through SSH Proxy](https://pynet.twb-tech.com/blog/automation/netmiko-proxy.html)
103 - [Netmiko and TextFSM](https://pynet.twb-tech.com/blog/automation/netmiko-textfsm.html)
104 - [Netmiko and what constitutes done](https://pynet.twb-tech.com/blog/automation/netmiko-what-is-done.html)
105
106 <br />
107
108 ### Getting Started:
109
110 #### Create a dictionary representing the device.
111
112 Supported device_types can be found in [ssh_dispatcher.py](https://github.com/ktbyers/netmiko/blob/master/netmiko/ssh_dispatcher.py), see CLASS_MAPPER keys.
113 ```py
114 from netmiko import ConnectHandler
115
116 cisco_881 = {
117 'device_type': 'cisco_ios',
118 'host': '10.10.10.10',
119 'username': 'test',
120 'password': 'password',
121 'port' : 8022, # optional, defaults to 22
122 'secret': 'secret', # optional, defaults to ''
123 }
124
125 ```
126
127 #### Establish an SSH connection to the device by passing in the device dictionary.
128
129 ```py
130 net_connect = ConnectHandler(**cisco_881)
131 ```
132
133 #### Execute show commands.
134
135 ```py
136 output = net_connect.send_command('show ip int brief')
137 print(output)
138 ```
139 ```
140 Interface IP-Address OK? Method Status Protocol
141 FastEthernet0 unassigned YES unset down down
142 FastEthernet1 unassigned YES unset down down
143 FastEthernet2 unassigned YES unset down down
144 FastEthernet3 unassigned YES unset down down
145 FastEthernet4 10.10.10.10 YES manual up up
146 Vlan1 unassigned YES unset down down
147 ```
148
149 #### Execute configuration change commands (will automatically enter into config mode)
150
151 ```py
152 config_commands = [ 'logging buffered 20000',
153 'logging buffered 20010',
154 'no logging console' ]
155 output = net_connect.send_config_set(config_commands)
156 print(output)
157 ```
158 ```
159 pynet-rtr1#config term
160 Enter configuration commands, one per line. End with CNTL/Z.
161 pynet-rtr1(config)#logging buffered 20000
162 pynet-rtr1(config)#logging buffered 20010
163 pynet-rtr1(config)#no logging console
164 pynet-rtr1(config)#end
165 pynet-rtr1#
166 ```
167
168 <br />
169
170 ## API-Documentation
171
172 <a href="https://ktbyers.github.io/netmiko/docs/netmiko/index.html" title="Docs">API Documentation</a>
173
174 Below are some of the particularly handy Classes/functions for easy reference:
175 - [Base Connection Object](https://ktbyers.github.io/netmiko/docs/netmiko/base_connection.html)
176 - [SSH Autodetect](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.SSHDetect)
177 - [SSH Dispatcher](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.ssh_dispatcher)
178 - [Redispatch](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.redispatch)
179
180 <br />
181
182 ## Contributing
183
184 Contributors are welcome.
185
186 You can contribute to Netmiko in a variety of ways: answering questions on Slack (see below in Questions/Discussions), responding to issues, adding to the common issues, reporting/fixing bugs, or even adding your own device type.
187
188 Before contributing a new vendor/platform device type, remember that any code added needs to be supported in some fashion. To add a vendor/platform you can follow the outline [here](https://github.com/ktbyers/netmiko/blob/develop/VENDOR.md). Once you've worked on your first pass of your driver and have it functional, you'll need to include test data in order for it to be merged into develop, you can see the general flow of how to do that [here](https://github.com/ktbyers/netmiko/blob/develop/TESTING.md).
189
190 For all code contributions, please ensure that you have ran `black` against the code or your code will fail the Travis CI build.
191
192 <br />
193
194 ## Questions/Discussion
195
196 If you find an issue with Netmiko, then you can open an issue on this projects issue page here: [https://github.com/ktbyers/netmiko/issues](https://github.com/ktbyers/netmiko/issues). Please make sure you've read through the common issues and examples prior to opening an issue. Please only open issues for bugs, feature requests, or other topics related to development of Netmiko. If you simply have a question, join us on Slack...
197
198 If you have questions or would like to discuss Netmiko, a #netmiko channel exists in [this Slack](https://pynet.slack.com) workspace. To join, use [this invitation](https://join.slack.com/t/pynet/shared_invite/zt-km2k3upf-AkWHY4YEx3sI1R5irMmc7Q). Once you have entered the workspace, then you can join the #netmiko channel.
199
200 <br />
201
202 ## Sponsors 2025
203
204 Special thanks to organizations and people that have helped support Netmiko development. In particular, these organizations have made meaningful contributions that help Netmiko keep moving forward:
205
206 <a href="https://slurpit.io/"><img src="https://github.com/ktbyers/netmiko/blob/develop/images/slurpit.png" width="200" alt="Slurp'it Logo"></a>
207 <a href="https://netpicker.io/"><img src="https://github.com/ktbyers/netmiko/blob/develop/images/netpicker.png" width="200" alt="Netpicker Logo"></a>
208
209 <br />
210 <br />
211
212 ##
213 Kirk Byers <br />
214 Python for Network Engineers <br />
215 https://pynet.twb-tech.com <br />
216 <br />
217