![]() |
API with parameters exported to sql database - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: API with parameters exported to sql database (/thread-28467.html) |
API with parameters exported to sql database - PYTHONDUDE - Jul-20-2020 i have a URL and and also the api key to get data from an external website howvever i need to provide 2 parameters to extract the data (Date, EMPLOYEE). Once i enter the parameter i should get all the data i need in this format (name,account_number,date,employee). After this i would like to export the results into an already created sql table ( same headers as above) can someone please assist this is what i did so far import json import requests api_token = '' url'' headers {'authorization': 'Bearer {0}.format(api_ken} r= requests.get(url,headers=headers) print(r.text) |