Subnet
The Subnet is a python library that can subnet an IP address for different networks. A user can set the static or dynamic mode for subnetting. Currently, this library only supports IPv4 addresses.
Installation
Use the package manager pip to install the subnet.
pip install subnet
Usage
import subnet as sb
IP = "192.168.1.12/24"
To subnet this data for 3 networks (1,2,3) which have 10,3 and 0 hosts then the data variable would be in the following form.
data = {1:10,2:3,3:0}
This library automatically assigns the IP address for the network and broadcast even if the host's value is 0.
Static Subnetting
a = sb.Subnet(IP,data,static=True)
a.summary()
Dynamic Subnetting
a = sb.Subnet(IP,data)
a.summary()
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Release files for subnet 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| subnet-0.0.2.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| subnet-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / subnet-0.0.2.tar.gz
| Download URL | subnet-0.0.2.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01cd622a3a703f11b9b63621df7fa3ae2c0be069f4a2d2dd4d6c142c1ef76e49
|
|
BLAKE2b-256 checksum How to use checksums |
c3031bca6b488f193f982e5079a75a0bd61db14153006f6ea70a15f0f88f125e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5
|
Release files / subnet-0.0.2-py3-none-any.whl
| Download URL | subnet-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c240c6a7b527981931220aca42a44c81ace95513ff0e77cadf7a5789fd449fbc
|
|
BLAKE2b-256 checksum How to use checksums |
ba73b3dead83d804503ff751447e3df2a23fb76863bb25d5f1cbc36af89ecd66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5
|