Chapter 1, Network Programming with Python, provides a review of basic network elements and principles. It discusses how Python supports network programming and gives an overview of key libraries. It also provides an introduction to Wireshark as a protocol exploration and network programming diagnostic tool. Furthermore, we will review how we can interact with Wireshark from Python with the pyshark module.
Chapter 2, Programming for the Web with HTTP, covers the HTTP protocol and the main Python modules, such as the urllib standard library and the requests package for connecting with the REST API. It also covers HTTP authentication mechanisms and how we can manage them by means of the requests module.
Chapter 3, Application Programming Interface in Action, covers how to use Python to extract data from the major data formats found on the web: HTML, XML, and JSON. An example of interacting with REST APIs, such as Twitter and Amazon S3, will be used to guide the reader through the essentials of working with XML and JSON.
Chapter 4, Web Scraping with BeautifulSoup and Scrapy, covers how to extract the content of a web page by automating the information extraction process using scraping techniques to recover data from the web automatically. This chapter also covers some of the most powerful tools we can find in Python 3.7, with a focus on BeautifulSoup and Scrapy.
Chapter 5, Engaging with Email, explores the Python modules that facilitate communication with email servers using SMTP, POP3, and IMAP protocols. Practical code examples in Python 3.7 will illustrate the majority of concepts.
Chapter 6, Interacting with Remote Systems, explains the different modules that allow us to interact with FTP, SSH, SNMP, and LDAP servers. You will learn about several network protocols and Python libraries that are used for interacting with remote systems through the Python modules, including ftplib, paramiko, pysnmp, and python-ldap.
Chapter 7, Working with IP and DNS, explores how to work with IPs, DNS networking, and geolocation in Python. You will learn about acquiring information for DNS servers using the DNSPython module and extracting information relating to geolocation IP addresses.
Chapter 8, Implementing IPv6 and Address Manipulation, explains how to work with IPv6 and address manipulation with Python. You will learn by means of practical tasks, such as determining the IP address of your own computer and looking up other computers in the local network.
Chapter 9, Performing Network Automation with Python and Ansible, covers the principles of Ansible and how we can interact with Python. We will review how to write a Python script with a view to executing a networking automation task with Ansible and how to write an Ansible module with Python.
Chapter 10, Programming with Sockets, introduces the basics of sockets and the principles of UDP and TCP through examples involving the socket module with the IPv4 and IPv6 protocols. We will also cover non-blocking and asynchronous programming and HTTPS and TLS for secure data transport.
Chapter 11, Designing Servers and Asynchronous Programming, covers the principles of socket-based server design and how to build small servers based on multiprocessing approaches. We review asyncio and aiohttp for asynchronous operations and other solutions, such as Tornado, Twisted, and Celery, for building asynchronous network applications.
Chapter 12, Designing Applications on the Web, introduces the Django and Flask micro frameworks, which are designed to facilitate the development of web applications under the Model View Controller (MVC) pattern. Finally, we review how to work with HTTP requests in Flask and interact with databases through SQLAlchemy.