skillfed

dbus-python

Python bindings for libdbus

dbus-python v1.4.0 254.6K downloads/30d#8,492 on PyPI
Permissive license Expat (MIT/X11) AGING released

What it is and what it does

dbus-python is the original Python binding for D-Bus, the reference implementation of the D-Bus protocol used for inter-process communication on Linux systems. It allows Python programs to call methods on, and receive signals from, system services and other applications connected to the D-Bus message bus.

The package wraps libdbus directly and requires careful main-loop integration; it does not follow a strict "refuse to guess" principle and has known limitations with multi-threaded code. The description itself lists several alternative bindings (dasbus, dbussy, dbus-next, dbus-fast, jeepney) that may better suit modern use cases, particularly if you need asyncio support or higher-level abstractions.

Use it for:

  • Integrate Python applications with systemd services or other system daemons via D-Bus method calls
  • Monitor system events (power state, network changes, device hotplug) by subscribing to D-Bus signals
  • Build desktop applications that need to interact with GNOME, KDE, or other D-Bus-using desktop environments
  • Expose Python services on the D-Bus message bus for other applications to call

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Python bindings to libdbus, allowing Python programs to communicate over the D-Bus message bus protocol used by Linux desktop and system services.

Yes, but with conditions. Install if you need to integrate with existing D-Bus services on a Linux system and are comfortable with the high install friction (compiled dependencies) and aging codebase. If you are starting a new project, consider the alternatives listed in the package documentation—particularly dbus-next or jeepney for asyncio support, or dasbus for a higher-level interface. No known security vulnerabilities.

Install

dbus-python on PyPI

pip

pip install dbus-python

uv

uv add dbus-python

poetry

poetry add dbus-python

Installing dbus-python

Before you install

High install friction due to compiled C dependencies on libdbus development headers. Package is aging (519 days since last release) with inactive development status, though it remains the original reference binding and receives occasional maintenance.

License in practice

Licensed under MIT (Expat), a permissive license with no restrictions on commercial or private use, modification, or redistribution.

Quickstart

import dbus
bus = dbus.SystemBus()
object_path = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
interface = dbus.Interface(object_path, 'org.freedesktop.DBus')

Requires libdbus development headers and C compiler to build; D-Bus daemon must be running on the system.

Verify before relying

  • Whether the package's known limitations with multi-threaded use and main-loop selection affect your specific use case
  • Current state of the GitLab repository and whether maintenance is truly inactive or episodic

Package facts

License Expat (MIT/X11) (permissive)
Python support supports the current Python release (>=3.7)
Install friction high — source build required
Runtime dependencies none
Maintenance aging — 519 days since the last release
First released
Downloads 254,565/month — #8,492 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: dbus-python-1.4.0.tar.gz

Keywords: dbus, D-Bus

Development Status :: 7 - InactiveLicense :: OSI Approved :: MIT LicenseProgramming Language :: CProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Object Brokering

Tags

d-bus python bindingsdbus message bus communicationsystem service ipc pythonlibdbus python wrapperdesktop service integrationdbus protocol pythoninter-process communication dbus
ipcsystem-integrationlinux-desktop

More Object Brokering packages