Skip to content

Network Automation

My journey with Network & Cloud Automation

Menu
  • Beginner
  • DevOps-NetDevOps
  • Network Automation
    • Docker
    • Python Libraries
      • NAPALM
      • Netmiko
      • Jinja2
      • Scrapli
      • Yang
  • Cloud Automation
    • Terraform
  • Python 🐍 Tips and Tricks
Menu

Category: Python Libraries

scrapli network automation

Python Scrapli AsyncIO Usage

Posted on September 4, 2021September 12, 2021 by Gurpreet Kochar

We have seen how to achieve parallel task execution in python using multi-threading as in the below-linked post. Let’s see how we can leverage Python Scrapli AsyncIO to achieve similar results. Part1 of scrapli can be found here What is AsyncIO? asyncio is a library to write concurrent code using the async/await syntax. asyncio is used as a foundation…

Read more
Multithreading vs Multiprocessing vs Asynchronous

[Practical] Multithreading vs Multiprocessing vs Asynchronous

Posted on September 2, 2021September 12, 2021 by Gurpreet Kochar

We have already seen in theory how all of the above differ and where each of them is applicable and useful. In this post, I will try to demonstrate the same concept using practical examples. I could have spun up tens of devices in GNS3/Eve-ng but I figured just using manual delays to simulate the…

Read more
asyncio

[Theory] Multithreading vs Multiprocessing vs AsyncIO

Posted on August 31, 2021September 1, 2021 by Gurpreet Kochar

I have been using a multi-threaded version of the synchronous codes that we usually see to interact with devices and for over a year now and I have a network of nearly 28k devices (routers / switches / WLCs / FWs ) that I need to manage. With that multithreaded version, I was able to…

Read more
scrapli network automation

How to use Scrapli for Network Automation

Posted on August 29, 2021September 1, 2021 by Gurpreet Kochar

Scrapli stands for scrape cli very cleverly joined together in one word. Althought he source documentation of this network devices interaction library is really wonderful and can be found here, this is my journal on my path to learning various libraries for device interactions and understand how they differ from each other and which one…

Read more
yang for network engineers

What is YANG For Network Engineers

Posted on August 25, 2021August 24, 2021 by Gurpreet Kochar

As network engineers are bombarded with more and more terms like NETCONF, RESTCONF, YANG, REST APIs every day, it’s becoming increasingly important to understand the basics of these terms if not in-depth for all network engineers. To begin this series of uncovering the meaning and relevance of these terms for network engineers, let’s start by…

Read more
textfsm for network engineers

How to Parse data with TextFSM

Posted on August 23, 2021August 21, 2021 by Gurpreet Kochar

TextFsm is available as a plugin to various device interaction libraries like Netmiko but what if we need to use TEXTFSM as a standalone python package, it is also available. Conditions where you don’t have access to the devices but have outputs from the device in a text file. We have already seen how to…

Read more

Python Jinja2 For Network Engineers

Posted on August 21, 2021August 21, 2021 by Gurpreet Kochar

Jinja2 is a templating framework that is extremely versatile and its usage is not limited to any particular field like networking or web development. In this post, we will see the power of Jinja2 for network engineers. This flow chart gives the overall concept of jinja2 Let’s take an example to make this more clear….

Read more
Python Napalm network automation

Python NAPALM For Network Automation

Posted on August 17, 2021August 10, 2021 by Gurpreet Kochar

We have seen how we can leverage python’s Netmiko module to interact with devices programmatically. In this blog post, we will see how we can achieve similar results with the NAPALM library for network automation. The main advantage of using NAPALM over netmiko is that there is a lot of stuff and heavy lifting that…

Read more
multithreading with python for network engineers

Multithreading with Python for Network Engineers

Posted on August 12, 2021August 16, 2021 by Gurpreet Kochar

Up until now, we have been establishing connections to devices sequentially, i.e If you have 10 devices from which you want to pull show version data, the script will connect to device1, extract show version, goto device2, extra show version, connect to the device and extract show version and so on until all devices are…

Read more
Netmiko TEXTFSM

How to Automate Network Devices using Python Netmiko Part 2

Posted on August 11, 2021January 30, 2022 by Gurpreet Kochar

In Part 1 of this series, we saw how to establish a connection with network devices using python netmiko and fetch command outputs. In this post, we will see how to enter into enable mode and also configure cisco devices using python netmiko programmatically. If you are new to netmiko, please read Part1 here For…

Read more
  • Previous
  • 1
  • 2
  • 3
  • Next
All Blog Posts
My Resume

Upcoming Posts

Sorry - nothing planned yet!

Recent Posts

  • How to backup configuration to TFTP Server using Ansible – Part II
  • How to backup network devices using Ansible – Part I
  • Netmiko SSH Proxy/JumpServer
  • A short note on SASE
  • Understanding Ansible

Recent Comments

  1. Jack on Multithreading with Python for Network Engineers
  2. LifeCanvas on [Theory] Multithreading vs Multiprocessing vs AsyncIO
  3. Jasper Horng on Netmiko SSH Proxy/JumpServer
  4. asdfasdf on Python API Using FASTAPI – UPDATE – PUT – PATCH – Part V
  5. Gurpreet Kochar on Python Scrapli AsyncIO Usage

Archives

  • September 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
Topic Request / Suggestion
Loading
© 2025 Network Automation | Powered by Minimalist Blog WordPress Theme
Network Automation
Proudly powered by WordPress Theme: MinimalistBlogger.
 

Loading Comments...