From the course: Python Theory for Network Engineers

History and use cases

- Before we dive deeper into the weeds of Python I think it would be useful to discuss Python's history and use cases. Python is a mature, stable, open source language that has been around for 31 years. It was created by Guido van Rossum back in late 1980s and released the point nine version of the language in 1991. Python is sometimes referred to as a high level programming language which means unlike some of the other languages it takes care of the low level tasks like managing memories or collect unused garbages. Don't worry about it if it means nothing to you at this time. Just keep in mind that Python tries to save you from some of these boring tasks to allow you to focus on solving the problem at hand. Every programming languages has its own philosophy and characteristics. For Python it is with its focus on readability, simplicity, and extensibility, we'll exceed examples of these characteristics later on in this course. You may have heard of the migration of Python from version two to version three. This migration has been a long process that took over 10 years. It was a very painful process for many, but lucky for us the migration has been completed. I only mentioned it here because you might come across Python two here and there but for the purpose of learning and for this course we'll definitely use Python three. Python is one of the most popular languages in the world today. How popular? How about number one programming language ranked by both Tiobe and GitHub. As mentioned, it is also the language used in many of the universities in their introductions to computer science course, including MIT and Harvard. Before you say, Eric we don't pick a programming language just because it's popular. Hold that thought for just a little bit. Why is this important? Because a language being used by many many people means more features are being developed. More bugs are, could be discovered and fixed faster and the issues you have come across are likely already being asked and answered and likely be solved by the online community already, as an American junior trying to learn Python many years ago, and I'm still learning I can't stress how valuable this was. Using a language with a large community support really made a difference for me, and I'm sure it'll be helpful for you as well. Python has many, many use cases. Of course, we're here because it is an awesome language to be used for network automation and programmability but besides network automation, it is also widely used in areas such as web development, data science, scientific computing, software testing, and many, many more. It is important because the same concept and usage we'll learn in this course will provide you with the opportunity to expand into these other awesome areas if you so choose to. If you're interested in learning more about different Python use cases, I would highly recommend my friend Michael Kennedy's podcast, Talk Python to Me. It's just covers really a lot of depth and width of the language and the ecosystem, the personalities. On the show, he even had guests talk about how Python is involved in Formula One racing. How cool is that? Of course, we are here for network automation programmability so let's dive a little deeper into the use of Python in network automation. The first thing we could think of when it comes to Python network automation is used for device management. This includes configuring the device, monitoring network health, maintaining security, conforming to internal external standards and so on. We have many useful libraries in Python that could be used to interact with the network devices and Python Library is simply Python code written by somebody that asks tools and functionalities to the core Python. There are more than a hundred thousand packages available through the Python package manager. Some of the more popular networking libraries include Netmiko, NAPALM, Nornir, Scrapli and so on. A framework takes the concept of the library one step further to package even more tools and functionality into a single place. Some of the more popular network automation framework includes Ansible and Salt. We can also use Python to test our code and test our network and test our network state or device themselves. Some of the more popular tools include PyATS from SISCO originally and open source tools such as BatFish and Suzieq. Last but not least, Python is a great tool to help us connect different parts together. Whether it is interacting with the website, integrating with business tools such as Salesforce, interpreting Excel data, visualize them, Python could be a very good Swiss Army knife for all kinds of tasks. I hope you're excited, as excited as I am to begin this journey of learning Python theories for network engineers. So let's get started.

Contents