lothc 0.2.3__cp315-cp315-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lothc/__init__.py +76 -0
- lothc/_client.py +1609 -0
- lothc/_compat.py +129 -0
- lothc/_decode.py +401 -0
- lothc/_encode.py +121 -0
- lothc/_errors.py +266 -0
- lothc/_form.py +252 -0
- lothc/_headers.py +250 -0
- lothc/_mocking.py +679 -0
- lothc/_native.cp315-win_amd64.pyd +0 -0
- lothc/_native.pyi +376 -0
- lothc/_native_loop.py +230 -0
- lothc/_oauth.py +871 -0
- lothc/_response.py +61 -0
- lothc/_retry.py +141 -0
- lothc/_settings.py +136 -0
- lothc/_sse.py +362 -0
- lothc/_streaming.py +524 -0
- lothc/_sync_client.py +1665 -0
- lothc/_transport_native.py +1823 -0
- lothc/_transport_pyreqwest.py +1427 -0
- lothc/_types.py +99 -0
- lothc/py.typed +0 -0
- lothc/testing.py +430 -0
- lothc-0.2.3.dist-info/METADATA +140 -0
- lothc-0.2.3.dist-info/RECORD +30 -0
- lothc-0.2.3.dist-info/WHEEL +4 -0
- lothc-0.2.3.dist-info/entry_points.txt +2 -0
- lothc-0.2.3.dist-info/licenses/LICENSE +21 -0
- lothc-0.2.3.dist-info/sboms/lothc-native.cyclonedx.json +6322 -0
lothc/__init__.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
from ._client import HTTPClient
|
|
2
|
+
from ._errors import (
|
|
3
|
+
HTTPConnectionError,
|
|
4
|
+
HTTPResponseError,
|
|
5
|
+
HTTPTimeoutError,
|
|
6
|
+
HTTPTransportError,
|
|
7
|
+
)
|
|
8
|
+
from ._headers import CaseInsensitiveDict
|
|
9
|
+
from ._oauth import (
|
|
10
|
+
OAuthProvider,
|
|
11
|
+
OAuthTokenError,
|
|
12
|
+
SyncOAuthProvider,
|
|
13
|
+
TokenRefreshRequestTyping,
|
|
14
|
+
TokenRequestTyping,
|
|
15
|
+
TokenResponseTyping,
|
|
16
|
+
)
|
|
17
|
+
from ._response import (
|
|
18
|
+
RequestInfo,
|
|
19
|
+
Response,
|
|
20
|
+
)
|
|
21
|
+
from ._settings import TlsVersion
|
|
22
|
+
from ._sse import SSEEvent
|
|
23
|
+
from ._sync_client import SyncHTTPClient
|
|
24
|
+
from ._types import (
|
|
25
|
+
AuthProvider,
|
|
26
|
+
Data,
|
|
27
|
+
File,
|
|
28
|
+
Form,
|
|
29
|
+
Headers,
|
|
30
|
+
JSONPayload,
|
|
31
|
+
Params,
|
|
32
|
+
SyncAuthProvider,
|
|
33
|
+
TypedHeaders,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"AuthProvider",
|
|
38
|
+
"CaseInsensitiveDict",
|
|
39
|
+
"Data",
|
|
40
|
+
"File",
|
|
41
|
+
"Form",
|
|
42
|
+
"HTTPClient",
|
|
43
|
+
"HTTPConnectionError",
|
|
44
|
+
"HTTPResponseError",
|
|
45
|
+
"HTTPTimeoutError",
|
|
46
|
+
"HTTPTransportError",
|
|
47
|
+
"Headers",
|
|
48
|
+
"JSONPayload",
|
|
49
|
+
"OAuthProvider",
|
|
50
|
+
"OAuthTokenError",
|
|
51
|
+
"Params",
|
|
52
|
+
"RequestInfo",
|
|
53
|
+
"Response",
|
|
54
|
+
"SSEEvent",
|
|
55
|
+
"SyncAuthProvider",
|
|
56
|
+
"SyncHTTPClient",
|
|
57
|
+
"SyncOAuthProvider",
|
|
58
|
+
"TlsVersion",
|
|
59
|
+
"TokenRefreshRequestTyping",
|
|
60
|
+
"TokenRequestTyping",
|
|
61
|
+
"TokenResponseTyping",
|
|
62
|
+
"TypedHeaders",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# Report every public class as `lothc.<Name>`, the path callers import it from, rather than the
|
|
67
|
+
# private module it lives in, so tracebacks and reprs read `lothc.HTTPResponseError` (httpx does
|
|
68
|
+
# the same). Pickle still finds each class, since `lothc` exports it.
|
|
69
|
+
def _report_as_public(namespace: dict[str, object], names: list[str], module: str) -> None:
|
|
70
|
+
for name in names:
|
|
71
|
+
exported = namespace[name]
|
|
72
|
+
if isinstance(exported, type):
|
|
73
|
+
exported.__module__ = module
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
_report_as_public(globals(), __all__, __name__)
|