save api response to json file python