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.6.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.6.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbus_networkdevices-2026.6.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.6.0.tar.gz
Algorithm Hash digest
SHA256 2ca15817e4e723f88e6ed8ac565d361d999f20b499161eeec30e47e66660118a
MD5 e7a3d84506921fbfbd3d9c655a14e4c1
BLAKE2b-256 aef9d7df7be0ad579054b2ec1a6e461ddd337b6e936982a7d115c1ae6405a8aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dbus_networkdevices-2026.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23286d486b4313c8712634199ad174e5f84e1e02a2aaf2059a331f696243a619
MD5 b3e73a6f4a6c31d51a05722b4b178e7a
BLAKE2b-256 6f39977dd8f74bbf89d42f87710e4ef57654da268a63d7d0f39e35965b51fdde

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