Uses ctypes to get the IP configuration
pip install ipinfooo
Tested against Windows 10 / Python 3.10 / Anaconda
I haven't written a single line of this code, and I don't know who wrote it. But I know that it is pretty useful if you need details about your network connection - Mozilla Public License, v. 2.0.
From the source code:
# For the sake of humanity here's a python script retrieving
# ip information of the network interfaces.
#
# Pay some tribute to my soul cause I lost a few years on this one
#
# based on code from jaraco and many other attempts
# on internet.
# Fixed by <@gpotter2> from scapy's implementation to
# add IPv6 support + fix structures
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.\
#
from ipinfooo import get_win_ifaddrs
get_win_ifaddrs()
Out[4]:
[{'Realtek Gaming GbE Family Controller': {2: {'addr': 'xxx',
'netmask': 'xxx',
'broadcast': 'xx255',
'network': '1xxxx0'}}},
{'VirtualBox Host-Only Ethernet Adapter': {2: {'addr': '192.168.56.1',
'netmask': '255.255.255.0',
'broadcast': '192.168.56.255',
'network': '192.168.56.0'},
23: {'addr': 'xxxx',
'netmask': 'ffff:ffff:ffff:ffff::',
'broadcast': 'fe80::ffff:ffff:ffff:ffff',
'network': 'fe80::'}}},
{'Software Loopback Interface 1': {2: {'addr': '127.0.0.1',
'netmask': '255.0.0.0',
'broadcast': '127.255.255.255',
'network': '127.0.0.0'},
23: {'addr': '::1',
'netmask': 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
'broadcast': '::1',
'network': '::1'}}}]
Metadata
Release files for ipinfooo 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ipinfooo-0.10.tar.gz | 11.0 kB | Without provenance | Details for ipinfooo-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ipinfooo-0.10-py3-none-any.whl | Python 3 | none | any | Details for ipinfooo-0.10-py3-none-any.whl |
Total release size: 23.4 kB
Release files / ipinfooo-0.10.tar.gz
| Download URL | ipinfooo-0.10.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99133fbfea163deda0f35e1277d23ef0e3ea3978450f3b650c1f2fa29ce2d811
|
|
BLAKE2b-256 checksum How to use checksums |
2a8b95631e818e61eb48fff7b1e283e3705a2aeeddd2275a80f8fce5fa7bd5d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Release files / ipinfooo-0.10-py3-none-any.whl
| Download URL | ipinfooo-0.10-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c59bdb006fba81067b98afcc74f1b8cc8e724d8b3ecbb3c6d7abab237029dc58
|
|
BLAKE2b-256 checksum How to use checksums |
df89e45b2dbbc9b262c22c82944c29b8dd5854aa610e740c808272f8f90e397e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for ipinfooo 0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.