{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/6"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/12"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/6"},{"label":"Networking","url":"https://skillfed.io/packages/category/system-networking"},{"label":"Systems Administration","url":"https://skillfed.io/packages/category/system-systems-administration"}],"enrichment":{"capability":"Retrieves MAC addresses of local network interfaces and remote hosts on the LAN via a single pure-Python function, with no compiled dependencies.","skillfed_tags":["network-diagnostics","mac-address","cross-platform"],"use_cases":["Identify which physical network interface a service is bound to by retrieving its MAC address for logging or diagnostics.","Resolve a remote host's MAC address on the LAN for network inventory, device discovery, or ARP spoofing detection.","Build a cross-platform network diagnostic tool that needs MAC addresses without adding C-extension dependencies.","Populate a local device database by querying MAC addresses of known hosts on a corporate network.","Implement network-based device authentication or access control that keys off MAC addresses."],"what_it_does":"getmac is a pure-Python library that retrieves MAC (Media Access Control) addresses from local network interfaces and remote hosts on the same LAN. It provides a single function, `get_mac_address()`, that accepts either an interface name, IPv4/IPv6 address, or hostname and returns the corresponding MAC address. The package works across Windows, macOS, Linux, BSD, and other POSIX systems without requiring compiled C extensions.\n\nThe library handles remote host lookups by querying the system's ARP (Address Resolution Protocol) or NDP (Neighbor Discovery Protocol) table. For hosts not yet in the table, it can optionally send a UDP packet to populate the table first. It also offers a command-line tool for one-off lookups and supports Python 2.7 and 3.4 through 3.11, making it suitable for legacy and modern codebases alike.","worth_installing":"Yes. getmac is lightweight, dependency-free, actively maintained, and covers a genuine need for cross-platform MAC address lookup without C extensions. It is well-suited for network diagnostics, device discovery, and inventory tasks. The trade-off is that it relies on ARP/NDP tables and may be slower than C-based alternatives like psutil for high-volume queries, but for typical use cases the simplicity and portability outweigh that cost."},"id":"getmac","links":{"html":"https://skillfed.io/packages/getmac","md":"https://skillfed.io/packages/getmac.md","pypi":"https://pypi.org/project/getmac/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-07-16","license_spdx":null,"license_treatment":"permissive","name":"getmac","python_support":"supports_current","summary":"Get MAC addresses of remote hosts and local interfaces"},"popularity":{"monthly_downloads":385828,"position":7059,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.9.5"}
