More work on python API