pysdbus
pysdbus is a Python wrapper library for DBus inter-process communication. It uses Python's ctypes module to communicate directly with the sd-bus C API of the systemd library. Hence, pysdbus only depends on the presence of the libsystemd.so library and a functional Python interpreter in version 2 or 3.
pysdbus offers three APIs:
pysdbus.llapiis the low-level API and a thin ctypes wrapper around libsystemd's C APIpysdbusis the main API of this library and provides additional convenience around the low-level APIpysdbus.dbusaims to provide a programming interface similar to the well-known dbus-python project
Status
This library is still in an early stage. Many features are still missing but calling and offering APIs with methods, signals and properties is already implemented.
pysdbus example
import pysdbus
bus = pysdbus.SystemBus()
obj = bus.getObject("org.freedesktop.DBus", "/org/freedesktop/DBus")
iface = obj.getInterface("org.freedesktop.DBus")
reply = iface.ListNames()
for service in reply:
print(service)
pysdbus.dbus example
ml = MainLoop()
bus = SystemBus()
dbus_obj = bus.get_object("org.freedesktop.DBus", "/org/freedesktop/DBus")
iface = Interface(dbus_obj, "org.freedesktop.DBus")
reply = iface.ListNames()
print(reply)
def prop_changed_cb(sender, destination, path, interface, member):
print("new signal: ", sender, destination, path, interface, member)
bus.add_signal_receiver(prop_changed_cb)
def nameowner_changed_cb(sender, destination, path, interface, member):
print("nameowner changed: ", sender, destination, path, interface, member)
iface.connect_to_signal("NameOwnerChanged", nameowner_changed_cb)
ml.run()
Metadata
Release files for pysdbus 2023.12.25
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysdbus-2023.12.25.tar.gz | 41.8 kB | Without provenance | Details for pysdbus-2023.12.25.tar.gz |
Release files / pysdbus-2023.12.25.tar.gz
| Download URL | pysdbus-2023.12.25.tar.gz |
|---|---|
| Size | 41.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0662d826c75f203db163d31d32d3ca5ad512f658c115c24526f7dd4a30193cb3
|
|
BLAKE2b-256 checksum How to use checksums |
fce50468e5b0bef9be7568b7471f5996a174d1127af508d3a59e842bc7b77233
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for pysdbus 2023.12.25
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.