Extract data from a website and play in your Flask web application

What is module I could use in flask to get data from an API and throws in my web application in the HTML part

Author: Dalmo Cabral, 2018-04-10

1 answers

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

from requests import get

url = "https://jsonplaceholder.typicode.com/users"
response = get(url)
user = response.json()
 0
Author: Paulo França, 2018-04-24 02:35:21