Skip to main content

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


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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page