Added a simple description of DBus
This commit is contained in:
parent
52750cf9a5
commit
ebc49c35f5
2 changed files with 32 additions and 12 deletions
23
Python/DBus/SDBus.md
Normal file
23
Python/DBus/SDBus.md
Normal 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.
|
Loading…
Add table
Add a link
Reference in a new issue