Added a simple description of DBus

This commit is contained in:
The Wobbler 2025-04-13 14:20:10 +02:00
parent 52750cf9a5
commit ebc49c35f5
2 changed files with 32 additions and 12 deletions

View file

@ -2,20 +2,17 @@
tags: tags:
- Python - Python
- DBus - DBus
author: The Wobbler
--- ---
If you want to use DBus with Python, you may have seen that there are many Python-libraries for DBus. This page should help you pick the right one. If you want to use DBus with Python, you may have seen that there are many Python-libraries for DBus. This page should help you pick the right one.
Here i categorized some Python DBus-libraries according to my experience. Here i categorized some Python DBus-libraries according to my experience.
###### Usable: - **Usable:**
- [python-sdbus](https://github.com/python-sdbus/python-sdbus) - [[SDBus|python-sdbus]]
- **Outdated Shit:**
###### Outdated Shit:
- [pydbus](https://github.com/LEW21/pydbus) - [pydbus](https://github.com/LEW21/pydbus)
- **Undocumented Shit:**
###### Undocumented Shit:
- [dbus-python](https://dbus.freedesktop.org/doc/dbus-python/) - [dbus-python](https://dbus.freedesktop.org/doc/dbus-python/)
- **Useless Shit:**
###### Useless Shit:
- [PyQt6.QtDBus & PySide6.QtDBus](https://doc.qt.io/qtforpython-6/PySide6/QtDBus/index.html) - [PyQt6.QtDBus & PySide6.QtDBus](https://doc.qt.io/qtforpython-6/PySide6/QtDBus/index.html)
I think that [[SDBus|python-sdbus]] is by far the easiest to use and in comparison to the other libraries, it has a very good documentation.

23
Python/DBus/SDBus.md Normal file
View file

@ -0,0 +1,23 @@
---
tags:
- Python
- DBus
---
Python-sdbus is, according to my experience, the most usable DBus-library for Python, because it is still getting updates, has a simple API and a good documentation.
The only disatvantage is that you have to use asyncio to create a service.
Project Github: https://github.com/python-sdbus/python-sdbus
## What is DBus?
The name comes from "Desktop Bus".
The idea behind DBus is that you have a programing language independend standard for communication between different applications.
DBus can be used to send signals to multiple applications, call methods in applications that were written in a different language or just to exchange data between processes.
### How does DBus work?
In DBus, you have buses, interfaces and paths.
Bus names are similar to ip addresses, they consist of dot-separated characters and numbers, but every service/application can choose its own bus name.
Interfaces are objects that contain methods, properties and signals. A bus can have multiple interfaces, because every interface has its own name. An interface name is similar to a bus name. It again consists of dot-separated characters and numbers.
A path is a virtual path to a DBus-object. Every interface, for example, must have a path.
If you know the name of a service, (bus name) the interface name and the path, then you can interact with it.