Write out a more explicit C API, and create some wrappers into Python.