Skip to main content
https://gitlab.com/TNThieding/win-nic/badges/master/pipeline.svg https://gitlab.com/TNThieding/win-nic/badges/master/coverage.svg Documentation Status

Interface with network interface cards (NICs) on Windows-based computers. This package heavily wraps the Windows management instrumentation command-line (WMIC) and the netsh command-line utility via subprocess calls. No C dependencies or building from source files, just a lightweight and straightforward wrapper of utilities built into your Windows system.

Quick Start

First, obtain a NIC instance via the NetworkAdapters class. To do this, instantiate NetworkAdapters and specify the desired NIC. Specify the target NIC by registry index, name, or connection ID (control panel name):

>>> from win_nic import NetworkAdapters
>>> this_pc_nics = NetworkAdapters()
>>> ethernet_nic = this_pc_nics.get_nic(connection_id="Local Area Connection 1")

Now, interface with the NIC instance as needed by getting attributes or calling methods:

>>> ethernet_nic.property.ip_addresses
['192.168.0.2']
>>> ethernet_nic.net_connection_status
<NicNetConnectionStatus.CONNECTED: 2>
>>> ethernet_nic.set_static_address('192.168.0.3', '255.255.255.0', '192.168.0.1')
0

Metadata

Release files for win-nic 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for win-nic 2.0.1
File Size Uploaded
win-nic-2.0.1.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for win-nic 2.0.1
File Interpreter ABI Platform
win_nic-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.4 kB

Release files / win-nic-2.0.1.tar.gz

Download URL win-nic-2.0.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fa4b39bc6864bc1a32653e6d88fc74197e4571885d9ef9c9aa351ec3cc0f5c4b
BLAKE2b-256 checksum
How to use checksums
923ba5c969b59df9d1b126f97ad0d1363dbd7b67ed581b2b9a1cec9773c9562d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / win_nic-2.0.1-py3-none-any.whl

Download URL win_nic-2.0.1-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71b4eb9660c8eef942a95a0ef298b6b7acd3fee9c4edebf4c968cfaa35469050
BLAKE2b-256 checksum
How to use checksums
5286c3634460fca4475614f6d37c785d6dcf98a54c5fe4fd3a0908407be51b8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page