[systemd-devel] Python wrappers for the DBus API

Holger Winkelmann hw at travelping.com
Mon Mar 4 23:16:00 PST 2013

I Like the idea as well to have direct DBus access to systemd.

Regarding your example of the journal wrapper. Anybody knows the API to write to the journal without using the C library? Is this DBus transport as well? Or is there a special journal socket to write to?


### Sent from a mobile device. Sorry for brevity and typos... ###

On 05.03.2013, at 06:41, David Strauss <david at davidstrauss.net> wrote:

> We're about to code a Python wrapper for systemd's DBus functionality.
> Initially, it will be non-comprehensive and satisfy our internal
> Pantheon goal of reading fields on a service and manipulating services
> without forking and parsing systemctl output to do either.
> But, a clean, incomplete implementation is a great way to kick off
> more barn-raising [1] in the community, so we're aiming for upstream
> integration. It's been awesome to see the journal wrappers evolve well
> beyond the initial, bare-bones send-to-the-journal code [2].
> Does anyone have in mind any brilliantly Pythonic way to expose the
> DBus unit and systemd core APIs?
> Should there be a Python class model that mirrors the systemd "unit"
> abstract class and litany of concrete classes (like "mount,"
> "service," etc.)? Or is it better to keep the Python code minimal to
> ease long-term maintenance as new unit types emerge?
> Unlike the journal wrappers, this code will probably be 100% regular
> Python. DBus Python support is a well-maintained part of many major
> distros, and it's great to leverage that.
> [1] http://meatballwiki.org/wiki/BarnRaising
> [2] https://github.com/systemd/python-systemd
> --
> David Strauss
>   | david at davidstrauss.net
>   | +1 512 577 5827 [mobile]
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

More information about the systemd-devel mailing list