Network communication is used to retrieve data needed for an algorithm running locally, to share information for distributed processing, and to manage cloud services. Python’s standard library comes complete with modules for creating network services, as well as for accessing existing services remotely.
ipaddress (page 687) module includes classes for validating, comparing, and otherwise operating on IPv4 and IPv6 network addresses.
socket (page 693) library provides direct access to the native C socket library, and can be used to communicate with any network service.
selectors (page 724) provides a high-level interface for watching multiple sockets simultaneously, and is useful for allowing network servers ...