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 hashes)

Uploaded Source

Built Distribution

subnetinfo-1.1-py3-none-any.whl (7.1 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