Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tehmaze/ipcalc
Python IP Calculator
https://github.com/tehmaze/ipcalc
Last synced: about 2 months ago
JSON representation
Python IP Calculator
- Host: GitHub
- URL: https://github.com/tehmaze/ipcalc
- Owner: tehmaze
- License: bsd-2-clause
- Created: 2011-11-09T15:51:59.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2024-06-29T19:13:42.000Z (3 months ago)
- Last Synced: 2024-07-04T20:54:46.886Z (3 months ago)
- Language: Python
- Homepage: http://pypi.python.org/pypi/ipcalc
- Size: 182 KB
- Stars: 172
- Watchers: 20
- Forks: 88
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
About
=====This module allows you to perform IP subnet calculations, there is support for
both IPv4 and IPv6 CIDR notation.Example Usage
=============```python
>>> import ipcalc
>>> for x in ipcalc.Network('172.16.42.0/30'):
... print str(x)
...
172.16.42.1
172.16.42.2
>>> 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
>>> int(IP('fe80::213:ceff:fee8:c937'))
338288524927261089654168587652869703991
```Bugs/Features
=============You can issue a ticket in GitHub: https://github.com/tehmaze/ipcalc/issues
[![Build Status](https://travis-ci.org/tehmaze/ipcalc.svg?branch=master)](https://travis-ci.org/tehmaze/ipcalc)
[![Code Health](https://landscape.io/github/tehmaze/ipcalc/master/landscape.svg)](https://landscape.io/github/tehmaze/ipcalc/master)