Horje
save request response json to file python Code Example
save request response json to file python
import requests
# there is inbuilt json() constructor for requests.get() method
json_data = requests.get("https://api.blinkist.com/v4/books/5420831a63656400089f0000").json()
print(json_data)

# To actually write the data to the file, we just call the dump() function from json library
import json
with open('personal.json', 'w') as json_file:
    json.dump(json_data, json_file)




Python

Related
import matplotlib.pyplot as plt Code Example import matplotlib.pyplot as plt Code Example
python random string Code Example python random string Code Example
generate a list of random non repeated numbers python Code Example generate a list of random non repeated numbers python Code Example
how to set google chrome as default browser when coding with python using webbroiwser module Code Example how to set google chrome as default browser when coding with python using webbroiwser module Code Example
python how to set the axis ranges in seaborn Code Example python how to set the axis ranges in seaborn Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7