You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.3 KiB

4 years ago
  1. Metadata-Version: 2.1
  2. Name: ifaddr
  3. Version: 0.1.5
  4. Summary: Enumerates all IP addresses on all network adapters of the system.
  5. Home-page: https://github.com/pydron/ifaddr
  6. Author: Stefan C. Mueller
  7. Author-email: scm@smurn.org
  8. License: UNKNOWN
  9. Platform: UNKNOWN
  10. Requires-Dist: ipaddress ; python_version < "3.3"
  11. ifaddr - Enumerate IP addresses on the local network adapters
  12. =============================================================
  13. `ifaddr` is a small Python library that allows you to find all the
  14. IP addresses of the computer. It is tested on **Linux**, **OS X**, and
  15. **Windows**.
  16. This library is open source and released under the MIT License.
  17. You can install it with `pip install ifaddr`. It doesn't need to
  18. compile anything, so there shouldn't be any surprises. Even on Windows.
  19. ----------------------
  20. Let's get going!
  21. ----------------------
  22. .. code-block:: python
  23. import ifaddr
  24. adapters = ifaddr.get_adapters()
  25. for adapter in adapters:
  26. print "IPs of network adapter " + adapter.nice_name
  27. for ip in adapter.ips:
  28. print " %s/%s" % (ip.ip, ip.network_prefix)
  29. This will print:
  30. .. code-block:: python
  31. IPs of network adapter H5321 gw Mobile Broadband Driver
  32. IP ('fe80::9:ebdf:30ab:39a3', 0L, 17L)/64
  33. IP 169.254.57.163/16
  34. IPs of network adapter Intel(R) Centrino(R) Advanced-N 6205
  35. IP ('fe80::481f:3c9d:c3f6:93f8', 0L, 12L)/64
  36. IP 192.168.0.51/24
  37. IPs of network adapter Intel(R) 82579LM Gigabit Network Connection
  38. IP ('fe80::85cd:e07e:4f7a:6aa6', 0L, 11L)/64
  39. IP 192.168.0.53/24
  40. IPs of network adapter Software Loopback Interface 1
  41. IP ('::1', 0L, 0L)/128
  42. IP 127.0.0.1/8
  43. You get both IPv4 and IPv6 addresses. The later complete with
  44. flowinfo and scope_id.
  45. -------------
  46. Documentation
  47. -------------
  48. The complete documentation (there isn't much to document) can be found here:
  49. `ifaddr Documentation <http://pythonhosted.org/ifaddr/>`_.
  50. -----------------------------------
  51. Bug Reports and other contributions
  52. -----------------------------------
  53. This project is hosted here `ifaddr github page <https://github.com/smurn/ifaddr>`_.
  54. ------------
  55. Alternatives
  56. ------------
  57. Alastair Houghton develops `netifaces <https://pypi.python.org/pypi/netifaces>`_
  58. which can do everything this library can, and more. The only drawback is that it needs
  59. to be compiled, which can make the installation difficult.