python-ipaddr | Python module for working with IP addresses, both IPv4 and IPv6 | Mehr ...
This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks in Python. It is intended to be fast and lightweight. . This is a pure Python implementation of classes for IPv4/6 addresses and networks. It supports comparisons to determine if IP addresses are contained inside a defined network, conversion of lists of IP addresses into compact CIDR lists, and other IP address manipulation