skip to navigation
skip to content

txdbus 1.1.0

A native Python implementation of the DBus protocol for Twisted applications.

Package Documentation

Tom Cocagne <tom.cocagne@gmail.com> v1.1.0, July 2017

Introduction

TxDBus is a native Python implementation of the DBus protocol for the Twisted networking framework.

In addition to a tutorial, and collection of examples the documentation for this project also includes An Overview of the DBus Protocol.

License: MIT

Usage Example

#!/usr/bin/env python

from twisted.internet import reactor, defer
from txdbus import error, client

@defer.inlineCallbacks
def show_desktop_notification():
    '''
    Displays "Hello World!" in a desktop notification window for 3 seconds
    '''
    con = yield client.connect(reactor, 'session')

    notifier = yield con.getRemoteObject('org.freedesktop.Notifications',
                                         '/org/freedesktop/Notifications')

    nid = yield notifier.callRemote('Notify',
                                    'Example Application',
                                    0,
                                    '',
                                    'Tx DBus Example',
                                    'Hello World!',
                                    [], dict(),
                                    3000)

    reactor.stop()

reactor.callWhenRunning(show_desktop_notification)
reactor.run()
 
File Type Py Version Uploaded on Size
txdbus-1.1.0-py2.py3-none-any.whl (md5) Python Wheel 2.7 2017-07-17 43KB
txdbus-1.1.0.tar.gz (md5) Source 2017-07-14 58KB