A cross-platform WiFi management tool for Windows, macOS, and Ubuntu
Project description
py-wifi-helper
This is a Python tool/library developed for macOS 13.5, Ubuntu 22.04, and Windows 10/11, primarily providing operations for wireless interfaces. It includes functionalities such as listing available wireless interfaces, scanning for WiFi signals using a specified wireless interface, connecting a chosen wireless interface to a specific WiFi access point, retrieving information about the connected WiFi access points for the specified wireless interface, and disconnecting the specified wireless interface.
Installation
Dependencies
Windows
pip install pywifi comtypes
macOS
pip install "pyobjc-core>=9.2" "pyobjc-framework-Cocoa>=9.2" "pyobjc-framework-CoreWLAN>=9.2"
Ubuntu
Requires nmcli to be installed:
sudo apt-get install network-manager
Usage
% py-wifi-helper --help
usage: py-wifi-helper [-h] [--action {device,scan,connect,disconnect}] [--device DEVICE] [--ssid SSID] [--password PASSWORD]
options:
-h, --help show this help message and exit
--action {device,scan,connect,disconnect}
command action
--device DEVICE interface
--ssid SSID ssid
--password PASSWORD password
Windows
> py-wifi-helper
{
"version": "1.0.0",
"device": {
"default": "Intel(R) Wi-Fi 6 AX201 160MHz",
"list": [
"Intel(R) Wi-Fi 6 AX201 160MHz"
],
"error": null,
"select": "Intel(R) Wi-Fi 6 AX201 160MHz"
},
"connection": {
"default": {
"ssid": "MyWiFi",
"log": null
},
"Intel(R) Wi-Fi 6 AX201 160MHz": {
"ssid": "MyWiFi",
"log": null
}
},
"action": {
"name": "device",
"status": true,
"error": null,
"log": null
}
}
Ubuntu
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
$ sudo py-wifi-helper
{
"version": "1.0.0",
"device": {
"default": "wlxd1234567890",
"list": [
"wlxd1234567890"
],
"error": null,
"select": "wlxd1234567890"
},
"connection": {
"default": {
"ssid": null,
"log": null
},
"wlxd1234567890": {
"ssid": null,
"log": null
}
},
"action": {
"name": "device",
"status": true,
"error": null,
"log": null
}
}
macOS
% sw_vers
ProductName: macOS
ProductVersion: 13.5
BuildVersion: 22G74
% py-wifi-helper
{
"version": "1.0.0",
"device": {
"default": "en0",
"list": [
"en0"
],
"error": null,
"select": "en0"
},
"connection": {
"default": {
"ssid": "MyHomeWIFIAP",
"log": null
},
"en0": {
"ssid": "MyHomeWIFIAP",
"log": null
}
},
"action": {
"name": "device",
"status": true,
"error": null,
"log": null
}
}
Examples
Scan for WiFi Networks
py-wifi-helper --action scan
Connect to WiFi
py-wifi-helper --action connect --ssid "MyWiFi" --password "12345678"
Disconnect from WiFi
py-wifi-helper --action disconnect
Use Specific Interface
py-wifi-helper --action scan --device "wlan0"
Notes
- Windows requires administrator privileges for some operations
- Ubuntu requires sudo for network operations
- macOS might request permissions for network access on first use
Platform Support
- Windows 10/11 (via pywifi)
- macOS 13.5+ (via CoreWLAN)
- Ubuntu 22.04+ (via nmcli)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_wifi_helper-1.1.0.tar.gz.
File metadata
- Download URL: py_wifi_helper-1.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aeed1146e6ddefb3449da2322850f1341e69d1c0c9023e6a83e191f33f3d4eb
|
|
| MD5 |
dfe02dbd8c586bb64a17b07bbced9889
|
|
| BLAKE2b-256 |
6e38d72cbb99ec3d1c87f79e8f6742d79f0a9539367bf2e8b0bde07ffd1b8045
|
Provenance
The following attestation bundles were made for py_wifi_helper-1.1.0.tar.gz:
Publisher:
python-publish.yml on changyy/py-wifi-helper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_wifi_helper-1.1.0.tar.gz -
Subject digest:
0aeed1146e6ddefb3449da2322850f1341e69d1c0c9023e6a83e191f33f3d4eb - Sigstore transparency entry: 152247912
- Sigstore integration time:
-
Permalink:
changyy/py-wifi-helper@ef75c5c3fa0d97059f31a2665d3879ce0216aef4 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/changyy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ef75c5c3fa0d97059f31a2665d3879ce0216aef4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file py_wifi_helper-1.1.0-py3-none-any.whl.
File metadata
- Download URL: py_wifi_helper-1.1.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9332bb63faac94339d975d3c0bee6807b47a035bb5341381aba6140f677910b
|
|
| MD5 |
8b6c2332a4bf171fcaf97bf0c0f60544
|
|
| BLAKE2b-256 |
5177166f8c7d4cbef846a4e80e491ff40fcd717fa6f99eb3efbfdda3ea7aa9c0
|
Provenance
The following attestation bundles were made for py_wifi_helper-1.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on changyy/py-wifi-helper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_wifi_helper-1.1.0-py3-none-any.whl -
Subject digest:
d9332bb63faac94339d975d3c0bee6807b47a035bb5341381aba6140f677910b - Sigstore transparency entry: 152247916
- Sigstore integration time:
-
Permalink:
changyy/py-wifi-helper@ef75c5c3fa0d97059f31a2665d3879ce0216aef4 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/changyy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ef75c5c3fa0d97059f31a2665d3879ce0216aef4 -
Trigger Event:
release
-
Statement type: