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 details)
Built Distribution
File details
Details for the file spanning-cidr-0.1.4.tar.gz
.
File metadata
- Download URL: spanning-cidr-0.1.4.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.7.5 Darwin/19.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97cb809c6a5ee6cd457b31dc23897169932c64ac6c3bdee023f0c14a94f91ce3 |
|
MD5 | ba12b158d55a1c58ffeb1c456fcecd14 |
|
BLAKE2b-256 | bf551b8ab0d4ef2d06a804e22dbb57decf72cd7558dfd0f40a552a86fb4e2474 |
File details
Details for the file spanning_cidr-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: spanning_cidr-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.7.5 Darwin/19.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf00281398b7eda061dc315c13c28f9b691400700c198cccab6142353e62f2e8 |
|
MD5 | 5cda0dd1924cc00b8154043c42fb07a9 |
|
BLAKE2b-256 | d4efdeac35ad5202f1d5ffcd683039fa61c4b7d72db8bd5c1071e0c0d38cf4fd |