Working on the Python interface for API