netifaces2
Portable network interface information
Decision gist · record as of 2026-08-14
No. The repository is archived and abandoned as of 2024-09-04 with no active maintenance. While the 0.0.22 release is stable and has no known vulnerabilities, the lack of ongoing support, known API gaps (non-functional Windows gateways, incomplete address families), and medium install friction make it unsuitable for new projects. Consider only if you are maintaining legacy code already using netifaces2 and need Python 3.6+ support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Rust toolchain (rustup) for local development builds; gateways API requires /proc/net/route or the ip tool on Linux and is non-functional on Windows.
- Medium install friction due to compiled Rust components requiring a build step.
- Repository is archived and unmaintained as of 2024-09-04, with no active development; use only if the frozen 0.0.22 release meets your needs.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) allows commercial and private use with minimal restrictions; no copyleft obligations.
last release 2024-02-28 (898 days) · last repo commit 2024-09-04 · 2 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 235,569 downloads/mo, #8,997 on PyPI
Alternatives
Verify before relying
pip install netifaces2
import netifaces
print(netifaces.interfaces())
print(netifaces.ifaddresses('en0'))
print(netifaces.default_gateway())- Whether the frozen 0.0.22 release is compatible with Python versions beyond 3.6 despite the abi3 wheels suggesting broader support.
- Whether address families and PEER addresses mentioned as incomplete in the description have been addressed in 0.0.22.
- Real-world compatibility with PyPy given the Rust implementation.
What it is and what it does
netifaces2 is a rewrite of the abandoned original netifaces library, providing a way to query network interface information (IP addresses, gateways, interface names) in Python across Linux, macOS, and Windows. It aims to be a drop-in replacement with the same API, but adds type annotations and support for current Python versions. The package wraps system calls via Rust bindings to retrieve network configuration data.
The library exposes functions like interfaces(), ifaddresses(), gateways(), and default_gateway() to enumerate network adapters and retrieve their addresses and routing information. However, the gateways API has known limitations: it requires /proc/net/route or the ip tool on Linux and is non-functional on Windows. The AF_ constants now reflect platform-native values rather than being abstracted, which may require code changes when migrating from the original netifaces.
Use it for
- Enumerate all network interfaces and their IP addresses on a system for inventory or diagnostic tools.
- Retrieve the default gateway for network routing decisions in cross-platform applications.
- Query interface-specific address information (IPv4, IPv6, MAC) for network configuration scripts.
- Build system monitoring tools that need to detect network adapter changes or status.
- Develop network-aware applications that must discover local interface details at runtime.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The repository is archived and abandoned as of 2024-09-04 with no active maintenance. While the 0.0.22 release is stable and has no known vulnerabilities, the lack of ongoing support, known API gaps (non-functional Windows gateways, incomplete address families), and medium install friction make it unsuitable for new projects. Consider only if you are maintaining legacy code already using netifaces2 and need Python 3.6+ support.
Install
netifaces2 on PyPI
Before you install
Medium install friction due to compiled Rust components requiring a build step. Repository is archived and unmaintained as of 2024-09-04, with no active development; use only if the frozen 0.0.22 release meets your needs.
Requires Rust toolchain (rustup) for local development builds; gateways API requires /proc/net/route or the ip tool on Linux and is non-functional on Windows.
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions; no copyleft obligations.
Quickstart
pip install netifaces2
import netifaces
print(netifaces.interfaces())
print(netifaces.ifaddresses('en0'))
print(netifaces.default_gateway())
Verify before relying
- Whether the frozen 0.0.22 release is compatible with Python versions beyond 3.6 despite the abi3 wheels suggesting broader support.
- Whether address families and PEER addresses mentioned as incomplete in the description have been addressed in 0.0.22.
- Real-world compatibility with PyPy given the Rust implementation.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Abandoned 898 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 235,569 / month, #8,997 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: System :: Networking |
Evidence: netifaces2-0.0.22-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; netifaces2-0.0.22-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; netifaces2-0.0.22-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl; netifaces2-0.0.22-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; netifaces2-0.0.22-cp37-abi3-macosx_10_12_x86_64.whl; netifaces2-0.0.22-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; netifaces2-0.0.22-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; netifaces2-0.0.22-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl; netifaces2-0.0.22-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; netifaces2-0.0.22-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl; netifaces2-0.0.22-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl; netifaces2-0.0.22-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; netifaces2-0.0.22-cp37-abi3-musllinux_1_1_aarch64.whl; netifaces2-0.0.22-cp37-abi3-musllinux_1_1_armv7l.whl; netifaces2-0.0.22-cp37-abi3-musllinux_1_1_i686.whl; netifaces2-0.0.22-cp37-abi3-musllinux_1_1_x86_64.whl; netifaces2-0.0.22-cp37-abi3-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cross-platform network info”
- netifaces2Retrieves network interface information (addresses, gateways,…
- ifaddrEnumerate network interfaces and their IP addresses across Linux,…
- netifacesProvides portable access to network interface information (addresses,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.
See also netifaces · netifaces-plus · getmac · ifaddr · netaddr · IP2Location · ipaddr · ifcfg · types-ipaddress · iptools