Extracts data from a website and plays in your web application Flask

0

What module can I use in flask to get data from an API and plays in my web application in the HTML part

    
asked by anonymous 10.04.2018 / 03:15

1 answer

0

It has a lib called requests (pip install requests), which is used to make requests. In the example below I do a get and retreat json from the request response.

from requests import get

url = "https://jsonplaceholder.typicode.com/users"
response = get(url)
user = response.json()
    
23.04.2018 / 19:53