Skip to main content

Connected network devices using DBus

Project description

DBus Network Devices

PyPI Python versions License

The dbus-networkdevices library empowers Python applications to get the active network devices that are connected to your network.

Key Features

  • IP Access: Retrieve interface name, ip addresses, wifi ssid, etc...
  • Real-time Updates: Utilizes callback functions to provide instant updates of network changes.

Requirements

  • Python 3.7 or later
  • jeepney library

Installation

Install the library using pip:

pip install dbus-networkdevices

Usage

This library offers two primary usage approaches:

Command-Line Interaction

Run the script directly to print active network devices as JSON:

dbus-networkdevices

Programmatic Control

Import the DBUSNetworkDevices class from your Python code:

import json
import time
from dbus_networkdevices import DBUSNetworkDevices

def callback(devices):
    # Handle the list of network devices here
    print(json.dumps(devices, indent=2))

# Create an instance of the class
DBUSNetworkDevices(callback)

# Keep the app running
while True:
    time.sleep(1)

Inspiration

Most python applications use iwgetid and information from /proc/net/wireless to get the WiFi status, so I created this library to get the information directly from DBus and also include other interfaces.

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

dbus_networkdevices-2026.7.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

dbus_networkdevices-2026.7.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file dbus_networkdevices-2026.7.0.tar.gz.

File metadata

  • Download URL: dbus_networkdevices-2026.7.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for dbus_networkdevices-2026.7.0.tar.gz
Algorithm Hash digest
SHA256 4ab282f8a66c82b390d7c58ef0f7d393a18e6ce6ccd8a24d37aa6926bdf61085
MD5 e1a2443ac7adfa8e73fcf213180b6cb2
BLAKE2b-256 c693b70c9fde8fdadd02fae2be14987da423cbed12f8c5833eca966dfdc5017a

See more details on using hashes here.

File details

Details for the file dbus_networkdevices-2026.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dbus_networkdevices-2026.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72a49e7607dd2faee4f4c8e72821a85c3b45daa08553af3a22214704f27df484
MD5 d3c0a06e72fc54a626bce3c93ef7f0f4
BLAKE2b-256 d23c61979af121165cdd57f1f4d650e6d8f13ad31878885b4fe7ea873fc7647c

See more details on using hashes here.

Supported by

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