Skip to content

Instantly share code, notes, and snippets.

@ajitesh123
Created June 14, 2019 01:26
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 ajitesh123/19abf95040db85399f9df384ddd4efd6 to your computer and use it in GitHub Desktop.
Save ajitesh123/19abf95040db85399f9df384ddd4efd6 to your computer and use it in GitHub Desktop.
import requests
def main():
res=requests.get("http://data.fixer.io/api/latest?access_key=XXXXXXXXXXXX")
if res.status_code!=200:
raise Exception("Error API request unsuccessful")
data=res.json()
num=data["base"]
print(num)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment