Skip to content

Instantly share code, notes, and snippets.

@cosmic-cortex
Created September 14, 2020 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosmic-cortex/d7fb93095d0c9e967e89a5da2a77dfa4 to your computer and use it in GitHub Desktop.
Save cosmic-cortex/d7fb93095d0c9e967e89a5da2a77dfa4 to your computer and use it in GitHub Desktop.
RapidAPI example
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