Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
IPy are a Python class and tools for handling of IPv4 and IPv6 addresses and networks. It is similar to 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.', '22.214.171.124.in-addr.arpa.', '126.96.36.199.in-addr.arpa.', '188.8.131.52.in-addr.arpa.'] >>> ip.reverseName() '0-184.108.40.206.in-addr.arpa.' >>> ip.iptype() 'PRIVATE'
Get full documentation in source code: README.
This Python module is under BSD license: see COPYING file.
- Download IPy-0.76.tar.gz
- Download last version on CheeseShop
- Linux users:
- Debian: IPy .deb package
- Mandriva: IPy .rpm package
- Gentoo: IPy portage
- Ubuntu: Edgy package, Feisty package
- Fedora: yum install python-IPy
For the development version of IPy, see the git repository.
IPy's maintainer is Jeff Ferland.
- 2013-03-19: Release of IPy 0.76
- 2011-04-12: Release of IPy 0.75
- 2011-02-16: Release of IPy 0.74
- 2011-02-15: Release of IPy 0.73
- 2010-11-23: Release of IPy 0.72
- 2010-10-01: Release of IPy 0.71
- 2009-10-29: Release of IPy 0.70
- 2009-08-19: Release of IPy 0.64
- 2009-06-23: Release of IPy 0.63
- 2008-07-15: Release of IPy 0.62