New DBus server library for Python

Filipe Laíns lains at archlinux.org
Sat Sep 26 19:38:53 UTC 2020


Hi all,

I have been working on a DBus server library on top of the Python type
system.

As some of you may know Python has a type system that allows you to
annotate the types of variables. These annotations can then be consumed
by tools, the most common use-case is to run static checks, essentially
turning Python into a typed language. See [1].

My DBus server library leverages this and allows you to build DBus
objects using Python type hints with native Python types, abstracting
out the DBus signatures.

It can take Python methods, generate the signatures and all of the
required introspection XML.

The library essentially implements a frontend and could use any
backend. None of the frontend API design is tied to how the backend
works. I have added an integration with blocking Jeepney, which is the
only backend supported right now, but I am planning to add more in the
future.

I would like to get some feedback on it, if possible. Mainly on the API
design. It is still a bit early but the core is there and probably
won't change much. I just need to add some missing features, fix some
rough edges and make some slight improvements to the typing API.

Here is the link :)
https://github.com/FFY00/dbus-objects

Please let me know what you think, any suggestions...

[1] http://mypy-lang.org/

Cheers,
Filipe Laíns
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20200926/be92e4b6/attachment.sig>


More information about the dbus mailing list