https://github.com/tes3awy/netmiko-examples
Netmiko and Requests Examples for Cisco DevNet
https://github.com/tes3awy/netmiko-examples
api automation cisco-ios cisco-nxos ciscodevnet examples-netmiko examples-python netmiko openpyxl pandas pandas-python python python3 requests-python vscode xlsxwriter
Last synced: 5 months ago
JSON representation
Netmiko and Requests Examples for Cisco DevNet
- Host: GitHub
- URL: https://github.com/tes3awy/netmiko-examples
- Owner: Tes3awy
- License: mit
- Created: 2021-05-20T05:02:16.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-16T08:34:13.000Z (over 3 years ago)
- Last Synced: 2025-04-06T14:12:00.326Z (6 months ago)
- Topics: api, automation, cisco-ios, cisco-nxos, ciscodevnet, examples-netmiko, examples-python, netmiko, openpyxl, pandas, pandas-python, python, python3, requests-python, vscode, xlsxwriter
- Language: Python
- Homepage:
- Size: 188 KB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> **Last updated: March 16th, 2022**

[](https://www.python.org/downloads)


[](https://github.com/Tes3awy/Netmiko-Examples/issues)

[](https://github.com/Tes3awy/Netmiko-Examples)

[](https://github.com/Tes3awy/Netmiko-Examples/blob/main/LICENSE)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
[](https://github.com/pre-commit/pre-commit)# Netmiko & Requests Examples for Cisco DevNet
- In `netmiko` folder, you will find 18 Python examples, `device_list.csv` file, `config-sample-ex8.txt` file, a `requirements.txt` file, and an explanation of each example.
- In `requests` folder, you will find seven Python examples, a `requirements.txt` file, and an explanation of each example.
## How to use?
1. `Clone` this repo or `Download ZIP` by clicking on
up above.
_(Alternativley, you can click on Releases on the right hand side and download the latest release)_2. Once downloaded, extract the ZIP file and `cd` into `netmiko` folder or `requests` folder.
3. Open `netmiko` or `requests` folder in VSCode.
4. Open `requirements.txt` file and if any of the libraries is not installed on your PC, run the following command in the PowerShell terminal:
```powershell
path_to\folder> cd netmiko
netmiko> pip install -r requirements.txt --user ↵path_to\folder> cd requests
requests> pip install -r requirements.txt --user ↵
```> If the libraries already installed but not the same version as in `requirements.txt`, then add `--upgrade` flag to the `pip install` command:
```powershell
path_to\folder> pip install -r requirements.txt --user --upgrade ↵
```5. Explore each `example*.py` file. _**(where **\*** is the number of the example)**_
6. Run any Python example by typing the following command in PowerShell terminal _(Either integrated terminal in VSCode or standablone Windows PowerShell/CMD)_:
```powershell
path_to\folder> python example*.py ↵
```---
## Libraries Documentation Links
Examples in `netmiko` and `requests` folder uses some Python libraries. These libraries are:
1. Netmiko **v3.4.0** (Multi-vendor library to simplify Paramiko SSH connections to network devices) [Documentation Link](https://github.com/ktbyers/netmiko/blob/develop/README.md)
2. NTC Templates **v3.0.0** (TextFSM templates for parsing show commands of network devices) [Documentation Link](https://github.com/networktocode/ntc-templates)
3. XlsxWriter **v3.0.3** (XlsxWriter is a Python module for creating Excel XLSX files) [Documentation Link](https://xlsxwriter.readthedocs.io/)
4. Pandas **v1.4.1** (Data Analysis Library) [Documentation Link](https://pandas.pydata.org/docs/).
5. Openpyxl **v3.0.9** (A Python library to read/write Excel 2010 xlsx/xlsm files) [Documentation Link](https://openpyxl.readthedocs.io/en/stable/)
6. Requests **v2.27.1** (HTTP Requests) [Documentation Link](https://docs.python-requests.org/en/master/)