Network Programming and the suitability of Python

Python is the ideal language for network engineers to explore tools that were previously available to systems engineers and application developers

Packt
Javarevisited
4 min readJul 28, 2020

--

Network programming has always been a crucial task and an integral part of our communication. Networks in your infrastructure set the foundation for how your application can be deployed, maintained, and serviced. Python makes network programming an enjoyable experience with its well-documented and full-featured libraries ranging all the way to the stack.

To grasp the systematic transition from traditional network engineering to network development fit for the next-generation of networks, we interviewed the author of Mastering Python Networking, Third Edition, Mr Eric Chou.

This new edition is completely revised and updated to work with Python 3. In addition to new chapters on-network data analysis with ELK stack (Elasticsearch, Logstash, Kibana, and Beats) and Azure Cloud Networking, it includes updates on using newer libraries such as pyATS and Nornir, as well as Ansible 2.8. Each chapter is updated with the latest libraries and includes working examples to ensure compatibility and understanding of the concepts.

What should be the starting point for developers aiming to begin their journey in network automation? What tips would you like to share with Network engineers?

For developers aiming to start their network automation journey, I would recommend getting more in-depth knowledge of the fundamentals of network engineering. Topics such as VLAN, Spanning-Tree, IP address and subnet mask routing protocols are some of the topics that will go a long way for developers who might not have had the need to work with lower-level networks before.

For network engineers who want to get started with network automation, I think learning basic coding principles would definitely be beneficial. This can be done using a beginner-friendly language such as Python with its emphasis on readability and simple syntax.

What is the best way to incorporate network automation in your network?

The best way to incorporate network automation in a network is for the administrator to start learning about the available tools at hand and experiment with them in a safe and predictable environment. Then we can start to implement solutions that are suitable for our networks.

The DevOps and Software-Defined Networking (SDN) movement has significantly blurred the lines between network engineers, systems engineers, and developers. How much do you agree with this statement?

I completely agree. There will no longer be silos in infrastructure engineering. In the future, we will not have network engineers, systems engineers, or developers in separate tracks; instead, we will have infrastructure engineers who have a good understanding of the overall picture with special focus on networking, system administration, or code development. In fact, this is already happening in many of the larger organizations in the industry. I hope the book can help with the transition of today’s traditional network engineers into the network developers of tomorrow.

Why do you think Python is the ideal language for network engineers to explore tools and for implementing advanced network-related tasks?

Python is now the language used in the introduction to programming classes at universities around the world. It is easy to learn with a large set of libraries that can be readily used for network-related tasks. Python is also known for its beginner-friendly, inclusive culture that is not intimidating for network engineers who might be new to programming. From my experience, in a short amount of time, network engineers can move from completely new to Python to using it to solve their everyday problems.

What is Network data analysis? How well do you think your book, Mastering Python Networking, Third Edition covers this area?

To me, network data analysis is taking data we can glean from our networks to make intelligent and actionable decisions. The book will take the reader from interacting with the network devices to using push and pull technologies (SNMP, NetFlow, sFlow, etc.) for information gathering, and use Python packages to either graph the results or implement security policies. The new third edition also includes a chapter on the ELK Stack, which is a great way to store, analyze, and visualize network data in a collection of software tools.

Here is the link to buy this bookMastering Python Networking, Third Edition

About the Author

Eric Chou is a seasoned technologist with over 20 years of experience. He has worked on some of the largest networks in the industry while working at Amazon, Azure, and other Fortune 500 companies. Eric is passionate about network automation, Python, and helping companies build better security postures.

--

--

Packt
Javarevisited

We help developers build better software | Email customercare@packtpub.com for support | Twitter support 9-5 Mon-Fri