You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to get the module sspyrs working, or a replacement ?
If I put it or its requirement requests-ntlm in the "environment.yml", the build fails.
... yet "requets" seems to be there
# requests works in jupyterlite/xeus-python-demo !
import requests
from datetime import date, timedelta, datetime
today = date.today()
yesterday = today - timedelta(days=10)
country = "germany"
endpoint = f"https://api.covid19api.com/country/{country}/status/confirmed"
params = {"from": str(yesterday), "to": str(today)}
print(params)
endpoint_via_browser = f"https://api.covid19api.com/country/germany/status/confirmed?from=2022-12-06&to=2022-12-22"
response = requests.get(endpoint, params=params).json()
total_confirmed = 0
for day in response:
date_python = datetime.fromisoformat(day.get("Date", 0)[:-1] + '+00:00')
print(date_python.strftime('%Y-%m-%d'), f'{day.get("Cases", 0):_.0f}')
cases = day.get("Cases", 0)
total_confirmed += cases
print(f"Total Confirmed Covid-19 cases in {country}: {total_confirmed:_.0f}")
The text was updated successfully, but these errors were encountered:
If I put it or its requirement requests-ntlm in the "environment.yml", the build fails.
What is the build error message when you do this?
... yet "requets" seems to be there
Indeed requests is there, but it's not the real one, it's a shameless half-working mock module that lives here https://github.com/emscripten-forge/requests-wasm-polyfill. Not all the APIs have been implemented and we could use some Python dev help there! If you see anything missing from that requests module mock we can probably add it there.
Would it be possible to get the module sspyrs working, or a replacement ?
If I put it or its requirement requests-ntlm in the "environment.yml", the build fails.
... yet "requets" seems to be there
The text was updated successfully, but these errors were encountered: