IP subnet calculator
Project description
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
Bugs/Features
You can issue a ticket in GitHub: https://github.com/tehmaze/ipcalc/issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ipcalc-0.4.1.tar.gz
(5.8 kB
view details)
File details
Details for the file ipcalc-0.4.1.tar.gz.
File metadata
- Download URL: ipcalc-0.4.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67502b82059564f423a8f738b97e76da9bf013de9857e1f5cf77d819c19acbf8
|
|
| MD5 |
db7c62dd3a0f79dcc27e69c4b9b3bd89
|
|
| BLAKE2b-256 |
87879e8806b03d30c93ed6e0b6ceb4b26dfe9e1d3285a3e4f79c4d369cef3230
|