-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
25 lines (16 loc) · 720 Bytes
/
main.py
File metadata and controls
25 lines (16 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# docker build . -t aclabs
# docker run -td --name syneto-lab -v "D:\Diverse\3. Syneto\git\syneto-python-labs":/home/syneto_labs/ -p 8000:8000 aclabs
# docker run -td --name syneto-lab -v "C:\Users\alexandru-b.serban\PycharmProjects\syneto-python-labs":/home/syneto_labs -p 8000:8000 aclabs
# docker exec -it syneto-lab /bin/bash
# /root/.poetry/bin/poetry shell
# /home/syneto_labs/lab4 # uvicorn fastAPI:app --host 0 --reload
import requests
import json
link = "https://www.boredapi.com/api/activity"
response = requests.get(link)
print(response)
json_response = response.json()
another_json = json.dumps(json_response)
parsed_json = json.loads(another_json)
print(parsed_json)
print(parsed_json["activity"])