<div dir="ltr"><div dir="ltr">Hi Filipe<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 26, 2020 at 11:47 PM Filipe LaĆ­ns <<a href="mailto:lains@archlinux.org">lains@archlinux.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I have been working on a DBus server library on top of the Python type<br>
system.<br>
<br>
As some of you may know Python has a type system that allows you to<br>
annotate the types of variables. These annotations can then be consumed<br>
by tools, the most common use-case is to run static checks, essentially<br>
turning Python into a typed language. See [1].<br>
<br>
My DBus server library leverages this and allows you to build DBus<br>
objects using Python type hints with native Python types, abstracting<br>
out the DBus signatures.<br>
<br>
It can take Python methods, generate the signatures and all of the<br>
required introspection XML.<br>
<br>
The library essentially implements a frontend and could use any<br>
backend. None of the frontend API design is tied to how the backend<br>
works. I have added an integration with blocking Jeepney, which is the<br>
only backend supported right now, but I am planning to add more in the<br>
future.<br>
<br>
I would like to get some feedback on it, if possible. Mainly on the API<br>
design. It is still a bit early but the core is there and probably<br>
won't change much. I just need to add some missing features, fix some<br>
rough edges and make some slight improvements to the typing API.<br>
<br>
Here is the link :)<br>
<a href="https://github.com/FFY00/dbus-objects" rel="noreferrer" target="_blank">https://github.com/FFY00/dbus-objects</a><br>
<br>
Please let me know what you think, any suggestions...<br></blockquote><div><br></div><div>This is great! It looks as simple as what we came up with zbus (<a href="https://zeenix.pages.freedesktop.org/zbus/server.html#using-the-objectserver">https://zeenix.pages.freedesktop.org/zbus/server.html#using-the-objectserver</a>).</div><div><br></div>I proposed to extend a bit the XML format some time ago, to expose some type details: <a href="https://lists.freedesktop.org/archives/dbus/2020-July/017895.html">https://lists.freedesktop.org/archives/dbus/2020-July/017895.html</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">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.</div><div class="gmail_quote"><br></div><div class="gmail_quote">thanks!<br></div></div>