This module allows you to perform IP subnet calculations, there is support for both IPv4 and IPv6 CIDR notation.
>>>importipcalc>>>forxinipcalc.Network('172.16.42.0/30'):
... printstr(x)
...
172.16.42.0172.16.42.1172.16.42.2172.16.42.3>>>subnet=ipcalc.Network('2001:beef:babe::/48')
>>>printstr(subnet.network())
2001:beef:babe:0000:0000:0000:0000:0000>>>printstr(subnet.netmask())
ffff:ffff:ffff:0000:0000:0000:0000:0000>>>'192.168.42.23'inNetwork('192.168.42.0/24')
True>>>long(IP('fe80::213:ceff:fee8:c937'))
338288524927261089654168587652869703991LYou can issue a ticket in GitHub: https://github.com/tehmaze/ipcalc/issues