Skip to main content

Get Network Interface details

Project description

get-nic

Get Network Interface details such as list of interfaces, ipaddress, mac addrress, status of nic, etc. Currently working for Linux.

Get Started

Pip install get_nic:

pip3 install get_nic

import

import module:

   from get_nic import getnic

To get list of intefaces

Get list of network interfaces::

  getnic.interfaces()

Output ["eth0", "wlo1"]

To get all interface details

From the interface list get details of all the interfaces::

interfaces = getnic.interfaces()
getnic.ipaddr(interfaces)

To get selected interface details, example lo, eth0

Pass interface names in a list::

interface_list = ['lo','etho']
getnic.ipaddr(interface_list)

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

get_nic-0.0.3.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

get_nic-0.0.3-py3-none-any.whl (3.4 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