Skip to content

Instantly share code, notes, and snippets.

@ajitesh123
Created June 14, 2019 01:26
Embed
What would you like to do?
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