Binary package “python-netifaces” in ubuntu bionic

portable network interface information - Python 2.x

 netifaces provides a (hopefully portable-ish) way for Python programmers to
 get access to a list of the network interfaces on the local machine, and to
 obtain the addresses of those network interfaces.
 .
 This package contains the module for Python 2.x.