Update pyapi.py