IPy 0.75

A Python class and tools for handling of IPv4 and IPv6 addresses and networks

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in IPy 0.75:

  • IP('::/0').netmask() gives IP('::') instead of IP('0.0.0.0')
Read full changelog
send us
an update
LICENSE TYPE:
BSD License 
USER RATING:
2.3/5 20
DEVELOPED BY:
Victor Stinner
HOMEPAGE:
software.inl.fr
CATEGORY:
ROOT \ System \ Networking
IPy is a Python class and tools for handling of IPv4 and IPv6 addresses and networks. The script is similar to the Net::IP Perl module.

The IP class allows a comfortable parsing and handling for most notations in use for IPv4 and IPv6 Addresses and Networks. It was greatly inspired bei RIPE's Perl module NET::IP's interface but doesn't share the Implementation. It doesn't share non-CIDR netmasks, so funky stuff lixe a netmask 0xffffff0f can't be done here.

>>> from IPy import IP
>>> ip = IP('127.0.0.0/30')
>>> for x in ip:
... print x
...
127.0.0.0
127.0.0.1
127.0.0.2
127.0.0.3
>>> ip2 = IP('0x7f000000/30')
>>> ip == ip2
1
>>> ip.reverseNames()
['0.0.0.127.in-addr.arpa.', '1.0.0.127.in-addr.arpa.',
'2.0.0.127.in-addr.arpa.', '3.0.0.127.in-addr.arpa.']
>>> ip.reverseName()
'0-3.0.0.127.in-addr.arpa.'
>>> ip.iptype()
'PRIVATE'

Last updated on April 12th, 2011

requirements

#Python class #IPv4 handling #IPv6 handling #Python #class #IPv4 #IPv6

Add your review!

SUBMIT