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

Download files

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

Source Distribution

win-nic-2.0.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

win_nic-2.0.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file win-nic-2.0.1.tar.gz.

File metadata

  • Download URL: win-nic-2.0.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for win-nic-2.0.1.tar.gz
Algorithm Hash digest
SHA256 fa4b39bc6864bc1a32653e6d88fc74197e4571885d9ef9c9aa351ec3cc0f5c4b
MD5 661c33aec6ae42660dd0acd1a93d4233
BLAKE2b-256 923ba5c969b59df9d1b126f97ad0d1363dbd7b67ed581b2b9a1cec9773c9562d

See more details on using hashes here.

File details

Details for the file win_nic-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: win_nic-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for win_nic-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 71b4eb9660c8eef942a95a0ef298b6b7acd3fee9c4edebf4c968cfaa35469050
MD5 cff9bc97d4410455d92eb796b7426e69
BLAKE2b-256 5286c3634460fca4475614f6d37c785d6dcf98a54c5fe4fd3a0908407be51b8c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 files

2.0.0

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page