Announcing snapd-glib

Robert Ancell robert.ancell at
Fri Aug 19 02:33:04 UTC 2016

Hi all,

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 [1]
- Implements all [2] of the snapd REST API [3].
- Provides both synchronous and asynchronous methods
- Supports GObject introspection (i.e. Python etc support)
- Supports Vala.
- Will support Qt/QML in the future [4].
- 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:


import gi

gi.require_version ('Snapd', '0')
from gi.repository import Snapd

c = Snapd.Client ()
c.connect_sync ()
snaps = c.list_sync ()
for s in snaps:
    print s.get_name () + ' ' + s.get_version ()

Happy Hacking! (And patches welcome).


[2] 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...
URL: <>

More information about the Snapcraft mailing list