Now we will make a request to one of the Quote endpoints:
import requests
#Keep this format and set variable_for_api_key
my_api_key = “Token {}”.format(variable_for_api_key)
#change this with the endpoint you need to call:
url = “https:/palmy-investing.com/api/earning-events/”
#prepare the headers headers = {“Authorization”: my_api_key}
#start the request
response = requests.get(url, headers=headers)
#json_response holds the data
json_response = response.json()
#You can f.ex. print it
print(json_response)