Introduction
Modern-day applications frequently need to interact with users or other software through networks. The more our society moves toward a connected world, the more users will expect software to be able to interact with remote services or across networks.
Networking-based applications rely on decades of stable and widely-tested tools and paradigms, and the Python standard library provides support for the most common technologies, from transport to application protocols.
Apart from providing support for the communication channels themselves, such as sockets, the standard library also provides the models to implement event-based applications that are typical of networking use cases as in most cases, the application will have to react to an input coming from the network and handle it accordingly.
In this chapter, we will see how to handle some of the most common application protocols, such as SMTP, IMAP, and FTP. But we will also see how to handle networking directly through sockets and...