hfmirror.utils.session

get_requests_session

hfmirror.utils.session.get_requests_session(max_retries: int = 5, timeout: int = 10, headers: Optional[Dict[str, str]] = None, session=None) → requests.Session[source]

srequest

hfmirror.utils.session.srequest(session: requests.Session, method, url, *, max_retries: int = 5, sleep_time: float = 5.0, raise_for_status: bool = True, **kwargs) → requests.Response[source]