test api from python