A Python package to manage WiFi connections using iwctl
Project description
pyiwctl
pyiwctl is a Python package for managing WiFi connections using iwctl.
Installation
Prerequisites
Ensure you have iwd (iNet Wireless Daemon) installed on your system. You can install it using the following commands:
- Debian:
sudo apt install iwd -y
- Fedora:
sudo dnf install iwd
- Arch Linux:
sudo pacman -Sy iwd
Python Package
Install the pyiwctl package using pip:
pip install pyiwctl
Usage
from pyiwctl import WiFiManager
manager = WiFiManager(interface='wlan0')
manager.scan_networks()
ssids = manager.get_ssids()
print("Available networks:", ssids)
success = manager.connect_to_network('SSID_NAME', 'PASSWORD')
print("Connection successful:", success)
manager.disconnect()
manager.forget_network('SSID_NAME')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyiwctl-0.4.tar.gz
(3.0 kB
view hashes)