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
  4. 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).
README.md

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