Skip to main content

Python package to interface with network intetrface cards (NICs) on Windows-based computers.

Project description 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.net_connection_status
<NicNetConnectionStatus.CONNECTED: 2>
>>> ethernet_nic.set_static_address('', '', '')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for win-nic, version 2.0.1
Filename, size File type Python version Upload date Hashes
Filename, size win_nic-2.0.1-py3-none-any.whl (14.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size win-nic-2.0.1.tar.gz (10.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page