Skip to main content

This is a library used to manipulate and verify ipv4 address's. ucast and mcast

Project description

Toolkit unit tests status

Python Script: ipaddresstools

Current version: 1.2.11


Written By: Benjamin P. Trachtenberg

Contact Information:

If you have any questions e-mail me

LinkedIn: Ben Trachtenberg

Docker Hub: Docker Hub

PyPi Page for ipaddresstools


  • Nothing Specific, I would suggest Python 3.6 and above.


  • From source " install"
  • From pip "pip install ipaddresstools"


  • Python


This is a library used to verify, and correct ipv4 address's, and subnets. I wrote it before a good library was out there for network engineers.

Functions included in v1.0.0

  • ucast_ip_mask(ip_addr_and_mask, return_tuple=True)
  • ucast_ip(ip_addr, return_tuple=True)
  • mcast_ip_mask(ip_addr_and_mask, return_tuple=True)
  • mcast_ip(ip_addr, return_tuple=True)
  • cidr_check(cidr, return_cidr=True)
  • get_neighbor_ip(ip_addr, cidr="30")
  • whole_subnet_maker (ip_addr, cidr)

Functions Added in v1.1.0

  • number_check(check, return_number=True)

Functions Added in v1.1.1

  • subnet_range(ip_net, cidr)
  • all_subnets_possible(ip_net, cidr)

Functions Added in v1.1.2

  • all_subnets_longer_prefix(ip_net, cidr)
  • all_subnets_shorter_prefix(ip_net, cidr, include_default=False)
  • all_subnets_possible(ip_net, cidr) = AllSubnetsPossibleLongerPrefix(strIpNet,strCidr)

Functions Added in v1.2.1

  • ip_mask(ip_addr_and_mask, return_tuple=True):
  • ip(ip_addr, return_tuple=True):

Functions Added to v1.2.3

  • mask_conversion = __mask_conversion

Functions Added to v1.2.4

  • all_ip_address_in_subnet(ip_net, cidr)

Functions Added to v1.2.5

  • random_cidr_mask(lowest_mask=16)
  • random_ucast_ip()
  • random_mcast_ip()
  • random_ucast_ip_mask(lowest_mask=16)
  • random_mcast_ip_mask(lowest_mask=16)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ipaddresstools, version 1.2.11
Filename, size File type Python version Upload date Hashes
Filename, size ipaddresstools-1.2.11-py2.py3-none-any.whl (8.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size ipaddresstools-1.2.11-py3.8.egg (14.2 kB) File type Egg Python version 3.8 Upload date Hashes View
Filename, size ipaddresstools-1.2.11.tar.gz (9.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page