Learn practical skills, build real-world projects, and advance your career
from jovian.utils.request import get
BASE_REQUEST = "http://localhost:8080"
REQ_200 = "{}/{}".format(BASE_REQUEST, 200)
REQ_401 = "{}/{}".format(BASE_REQUEST, 401)
REQ_403 = "{}/{}".format(BASE_REQUEST, 403)
response = get(REQ_401)
retrying request...0 retrying request...1
--------------------------------------------------------------------------- ApiError Traceback (most recent call last) <ipython-input-12-1a921eecb62f> in <module>() ----> 1 response = get(REQ_401) ~/workspace/current/jovian/jovian-py/jovian/utils/request.py in _request_wrapper(self, *args, **kwargs) 57 continue 58 ---> 59 raise ApiError( "Api failing, after {} retries: {}".format(NUM_RETRIES, _pretty(response))) 60 61 return _request_wrapper ApiError: Api failing, after 2 retries: (HTTP 401) The token has expired
import jovian