feat: simple tutorial for GET API
This commit is contained in:
parent
6bf35f0f2f
commit
82dbe7f887
9
src/tutorial/api/native_request.py
Normal file
9
src/tutorial/api/native_request.py
Normal file
@ -0,0 +1,9 @@
|
||||
import requests
|
||||
|
||||
|
||||
def fetch_user(username: str) -> dict:
|
||||
response = requests.get(f"https://www.codewars.com/api/v1/users/{username}")
|
||||
return response.json()
|
||||
|
||||
|
||||
print(fetch_user("cw-sandro"))
|
||||
Loading…
x
Reference in New Issue
Block a user