robert.ancell at canonical.com
Fri Aug 19 02:33:04 UTC 2016
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.
I've got the first cut of this done, meet snapd-glib!
- On Launchpad 
- Implements all  of the snapd REST API .
- Provides both synchronous and asynchronous methods
- Supports GObject introspection (i.e. Python etc support)
- Supports Vala.
- Will support Qt/QML in the future .
- 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.
- Currently using so version number 0 - ABI is not guaranteed to be stable
until we go to 1.
- Will SRU to Ubuntu 14.04 once the API/ABI is stable.
Here's a taste of the API:
gi.require_version ('Snapd', '0')
from gi.repository import Snapd
c = Snapd.Client ()
snaps = c.list_sync ()
for s in snaps:
print s.get_name () + ' ' + s.get_version ()
Happy Hacking! (And patches welcome).
 OK, just the main stuff and what I was able to get to work. But the
goal is to access everything there.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Snapcraft