add pyapi