Should Network Engineers Learn Python?

A question I get asked all the time is “Should network engineers learn Python?”
The short answer is yes, but as with all things IT it depends!
Here are a few quick reasons why I think you should learn Python for Network Automation.
The networking community has chosen Python as the language of choice to use for Network Progammability.
If you want to get started now check out more information on Python for Network Engineers
Cisco is on board
Cisco is really pushing Python as the language to use if you want to program network devices.
The Devnet programme is heavily promoting Python.
Python allows you to build scripts to automate network configurations. It is the most widely used programming language for networking today, and is an essential skill for network engineers to learn in 2021.
Check out this post from Cisco
https://blogs.cisco.com/developer/why-is-cisco-teaching-me-python
In this post Cisco actually states:
“Understanding Python is critical to your success as a network engineer, and Cisco wants to help network engineers be successful. “
Do I need to say more.
But what if you don’t want to learn Python?
Well as with all things in IT it depends. If you are a network admin and are happy in your job and enjoy configuring VLAN’s every day and dealing with routine tasks, nobody is going to hold your arm behind your back and say you need to learn Python. You could probably continue in your job for many years and not open a Python book.
However it is a valuable skill to learn and if you want to progress in your career and increase your pay, having some Python skills will be very beneficial to network engineers.
The world of network engineering is changing and it is rapidly adopting network automation. You are being asked to do more with less time and there simply aren’t enough hours in the day to get your job done.
You need to find a way to complete all the routine tasks quickly and efficiently giving you more time to focus on the more exciting tasks.
Whilst there are many network automation tools out there, a good understanding of Python will not be a wasted effort.
Even if you decide to change career, Python is one of the most popular languages in use right now and you could go on to be a software developer!

Why should network engineers should learn Python?
- It is easy to learn and read.
- It is perfect for scripting tasks which is perfect for network automation.
- Network vendors, especially Cisco have adopted Python as the language of choice.
- Lots of network automation tools are written in Python.
- Cisco already embed a Python shell in many switches.
- Networks are getting bigger but IT teams are not, we need to find better ways to do more with less.
- Stand out from the crowd and improve your career prospects.
- Python also has a great community, as one of the most popular programming languages in use today, it is very easy to find a solution to your problems.
- Python is already installed on Linux & MacOS and is now available on a lot of Cisco Switches.
API’s
Every piece of networking equipment is now shipping with an API (Application Programming Interface)
This means you can configure that device with a few lines of code.
Right now the best code to configure that device via it’s API is Python.
Do network engineers need Python?
If you are working in a small company with a few network devices and you have no desire to become a programmer or learn network automation, then keep doing what you are doing.
If you want to embrace the new world of network automation and want to grow in your career, and the thought of writing some code that will upgrade the IOS on all your switches in one evening whilst you drink coffee really appeals to you then Python and the workd of network automation is for you.
With all this said, network engineers don’t have to learn Python, you could learn C++, Java, Perl or Golang. But my personal opinion is that Python is a critical skill for new network engineers and they should definitely learn it!
As of now in 2022 Python is the most popular language in use by network engineers.
One final note to add is that a lot of Network Engineers fear that automation and Python will see them out of a job. That if they write a load of scripts to do all their work their boss won’t need them anymore.
That is far from the truth and the world of network engineering is not getting any easier. Anything you can do to free you up from performing routine tasks every day and giving you more time to optimise the network and focus on projects is a win in my book.
Learn some Python, you will thank me one day!
Courses
If you want to learn more about this exciting new world, then check out my courses.
I have a course on Ansible which is a network automation tool that is written in Python but does not require any Python knowledge to operate it.

Also, becoming very popular is my Nornir course.
Nornir is a Python automation framework and does require some Python knowledge to operate it, but the benefits far outweigh the time needed to learn what you need.
Other Python related posts
If you just want to get started check out my Useful Python scripts for Network Engineers
Frequently Asked Questions
Should Network Engineers Learn Programming?
Not all network engineers need to learn programming. But in 2022 it is fast becoming a valuable skill to have. Certain jobs might never need any programming experience, but more and more network engineer roles today require strong Python.
What is best Python or CCNA?
The right answer is to learn both. CCNA will give you knowledge in basic networking concepts whilst Python gives you skills to operate a network with programming. You can’t do one without the other. So my advice is to learn both.
How do I learn Python programming?
Once you have mastered the basics and watched a few tutorials, the best way to learn Python is to just start coding, find a simple task that you want to automate or make easier and try and do it with Python.
Do Network Engineers Code?
Some would argue that configuring a Cisco router is kind of like coding, however a core skillset for network engineers in 2021 is being able to code. Writing small Python scripts, running Anisble playbooks, configuring and API call and doing full scale infrastructure as code with Git. The answer to this question is a lot do!
Leave a Reply