-
-
Save cosmic-cortex/d7fb93095d0c9e967e89a5da2a77dfa4 to your computer and use it in GitHub Desktop.
RapidAPI example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = "https://dark-sky.p.rapidapi.com/%7Blatitude%7D,%7Blongitude%7D" | |
querystring = {"lang":"en","units":"auto"} | |
headers = { | |
'x-rapidapi-host': "dark-sky.p.rapidapi.com", | |
'x-rapidapi-key': "a-totally-random-string" | |
} | |
response = requests.request("GET", url, headers=headers, params=querystring) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment