File: netifaces.py

package info (click to toggle)
python-ifaddr 0.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: python: 360; makefile: 3
file content (10 lines) | stat: -rw-r--r-- 205 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
# netifaces compatibility layer

import ifaddr

from typing import List


def interfaces() -> List[str]:
    adapters = ifaddr.get_adapters(include_unconfigured=True)
    return [a.name for a in adapters]