From the perspective of a network engineer who has just started out on their journey to learn python and network automation, one of the first intimidating concepts that they are likely to come across is the list comprehensions. In this post we will try and cover the basics of python list comprehensions If you have…
Category: Python 🐍 Tips and Tricks
What is YAML For Network Engineers
YAML Ain’t Markup Language. From official documentation, YAML is a data serialization standard for all programming languages. Let’s break it down to understand what does MarkUp and data serialization standard really means and the relevance of YAML for network engineers. Q1:- What is a Markup Language? Ans:- A Markup Language is not really a language…
[Practical] Multithreading vs Multiprocessing vs Asynchronous
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…
[Theory] Multithreading vs Multiprocessing vs AsyncIO
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…
How to read write excel using python openpyxl
In the previous articles, we have seen how to leverage pandas and csv modules for reading and writing csv and excel files. This post will talk about how to read write excel using python openpyxl. Although pandas is a much more robust package to deal with excel files or tabular data, it has its own…
Data Analysis with Python For Network Engineers.
Excel is one of the primary data sources that we network engineers have to deal with. While you will find a lot of people with very proficient skills with excel when it comes to manipulating data and making sense of it but now there is a need to be able to programmatically access the data…
How to read write csv with python for Network Automation Part 3
We have covered how to use csv modules in the previous two posts. In this post, we will try to make the job easier using the python pandas library to read write csv with python for Network Automation. In my opinion, pandas is the one-stop-shop for all needs when you are dealing with tabular data…
How to Automate Network Devices using Python Netmiko Part 2
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…
How to read write Excel with python for Network Automation Part 2
We have already seen how to work with and manipulate CSV files with python for network automation. This post is going to talk about ways you can manipulate excel for network automation using python. Please read How to read write Excel with python for Network Automation Part 1 From one of the previous posts, we…
How to read write Excel with python for Network Automation Part 1
We have already seen how to work with and manipulate CSV files with python for network automation. This post is going to talk about ways you can manipulate excel for network automation using python. There are a lot of modules available that can interact with excel programmatically using python. To name a few:- xlrd –…