auth.session

Attributes

log

Timeout

_MAX_ERROR_BODY_BYTES

Classes

BaseSession

Helper class that provides a standard way to create an ABC using

Module Contents

auth.session.log
class auth.session.BaseSession(session=None, timeout=10, verify_ssl=True)

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

Parameters:
  • session (requests.Session | None)

  • timeout (float)

  • verify_ssl (bool)

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

Return type:

requests.Session | None

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

Parameters:
  • url (str)

  • headers (collections.abc.Mapping[str, str])

  • data (bytes | str | IO[AnyStr] | None)

  • timeout (float)

  • params (collections.abc.Mapping[str, int | str] | None)

Return type:

requests.Response

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

Parameters:
  • url (str)

  • headers (collections.abc.Mapping[str, str] | None)

  • timeout (float)

  • params (collections.abc.Mapping[str, int | str] | None)

  • stream (bool)

  • auto_decompress (bool | None)

Return type:

requests.Response

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

Parameters:
  • url (str)

  • headers (collections.abc.Mapping[str, str])

  • data (bytes | str | None)

  • timeout (float)

  • params (collections.abc.Mapping[str, int | str] | None)

Return type:

requests.Response

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

Parameters:
  • url (str)

  • headers (collections.abc.Mapping[str, str])

  • data (bytes | str | IO[Any])

  • timeout (float)

Return type:

requests.Response

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

Parameters:
  • url (str)

  • headers (collections.abc.Mapping[str, str])

  • params (collections.abc.Mapping[str, int | str] | None)

  • timeout (float)

Return type:

requests.Response

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

Parameters:
  • url (str)

  • headers (collections.abc.Mapping[str, str] | None)

  • timeout (float)

  • params (collections.abc.Mapping[str, int | str] | None)

  • allow_redirects (bool)

Return type:

requests.Response

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

Parameters:
  • method (str)

  • url (str)

  • headers (collections.abc.Mapping[str, str])

  • auto_raise_for_status (bool)

  • kwargs (Any)

Return type:

requests.Response

abstractmethod close()
Async:

Return type:

None

auth.session.Timeout
auth.session._MAX_ERROR_BODY_BYTES = 4096