python extraction script turns sqlite api response into xlsx file