Skip to main content

Python decorator for dbus interface client definition

Python decorators to define dbus interface, then use it as lib.

For examples see mpris2 ( https://github.com/hugosenari/mpris2 )

See also:

dbus2any: convert dbus instrospection into code ( https://github.com/hugosenari/dbus2any )

Require:

Python dbus

Example:

Import decorators

>>> from dbusdecorator import DbusAttr, DbusInterface, DbusMethod

Define dbus interface

>>> @DbusInterface('org.mpris.MediaPlayer2', '/org/mpris/MediaPlayer2')
>>> class Player(object):
>>>    @DbusMethod
>>>    def Next(self):
>>>       pass
>>>    @DbusAttr
>>>    def Volume(self):
>>>       pass

Use your definition

>>> mediaplayer2 = Player(
>>>    dbus_interface_info={
>>>       'dbus_uri': 'org.mpris.MediaPlayer2.gmusicbrowser'})
>>> mediaplayer2.Next()
>>> print mediaplayer2.Volume
>>> mediaplayer2.Volume = 1
>>> print mediaplayer2.Volume # integer = 1 :P

See also:

dbus2any is a subproject now I created a project only for this (https://github.com/hugosenari/dbus2any)

Metadata

Release files for pydbusdecorator 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydbusdecorator 2.0
File Size Uploaded Provenance Actions
pydbusdecorator-2.0.tar.gz 5.0 kB Without provenance Details for pydbusdecorator-2.0.tar.gz

Release files / pydbusdecorator-2.0.tar.gz

Download URL pydbusdecorator-2.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e4fc37062af435f0eb99ae3342eb1493fe1cbee303103937cdcf5895a70dba7d
BLAKE2b-256 checksum
How to use checksums
94423217300bdb07a23ff8d69072b659b6464ede4b70e472f5f237fa8551161a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pydbusdecorator 2.0

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.

Release history Release notifications | RSS feed

This release

2.0 This release

1 release file No provenance

1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page