July 23, 2022 12:07 pm GMT
Original Link: https://dev.to/vamsitupakula_/how-to-fetch-api-in-python-1dh2
How to fetch API in Python
We can create Awesome Projects If we know how to fetch an API in python.
We all know python is the most easiest and widely used programming language even though it is slow.
so in this blog we will learn how to fetch an API in python.
we will use an API which will give us a list of words.
API -- Click Here
import requestsimport json# fetching API response_API = requests.get('https://www.randomlists.com/data/words.json')data = response_API.text # gives in a text format# converting it into json objectjson_data = json.loads(data)# getting list of wordswords = json_data["data"]print(words)
Original Link: https://dev.to/vamsitupakula_/how-to-fetch-api-in-python-1dh2
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To