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

Asked

Viewed 89 times

0

Which module could I use in flask to get data from an API and play in my web application in the HTML part

1 answer

0

It has a lib called requests (Pip install requests), which is used to make requests. In the example below I get and remove the json from the request reply.

from requests import get

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.