ipcalc  1.99.0
About: ipcalc is an IP (subnet) calculator (Python). Hint: There exists a similar Perl tool with the same name.
  Fossies Dox: ipcalc-1.99.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

ipcalc Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies ipcalc-1.99.0.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).


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(''):
    ...     print str(x)
    >>> subnet = ipcalc.Network('2001:beef:babe::/48')
    >>> print(str(subnet.network()))
    >>> print(str(subnet.netmask()))
    >>> '' in Network('')
    >>> int(IP('fe80::213:ceff:fee8:c937'))


You can issue a ticket in GitHub: https://github.com/tehmaze/ipcalc/issues

Build Status Code Health