DEV Community

technonotes-hacker
technonotes-hacker

Posted on

PYTHON - DAY 1 - my DOODLE

List of API's

https://github.com/fawazahmed0/currency-api#readme
https://api.chucknorris.io/
https://github.com/public-apis/public-apis?tab=readme-ov-file#social

Enter fullscreen mode Exit fullscreen mode

How to start ?

Json output

Image description

https://httpbin.org/get

Code

cat http_bin.py


import requests
mydata = requests.get("https://httpbin.org/get")
print(mydata)
data = mydata.json()
print(data)
result=data['headers']["Host"]
print(result)

Enter fullscreen mode Exit fullscreen mode

Output

Image description

Links :

https://gitlab.com/parameshwar_a/pyfordevops/-/tree/main?ref_type=heads
https://gitlab.com/parameshwar_a/pyfordevops

Top comments (0)