Skip to content

kacperstyslo/subnet-info

Repository files navigation

subnet-info

Table of contents

General info

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

Documentation

Click here to see documentation!

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)

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages