auth.session

Attributes

log

Timeout

Classes

BaseSession

SyncSession

Module Contents

auth.session.log
class auth.session.BaseSession(session=None, timeout=10, verify_ssl=True)
Parameters:
  • session (Optional[requests.Session])

  • timeout (float)

  • verify_ssl (bool)

__metaclass__
_shared_session = False
_session = None
_ssl = True
_timeout = 10
property session: requests.Session | None
Abstractmethod:

Return type:

Optional[requests.Session]

abstract post(url, headers, data, timeout, params)
Async:

Parameters:
  • url (str)

  • headers (Mapping[str, str])

  • data (Optional[Union[bytes, str, IO[AnyStr]]])

  • timeout (float)

  • params (Optional[Mapping[str, Union[int, str]]])

Return type:

requests.Response

abstract get(url, headers, timeout, params, stream, auto_decompress)
Async:

Parameters:
  • url (str)

  • headers (Optional[Mapping[str, str]])

  • timeout (float)

  • params (Optional[Mapping[str, Union[int, str]]])

  • stream (bool)

  • auto_decompress (bool)

Return type:

requests.Response

abstract patch(url, headers, data, timeout, params)
Async:

Parameters:
  • url (str)

  • headers (Mapping[str, str])

  • data (Optional[Union[bytes, str]])

  • timeout (float)

  • params (Optional[Mapping[str, Union[int, str]]])

Return type:

requests.Response

abstract put(url, headers, data, timeout)
Async:

Parameters:
  • url (str)

  • headers (Mapping[str, str])

  • data (Union[bytes, str, IO[Any]])

  • timeout (float)

Return type:

requests.Response

abstract delete(url, headers, params, timeout)
Async:

Parameters:
  • url (str)

  • headers (Mapping[str, str])

  • params (Optional[Mapping[str, Union[int, str]]])

  • timeout (float)

Return type:

requests.Response

abstract head(url, headers, timeout, params, allow_redirects)
Async:

Parameters:
  • url (str)

  • headers (Optional[Mapping[str, str]])

  • timeout (float)

  • params (Optional[Mapping[str, Union[int, str]]])

  • allow_redirects (bool)

Return type:

requests.Response

abstract request(method, url, headers, auto_raise_for_status=True, **kwargs)
Async:

Parameters:
  • method (str)

  • url (str)

  • headers (Mapping[str, str])

  • auto_raise_for_status (bool)

  • kwargs (Any)

Return type:

requests.Response

abstract close()
Async:

Return type:

None

auth.session.Timeout
class auth.session.SyncSession(session=None, timeout=10, verify_ssl=True)

Bases: BaseSession

Parameters:
  • session (Optional[requests.Session])

  • timeout (float)

  • verify_ssl (bool)

_google_api_lock
property google_api_lock: threading.RLock
Return type:

threading.RLock

property session: requests.Session
Return type:

requests.Session

async post(url, headers, data=None, timeout=10, params=None)
Parameters:
  • url (str)

  • headers (Mapping[str, str])

  • data (Optional[Union[bytes, str, IO[AnyStr]]])

  • timeout (float)

  • params (Optional[Mapping[str, Union[int, str]]])

Return type:

requests.Response

async get(url, headers=None, timeout=10, params=None, stream=False, auto_decompress=True)
Parameters:
  • url (str)

  • headers (Optional[Mapping[str, str]])

  • timeout (float)

  • params (Optional[Mapping[str, Union[int, str]]])

  • stream (bool)

  • auto_decompress (bool)

Return type:

requests.Response

async patch(url, headers, data=None, timeout=10, params=None)
Parameters:
  • url (str)

  • headers (Mapping[str, str])

  • data (Optional[Union[bytes, str]])

  • timeout (float)

  • params (Optional[Mapping[str, Union[int, str]]])

Return type:

requests.Response

async put(url, headers, data, timeout=10)
Parameters:
  • url (str)

  • headers (Mapping[str, str])

  • data (Union[bytes, str, IO[Any]])

  • timeout (float)

Return type:

requests.Response

async delete(url, headers, params=None, timeout=10)
Parameters:
  • url (str)

  • headers (Mapping[str, str])

  • params (Optional[Mapping[str, Union[int, str]]])

  • timeout (float)

Return type:

requests.Response

async head(url, headers=None, timeout=10, params=None, allow_redirects=False)
Parameters:
  • url (str)

  • headers (Optional[Mapping[str, str]])

  • timeout (float)

  • params (Optional[Mapping[str, Union[int, str]]])

  • allow_redirects (bool)

Return type:

requests.Response

async request(method, url, headers, auto_raise_for_status=True, **kwargs)
Parameters:
  • method (str)

  • url (str)

  • headers (Mapping[str, str])

  • auto_raise_for_status (bool)

  • kwargs (Any)

Return type:

requests.Response

async close()
Return type:

None