Skip to content

This repository contains a collection of Python scripts developed to teach how to automate various network administration tasks, progressively increasing in complexity. The scripts utilize libraries such as Netmiko for SSH connections to network devices and Flask for creating a web-based interface to interact with the scripts.

Notifications You must be signed in to change notification settings

seanerama/network_python

Repository files navigation

Network Automation Scripts Collection 🌐

Overview 🌟

This repository houses a series of Python scripts designed to teach how to automate various network administration tasks, each script increases in complexity and functionality. The scripts leverage libraries like Netmiko for establishing SSH connections to network devices and Flask for rendering a user-friendly web interface.

📁 Repository Contents

🛠️ Basic Network Interaction Scripts

  1. Part 1: Initiates a simple SSH connection to a device, executes a 'show' command, and prints the result.
  2. Part 2: Builds upon Part 1 by allowing the execution of multiple 'show' commands.
  3. Part 3: Extends functionality to handle multiple devices.
  4. Part 4: Introduces reading IP addresses from a text file.
  5. Part 5: Outputs the results to a file.
  6. Part 6: Outputs the results to a CSV file.
  7. Part 7: Implements error handling for SSH connections and command executions.
  8. Part 8: Allows interactive command entering.
  9. Part 9: Refactors the script to use functions, enhancing readability and maintainability.
  10. Part 10: Introduces multithreading for concurrent processing of multiple devices.
  11. Part 11: Adds the capability to email the results to the user.

🌐 Flask Web Application

  1. Part 20: A 'Hello World' Flask app, serving as an introduction to Flask.
  2. Part 21: Enhances the Flask app to render templates and handle form submissions.
  3. Part 22: Integrates the Flask app with the network command runner, allowing users to input commands and IP addresses and receive results via the web interface.

🌐 Intro to NTC_Templates

  1. Part 30: Simple script to parse 'show vlan' command, showing how ntc templates turn text output into a dictionary
  2. Part 31: Show ip route with NTC.
  3. Part 32: Show cdp neighbors in fromated output

🌐 Intro to Request (Restful API)

  1. Part 40: Queries the ARIN Whois database to retrieve organization details for a given IP address.

🚀 Getting Started

Prerequisites

  • Python 3.x
  • Pip (Python Package Installer)

Installation

  1. Clone this repository to your local machine.
    git clone seanerama/network_python

About

This repository contains a collection of Python scripts developed to teach how to automate various network administration tasks, progressively increasing in complexity. The scripts utilize libraries such as Netmiko for SSH connections to network devices and Flask for creating a web-based interface to interact with the scripts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published