--- id: netifaces version: "0.11.0" license: MIT License license_treatment: permissive maintenance: abandoned --- # netifaces — Portable network interface information. License: permissive · Maintenance: abandoned · Downloads: 2.7M/mo ## What it is and what it does netifaces is a Python library that abstracts away the platform-specific complexity of querying network interface information. Instead of writing different code for Linux, macOS, Windows, and other systems, you import netifaces and call simple functions to enumerate interfaces, retrieve their addresses (IPv4, IPv6, MAC), and discover gateway configuration. It returns results as dictionaries keyed by address family, allowing you to handle multiple addresses per interface and different address types uniformly. The package solves the portability problem by wrapping low-level system APIs into a single consistent interface. You can list all interfaces, query addresses for a specific interface by family, retrieve hardware addresses, and access default or non-default gateways—all without worrying about whether you're running on POSIX or Windows. Use it for: - Enumerate all network interfaces and their IP addresses to discover local network configuration in a cross-platform tool. - Retrieve MAC addresses for network interfaces to identify hardware or implement network-based licensing. - Query default gateway information to route traffic or configure network policies programmatically. - Build network monitoring or diagnostics utilities that need to work on Linux, macOS, and Windows without platform-specific code. - Detect IPv6 addresses alongside IPv4 to support dual-stack network applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides portable access to network interface information (addresses, gateways, hardware details) across Linux, macOS, Windows, and other Unix-like systems from Python. No—not recommended for new projects. The package is abandoned (last release 2021-05-31, repository archived, maintainer explicitly unable to continue). While it works and has no known vulnerabilities, there is no active maintenance, no response to issues or pull requests, and no guarantee of compatibility with future Python or OS versions. ## Install pip install netifaces uv add netifaces poetry add netifaces ## Installing netifaces Before you install: Medium install friction due to C extension compilation required on installation. Package is abandoned as of 2021-05-31 with no active maintenance; the original maintainer explicitly stated they can no longer maintain it. Repository is archived. License in practice: MIT License (permissive) allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention. Quickstart: import netifaces # List all network interfaces interfaces = netifaces.interfaces() # Get addresses for a specific interface addrs = netifaces.ifaddresses('lo0') ipv4_addrs = addrs[netifaces.AF_INET] # Get gateway information gateways = netifaces.gateways() default_gw = gateways['default'][netifaces.AF_INET] Requires C compiler and platform development tools to build the extension during installation (tar/setup.py or pip will compile from source on most systems). Verify before relying: - Whether the package works reliably on modern Python versions despite being abandoned since 2021 - Whether pre-built wheels for recent Python versions are available or if compilation is always required - Known compatibility issues or regressions on current operating systems ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: medium - Maintenance: abandoned - Downloads: 2.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags network interface addresses python, get mac address python, network gateway information, portable network info, interface enumeration cross-platform, network configuration python, ifaddresses ipv4 ipv6, abandoned, cross-platform, network-info [View on SkillFed](https://skillfed.io/packages/netifaces) · [View on PyPI](https://pypi.org/project/netifaces/)