Skip to main content

Function that accepts a sequence of IP addresses returning a single subnet that is large enough to span the lower and upper bound IP addresses with a possible overlap on either end.

Project description

Spanning Cidr

Function that accepts a sequence of IP addresses returning a single subnet that is large enough to span the lower and upper bound IP addresses with a possible overlap on either end.

Installation

Run pip install spanning-cidr

How To Use

from spanning_cidr import spanning_cidr

spanning_cidr(['192.168.1.1','192.168.1.2', '192.168.1.3', '192.168.1.4'])
>> '192.168.1.0/29'

spanning_cidr(['192.168.2.10', '192.168.1.10'])
>> '192.168.0.0/22'

Project details


Download files

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

Source Distribution

spanning-cidr-0.1.4.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

spanning_cidr-0.1.4-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page