Skip to main content

wifi_wrapper

A python wrapper over nmcli tool for linux devices.

Install

pip install wifi_wrapper

Quick Usage

from wifi_wrapper import WiFi
from pprint import pprint


wifi = WiFi()

enabled = wifi.wifi_enabled()

if enabled:
  connections = wifi.scan()
  print("Available wifi nearby :")
  pprint(connections) 
"""
Output ->

Available wifi nearby:
        [
            {
                "IN-USE": "*",
                "BSSID": "8C:A3:99:16:4C:63",
                "SSID": "WillowCove",
                "MODE": "Infra",
                "CHAN": "1",
                "RATE": "130 Mbit/s",
                "SIGNAL": "74",
                "BARS": "▂▄▆_",
                "SECURITY": "WPA2",
                "CLIENT": "yes",    
            },
            { ... },
            { ... },
        ]
"""

Dependency

  • Your system should have nmcli installed and you should have sudo permissions
sudo apt install network-manager
  • After the installation has completed, start the Network Manager.
sudo systemctl start NetworkManager.service
  • Next, we will enable Network Manager to start on system boot.
sudo systemctl enable NetworkManager.service
  • Disable hostapd and dnsmasq
sudo systemctl disable dnsmasq.service
sudo systemctl disable hostapd.service
  • Make sure your /etc/NetworkManager/NetworkManager.conf file looks exactly like this
[main]
plugins=ifupdown,keyfile
dhcp=internal

[ifupdown]
managed=false

Metadata

Release files for wifi-wrapper 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wifi-wrapper 0.1.1
File Size Uploaded
wifi_wrapper-0.1.1.tar.gz 5.7 kB Details

Release files / wifi_wrapper-0.1.1.tar.gz

Download URL wifi_wrapper-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
25777223ee135f2915d7a71aa6fb146c2b52b0c8edd5fe07b80eb77b9a7d251a
BLAKE2b-256 checksum
How to use checksums
f884d0f5238fed74453a58984e3f4ac6c841e1cd39f4201595c7591793fd616f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page