Hello :)
I have been working on the foreign function interface, aka our C API. Instead of writing tests for that, I decided to write bindings for Python and testing that. This also gives me a feel for how complete and usable the C API is.
And while there is no documentation yet, I have integrated it in our new build system and I invite you to try it out. Even if you are not into Python, it is a nice way to interactively play with Sequoia.
To get it, either checkout the 'justus/python-3' branch or clone it using:
% git clone -b justus/python-3 https://gitlab.com/sequoia-pgp/sequoia.git
In addition to the build dependencies mentioned in 'README.md', you need python3-dev, python3-cffi (poke me if I missed any additional dependencies) and ipython3 (only for the nice interactive shell).
Then do 'make', followed by:
% make -Cffi/lang/python shell [... stuff...]
IPython 5.5.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details.
In [1]:
Wow, an interactive Python shell with all of Sequoias functionality already imported for you and a Context 'ctx' already created for your convenience is at your fingertips. Let's have some fun:
In [1]: fp = Fingerprint.from_hex("D2F2C5D45BE9FDE6A4EE0AAF31855247603831FD")
In [2]: keyid = fp.keyid()
In [3]: tpk = KeyServer.sks_pool(ctx).get(keyid)
In [4]: assert fp == tpk.fingerprint()
In [5]: st = Store.open(ctx, "my awesome store")
In [6]: st.import_("Justus' signing key", tpk) Out[6]: <sequoia.openpgp.TPK at 0x7fc5c0142780>
In [7]: binding = st.lookup("Justus' signing key")
In [8]: list(map(str, binding.log())) Out[8]: ["2018-03-16 13:10:10+00:00: org.sequoia-pgp.tests.interactive:my awesome store: New binding Justus' signing key -> 3185 5247 6038 31FD"]
For more ideas you can look into ffi/lang/python/tests.
Cheers, Justus