--- id: ifaddr version: "0.2.0" license: MIT license_treatment: permissive maintenance: active --- # ifaddr — Cross-platform network interface and IP address enumeration library License: permissive · Maintenance: active · Downloads: 6.8M/mo ## What it is and what it does ifaddr is a lightweight Python library that discovers all network interfaces and their assigned IP addresses on your system. It works cross-platform on Linux, macOS, Windows, and BSD variants without needing to compile anything—just install and import. The library returns both IPv4 and IPv6 addresses with their network prefixes, and can optionally include unconfigured interfaces with no IPs assigned. You call `get_adapters()` to retrieve a list of network adapters, then iterate through each adapter's `ips` property to access individual addresses. It provides human-readable adapter names and interface indexes, making it useful for applications that need to discover local network configuration programmatically. Use it for: - Discover all local IP addresses for binding a server to the correct interface in multi-homed systems - Build network diagnostic tools that display available adapters and their configurations - Automatically detect IPv6 addresses with scope IDs for link-local communication - Find unconfigured network interfaces for system inventory or monitoring applications - Replace netifaces for projects that cannot tolerate compilation overhead ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Enumerate network interfaces and their IP addresses across Linux, macOS, Windows, and BSD systems without requiring compilation. Yes. ifaddr is a focused, well-maintained tool for a specific task—enumerating network interfaces—with zero runtime dependencies, no compilation, and proven cross-platform support. Install it if you need to query local network configuration programmatically. The MIT license carries no restrictions. ## Install pip install ifaddr uv add ifaddr poetry add ifaddr ## Installing ifaddr Before you install: Low friction: pure Python wheel, no compilation needed. Actively maintained with recent commits; last release was 1521 days ago but repo shows ongoing activity. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: import ifaddr adapters = ifaddr.get_adapters() for adapter in adapters: print(f"{adapter.nice_name}: {[ip.ip for ip in adapter.ips]}") Verify before relying: - Whether the package handles dynamic network changes (hot-plugging interfaces) or requires re-enumeration - Performance characteristics when enumerating many network interfaces or on systems with hundreds of adapters ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 6.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags network interface enumeration, get local IP addresses, list network adapters, cross-platform network info, ethernet adapter discovery, IPv4 IPv6 addresses, network interface query, network-discovery, cross-platform, zero-deps [View on SkillFed](https://skillfed.io/packages/ifaddr) · [View on PyPI](https://pypi.org/project/ifaddr/)