2023-05-01 09:30:57 +00:00
|
|
|
from typing import TypeVar, Union, Mapping, Optional, Sequence, Dict, List, Tuple, Any
|
|
|
|
|
|
|
|
RT = TypeVar("RT", bound="BaseClient")
|
|
|
|
|
|
|
|
|
|
|
|
CookieTypes = Union["Cookie", Dict[str, str], List[Tuple[str, str]]]
|
|
|
|
RequestData = Mapping[str, Any]
|
|
|
|
PrimitiveData = Optional[Union[str, int, float, bool]]
|
|
|
|
QueryParamTypes = Union[
|
|
|
|
"QueryParams",
|
|
|
|
Mapping[str, Union[PrimitiveData, Sequence[PrimitiveData]]],
|
|
|
|
List[Tuple[str, PrimitiveData]],
|
|
|
|
Tuple[Tuple[str, PrimitiveData], ...],
|
|
|
|
str,
|
|
|
|
bytes,
|
|
|
|
]
|
|
|
|
HeaderTypes = Union[
|
|
|
|
"Headers",
|
|
|
|
Mapping[str, str],
|
|
|
|
Mapping[bytes, bytes],
|
|
|
|
Sequence[Tuple[str, str]],
|
|
|
|
Sequence[Tuple[bytes, bytes]],
|
|
|
|
]
|
2023-05-01 13:35:51 +00:00
|
|
|
TimeoutTypes = Union[
|
|
|
|
Optional[float],
|
|
|
|
Tuple[Optional[float], Optional[float], Optional[float], Optional[float]],
|
|
|
|
"Timeout",
|
|
|
|
]
|