python bindings for the api