getmac is a pure-Python package to get the MAC addresses of network interfaces and hosts on the local network.
It provides a platform-independent interface to get the MAC addresses of:
System network interfaces (by interface name)
Remote hosts on the local network (by IPv4/IPv6 address or hostname)
It provides a Python function, get_mac_address(), and a command-line interface, getmac.