GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — use python requests module for accessing api · Alexmhack/python_intermediate@4bf6ac7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • python_requests
    • fixer_api.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎python_requests/fixer_api.py‎

Copy file name to clipboard
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import requests
2+
3+
def main():
4+
res = requests.get("http://api.fixer.io/latest/?base=USD&symbols=EUR")
5+
if res.status_code != 200:
6+
print(res.status_code)
7+
8+
data = res.json()
9+
print(data)
10+
11+
12+
if __name__ == '__main__':
13+
main()

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.