Skip to main content

Get information about chosen subnet

Project description

subnet-info

Table of contents

General info

With this app, you can get information about chosen subnet.

Technologies

  • Python 3.6+

Setup

First install subnet_info module from pypi

pip install subnetinfo

Now you can create instance of main 'SubnetInfo' class to get important for you information.

from subnet_info import SubnetInfo

_subnet = SubnetInfo()
print(_subnet.calculate_cidr(subnet_mask="255.255.255.0")) # returns 24

Available methods

  • get_local_ip (get your local ip address)
  • get_public_ip (get your public ip address)
  • get_subnet_mask (get your subnet netmask)
  • calculate_cidr (calculate cidr based on provided subnet mask)
  • calculate_hosts_amount (calculate how many hosts can be in subnet)
  • get_first_ip_address (get first ip address in chosen subnet)
  • get_last_ip_address (get last ip address in chosen subnet)
  • generate_all_ip_addr (generate all ip addresses in chosen subnet)

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

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

Source Distribution

subnetinfo-1.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

subnetinfo-1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file subnetinfo-1.1.tar.gz.

File metadata

  • Download URL: subnetinfo-1.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for subnetinfo-1.1.tar.gz
Algorithm Hash digest
SHA256 2c56a0bc49a755abccb4c10345957d29236e1ca0016200ccf72d32cf13900e41
MD5 cec5143c5e9a42d9772e38ff9383a486
BLAKE2b-256 93dfad506d14dd22087a600d0ae065d6d9c5c532b3870083f92353c5eb247160

See more details on using hashes here.

File details

Details for the file subnetinfo-1.1-py3-none-any.whl.

File metadata

  • Download URL: subnetinfo-1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for subnetinfo-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 146e742190c9ea334f388e5872e65bc6986cfaae352e9ced85b8324a818ec6a1
MD5 977089316d121e6113e83c79f8751261
BLAKE2b-256 2acdd34e4b8d4525838f58d331ea919c04274f0e695aae84021dafc85d829ac1

See more details on using hashes here.

Supported by

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