New DBus server library for Python
Marc-André Lureau
marcandre.lureau at gmail.com
Mon Sep 28 10:16:03 UTC 2020
Hi Filipe
On Sat, Sep 26, 2020 at 11:47 PM Filipe Laíns <lains at archlinux.org> wrote:
> 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...
>
This is great! It looks as simple as what we came up with zbus (
https://zeenix.pages.freedesktop.org/zbus/server.html#using-the-objectserver
).
I proposed to extend a bit the XML format some time ago, to expose some
type details:
https://lists.freedesktop.org/archives/dbus/2020-July/017895.html
I don't know much Python typing, do you think you could comment on the
proposal based on your work? Do you have interest in working on a
proof-of-concept in dbus-objects? I am planning to do it on zbus.
thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20200928/49e77f11/attachment.htm>
More information about the dbus
mailing list