ipcalc 0.3
IP subnet calculator
Latest Version: 0.5
About
This module allows you to perform IP subnet calculations, there is support for both IPv4 and IPv6 CIDR notation.
Example Usage
>>> import ipcalc
>>> for x in ipcalc.Network('172.16.42.0/30'):
... print str(x)
...
172.16.42.0
172.16.42.1
172.16.42.2
172.16.42.3
>>> subnet = ipcalc.Network('2001:beef:babe::/48')
>>> print str(subnet.network())
2001:beef:babe:0000:0000:0000:0000:0000
>>> print str(subnet.netmask())
ffff:ffff:ffff:0000:0000:0000:0000:0000
>>> '192.168.42.23' in Network('192.168.42.0/24')
True
>>> long(IP('fe80::213:ceff:fee8:c937'))
338288524927261089654168587652869703991L
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| ipcalc-0.3.tar.gz (md5) | Source | 2009-03-23 | 4KB | 2757 | |
- Author: Wijnand Modderman
- Home Page: http://code.maze.io/hg/projects/ipcalc/
- Keywords: ipcalc network subnet ipv4 ipv6 cidr
- License: MIT
-
Categories
- Development Status :: 5 - Production/Stable
- Intended Audience :: Developers
- Intended Audience :: System Administrators
- Intended Audience :: Telecommunications Industry
- License :: OSI Approved :: MIT License
- Programming Language :: Python
- Topic :: Communications
- Topic :: Internet
- Topic :: Software Development :: Libraries :: Python Modules
- Topic :: System :: Networking
- Package Index Owner: tehmaze
- DOAP record: ipcalc-0.3.xml
