small mods to python api wrapper