<div dir="ltr">I blogged an introduction to snapd-glib:<br><a href="http://bobthegnome.blogspot.co.nz/2016/08/introducing-snapd-glib.html">http://bobthegnome.blogspot.co.nz/2016/08/introducing-snapd-glib.html</a><br><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 19, 2016 at 2:33 PM Robert Ancell <<a href="mailto:robert.ancell@canonical.com">robert.ancell@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi all,<br><br></div>At the Heidelberg sprint we decided to create a library that would allow GLib based projects to more easily access snapd and reduce duplication across these projects.<br><br></div><div>I've got the first cut of this done, meet snapd-glib!<br><br></div><div>- On Launchpad [1]<br></div><div>- Implements all [2] of the snapd REST API [3].<br></div><div>- Provides both synchronous and asynchronous methods<br></div><div>- Supports GObject introspection (i.e. Python etc support)<br></div><div>- Supports Vala.<br></div><div>- Will support Qt/QML in the future [4].<br></div><div>- Uploaded to Ubuntu Yakkety, will be there once it is accepted into the NEW queue. Use the libsnapd-glib-dev or gir1.2-snapd-0 packages.<br></div><div>- Currently using so version number 0 - ABI is not guaranteed to be stable until we go to 1.<br></div><div>- Will SRU to Ubuntu 14.04 once the API/ABI is stable.<br><br></div><div>Here's a taste of the API:<br><br>#!/usr/bin/python<br><br>import gi<br><br>gi.require_version ('Snapd', '0')<br>from gi.repository import Snapd<br><br>c = Snapd.Client ()<br>c.connect_sync ()<br>snaps = c.list_sync ()<br>for s in snaps:<br>    print s.get_name () + ' ' + s.get_version ()<br><br></div><div>Happy Hacking! (And patches welcome).<br><br></div>--Robert<br><br>[1] <a href="http://launchpad.net/snapd-glib" target="_blank">http://launchpad.net/snapd-glib</a></div>[2] OK, just the main stuff and what I was able to get to work. But the goal is to access everything there.<br><div><div><div>[3] <a href="https://github.com/snapcore/snapd/blob/master/docs/rest.md" target="_blank">https://github.com/snapcore/snapd/blob/master/docs/rest.md</a><br>[4] <a href="https://bugs.launchpad.net/bugs/1614797" target="_blank">https://bugs.launchpad.net/bugs/1614797</a><br><br></div></div></div></div></blockquote></div></div></div></div>