Код: Выделить всё
import requests
url = "https://jsonplaceholder.typicode.com/posts"
print("Getting response")
response = requests.get(url)
if response.status_code == 200:
print("Response OK!")
print(response.json()) # Print the returned JSON data
else:
print(f"Failed to fetch data. Status code: {response.status_code}")
Может ли кто-нибудь подсказать, как использовать вызовы API в приложении Streamlit?
Подробнее здесь: https://stackoverflow.com/questions/793 ... eamlit-app
Мобильная версия