Need help with ipcalc?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

tehmaze
142 Stars 63 Forks BSD 2-Clause "Simplified" License 120 Commits 7 Opened issues

Description

Python IP Calculator

Services available

!
?

Need anything else?

Contributors list

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.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 Code Health

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.