top of page

Network Automation with Python

Automate Your Network Configuration, Management, and Operation Tasks with Python


  • Get familiar with the basics of network automation.

  • Understand how to automate various network devices like Routers, Switches, Servers, and Firewalls.

  • Learn how to create customized scripts to manage multiple devices using Python.

Network Automation Python Book Cover.jpg


Python is the de-facto standard for automated network operations nowadays. With the power of Python, network devices can be automated easily with basic scripts. Written in direct and intuitive language, this practical guide will help you to automate your network with Python.

In this book, you will understand what network automation is precisely. The book will help you get familiar with the basics of the Python language. It will also help you learn how to monitor, maintain, and deploy configurations in network and system devices such as routers, switches, servers, and storage. The book will explain how to automate cloud infrastructures like AWS (Amazon Web Services) with Python.


By the end of the book, you will be able to decrease your routine workload and improve productivity by automating your networking tasks.



  • Get familiar and work with Python libraries like Paramiko and Netmiko.

  • Write and deploy scripts to configure network devices such as Firewalls, Routers, and Switches.

  • Understand how to use Python scripts for network security.

  • Learn how to combine all micro scripts in the main Python script.

  • Create, configure, operate, and maintain AWS services through Python scripts using Boto3.



This book is specially designed for system administrators, infrastructure automation engineers, IT engineers, and network engineers to leverage Python’s potential as an automation tool to centrally manage routers, servers, and cloud infrastructures in an organizational network and beyond.

  • Python Programming Language
    Python - Introduction Python – Course Plan Course – Tasks, Quiz and Scripts What is Network Automation? Do We Really Need Network Automation? What is Python? Python Usage Area Pycharm IDE Python - Installation Python3 and Pycharm installation for Windows Python3 and Pycharm installation for Linux Python 2 vs Python 3 (Difference, usage, modules, print(), print ) Python - Print and Input Functions Print Function Print Function Usage Input Function Python - Data Types Python Data Types Quiz – Data Types String & Integer String Methods Quiz String List List Methods Quiz List Dictionary Quiz Dictionary Assignment 1: Arithmetic operators Assignment 2: Convert Fahrenheit to Celsius Python - Statements and Conditions If Statement For Loop Statement While Statement Break Statement Continue Statement Range Function For Else Statement Nested Loops Try Except Statement Assignment 3: Exam Score Check Assignment 4: String Filtering Python - File Handling Module Installation File Handling Word Files Excel Files JSON Files Python - RE Module RE Module – Findall and Search Methods RE Module – Split and Sub Methods RE Module – Special Sequences RE Module – Sets Assignment 5: Find All Small Letters Assignment 6: Read JSON file and return a value in Python list? Assignment 7: Find digits and return sum of all digits Assignment 8: Find Phone Numbers Python - Functions and Classes Functions and Classes Functions – Call Variables Function in Another Function Create a Module OOP (Object Oriented Programming)
  • Python - Networking
    Python - Networking Introduction Python Networking Introduction Lab Environment Python - SSH Connection Networking Modules Paramiko Module Introduction Paramiko Module Paramiko Connect 1 Device Paramiko Connect to Multiple Devices Netmiko Module Introduction Netmiko Module Connect 1 Device Netmiko Connect to Multiple Devices Python - Telnet Connection Telnetlib Module Telnetlib Multiple Device Connection Netmiko Telnet Connection Python - File Transfer SCP File Transfer Paramiko FTP Connection Ftplib Module Paramiko SFTP
  • Python - 16 Projects
    Paramiko SSH Netmiko SSH Find Vendor Type Ping Test Interface Config Config Change Collect CPU Levels Collect Version Information Interface Info Duplicated IP Show Tech Command Backup With SSH SCP File Transfer Upload File Download File Plot CPU
  • Ansible Automation
    Ansible - Introduction Short Story of Network Automation Journey Ansible Course Plan What is Ansible? Why Ansible? Where can we use Ansible? What can we do with Ansible? Ansible - YAML Language Introduction What is YAML? YAML – Data Types Ansible - Architecture and Features Ansible Concepts Ansible Architecture Ansible Features Variables Latest Release Notes Ansible - Installation Install Ansible on Linux (Ubuntu) Install Ansible on MacOS LAB Environment – 1 LAB Environment – 2 Ansible Inventory – 1 Ansible Inventory – 2 Ansible Inventory – 3 Ansible - Ad-hoc Commands Ad-Hoc Introduction Ad-Hoc Usage – 1 Ad-Hoc Usage – 2 Ad-Hoc Usage – 3 Ad-Hoc Usage – 4 Ad-Hoc Usage – 5 Ansible - Playbooks Playbook Introduction Playbook Structure Playbook Example Create and Run a Playbook Verifying Playbooks – 1 Verifying Playbooks – 2 Validate YML File Ansible Modules Ansible Advanced Topics Ansible Module – Website Check Configuring Inventory File Ad-Hoc Usage File Handling – Copy Module File Handling – File Module Install Packages – Apt Module Start & Stop Services – Service Module Run Commands – Shell Module Create Users – User Module Playbook Command Options Playbook Keywords Writing a Playbook Playbooks – Install Packages Playbooks – Variables Playbooks – Loops Playbooks – Lists Playbooks – Dictionary Playbooks – Debugging Playbooks – Create & Delete Users Playbooks – File Handling Playbooks – Shell Command Playbooks – Conditions Playbooks – Restart Services Playbooks – Execute Scripts Playbooks – Modify File with Regex Playbooks – GIT Clone Playbooks – Check & Diff Mode Playbooks – Private & Prompt Keywords
  • Ansible - Projects
    Playbook Example Configuring Inventory File Project-1: Collect logs with Raw Module Ios Command Module Project-2: Run Show Commands Project-3: Save Logs to Files Ios Config Module Project-4: Send Config Commands Project-5: Configuration with Loop Project-6: Backup Configuration Project-7: Run Commands from File Project-8: Save Configuration More Cisco Modules Juniper Playbooks (8 Projects) Huawei Playbooks (5 Projects)
bottom of page