Python API updated to actually work