Book Image

Python Network Programming

By : Abhishek Ratan, Eric Chou, Pradeeban Kathiravelu, Dr. M. O. Faruque Sarker
Book Image

Python Network Programming

By: Abhishek Ratan, Eric Chou, Pradeeban Kathiravelu, Dr. M. O. Faruque Sarker

Overview of this book

This Learning Path highlights major aspects of Python network programming such as writing simple networking clients, creating and deploying SDN and NFV systems, and extending your network with Mininet. You’ll also learn how to automate legacy and the latest network devices. As you progress through the chapters, you’ll use Python for DevOps and open source tools to test, secure, and analyze your network. Toward the end, you'll develop client-side applications, such as web API clients, email clients, SSH, and FTP, using socket programming. By the end of this Learning Path, you will have learned how to analyze a network's security vulnerabilities using advanced network packet capture and analysis techniques. This Learning Path includes content from the following Packt products: • Practical Network Automation by Abhishek Ratan • Mastering Python Networking by Eric Chou • Python Network Programming Cookbook, Second Edition by Pradeeban Kathiravelu, Dr. M. O. Faruque Sarker
Table of Contents (30 chapters)
Title Page
Copyright
About Packt
Contributors
Preface
Index

Python modules and packages


Because Python is the most popular open source coding language, there are many developers who contribute their expertise by creating specific modules and sharing them for others to use. These modules are a specific set of functions or instructions that are used to perform specialized tasks and can be called easily in our programs. The modules can be easily called using the import command inside the scripts. Python has many built-in modules that are directly called using import, but for specialized modules, an external installation is needed. Luckily, Python provides a very easy way to download and install these modules.

As an example, let's install a module named Netmiko that can help us work on logging into network devices more efficiently. Python provides a well-documented reference for each of the modules, and for our module, the documentation can be found at https://pypi.python.org/pypi/netmiko. For installation, all we have to do is go into the folder from...