eggfetch 0.1.8__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.
Files changed (57) hide show
  1. eggfetch/__init__.py +146 -0
  2. eggfetch/__init__.pyi +89 -0
  3. eggfetch/_native.cp315-win_amd64.pyd +0 -0
  4. eggfetch/_native.pyi +341 -0
  5. eggfetch/_ssl_context.py +531 -0
  6. eggfetch/compat/__init__.py +3 -0
  7. eggfetch/compat/httpx/__init__.py +649 -0
  8. eggfetch/compat/httpx/__init__.pyi +119 -0
  9. eggfetch/compat/httpx/_asgi.py +174 -0
  10. eggfetch/compat/httpx/_auth.py +460 -0
  11. eggfetch/compat/httpx/_client.py +2638 -0
  12. eggfetch/compat/httpx/_cookies.py +265 -0
  13. eggfetch/compat/httpx/_diagnostics.py +59 -0
  14. eggfetch/compat/httpx/_exceptions.py +197 -0
  15. eggfetch/compat/httpx/_headers.py +205 -0
  16. eggfetch/compat/httpx/_limits.py +53 -0
  17. eggfetch/compat/httpx/_mock.py +124 -0
  18. eggfetch/compat/httpx/_proxy.py +121 -0
  19. eggfetch/compat/httpx/_request.py +443 -0
  20. eggfetch/compat/httpx/_response.py +782 -0
  21. eggfetch/compat/httpx/_ssl_context.py +17 -0
  22. eggfetch/compat/httpx/_status_codes.py +74 -0
  23. eggfetch/compat/httpx/_stream.py +54 -0
  24. eggfetch/compat/httpx/_timeout.py +166 -0
  25. eggfetch/compat/httpx/_transports.py +312 -0
  26. eggfetch/compat/httpx/_urls.py +424 -0
  27. eggfetch/compat/httpx/_wsgi.py +161 -0
  28. eggfetch/compat/httpx2/__init__.py +257 -0
  29. eggfetch/compat/httpx2/__init__.pyi +100 -0
  30. eggfetch/compat/httpx2/_alias.py +79 -0
  31. eggfetch/compat/httpx2/_api.py +220 -0
  32. eggfetch/compat/httpx2/_asgi.py +7 -0
  33. eggfetch/compat/httpx2/_auth.py +40 -0
  34. eggfetch/compat/httpx2/_client.py +279 -0
  35. eggfetch/compat/httpx2/_config.py +49 -0
  36. eggfetch/compat/httpx2/_cookies.py +7 -0
  37. eggfetch/compat/httpx2/_exceptions.py +80 -0
  38. eggfetch/compat/httpx2/_headers.py +51 -0
  39. eggfetch/compat/httpx2/_mock.py +7 -0
  40. eggfetch/compat/httpx2/_request.py +7 -0
  41. eggfetch/compat/httpx2/_response.py +7 -0
  42. eggfetch/compat/httpx2/_sse.py +214 -0
  43. eggfetch/compat/httpx2/_status_codes.py +108 -0
  44. eggfetch/compat/httpx2/_stream.py +7 -0
  45. eggfetch/compat/httpx2/_transports.py +7 -0
  46. eggfetch/compat/httpx2/_urls.py +75 -0
  47. eggfetch/compat/httpx2/_wsgi.py +7 -0
  48. eggfetch/compat/httpx2/websockets/__init__.py +57 -0
  49. eggfetch/compat/httpx2/websockets/_api.py +1664 -0
  50. eggfetch/compat/httpx2/websockets/_exceptions.py +55 -0
  51. eggfetch/compat/httpx2/websockets/_ping.py +43 -0
  52. eggfetch/compat/httpx2/websockets/_transport.py +289 -0
  53. eggfetch/py.typed +1 -0
  54. eggfetch-0.1.8.dist-info/METADATA +253 -0
  55. eggfetch-0.1.8.dist-info/RECORD +57 -0
  56. eggfetch-0.1.8.dist-info/WHEEL +4 -0
  57. eggfetch-0.1.8.dist-info/sboms/eggfetch-python.cyclonedx.json +5821 -0
eggfetch/__init__.py ADDED
@@ -0,0 +1,146 @@
1
+ """eggfetch - Python bindings for the eggfetch HTTP client engine.
2
+
3
+ Provides both sync and async APIs over the async Rust core via PyO3.
4
+ The sync API blocks on the async engine while releasing the GIL.
5
+ The async API integrates with asyncio.
6
+ """
7
+
8
+ from eggfetch._native import (
9
+ __version__,
10
+ AsyncClient,
11
+ AsyncNetworkStream,
12
+ AsyncStreamingBytesIterator,
13
+ AsyncStreamingLinesIterator,
14
+ AsyncStreamingRawBytesIterator,
15
+ AsyncStreamingTextIterator,
16
+ BasicAuth,
17
+ BearerAuth,
18
+ Client,
19
+ NetworkStream,
20
+ Cookie,
21
+ Cookies,
22
+ File,
23
+ Headers,
24
+ Limits,
25
+ NoAuth,
26
+ Response,
27
+ StreamingBytesIterator,
28
+ StreamingLinesIterator,
29
+ StreamingRawBytesIterator,
30
+ StreamingResponse,
31
+ StreamingTextIterator,
32
+ Timeout,
33
+ NOAUTH,
34
+ # Top-level helpers
35
+ request,
36
+ get,
37
+ post,
38
+ put,
39
+ patch,
40
+ delete,
41
+ head,
42
+ options,
43
+ # Exceptions
44
+ EggfetchError,
45
+ RequestError,
46
+ InvalidUrl,
47
+ TimeoutException,
48
+ PoolTimeout,
49
+ ConnectTimeout,
50
+ ReadTimeout,
51
+ WriteTimeout,
52
+ NetworkError,
53
+ ProtocolError,
54
+ BodyError,
55
+ DecompressionError,
56
+ UnsupportedContentEncoding,
57
+ HTTPStatusError,
58
+ UnsupportedKwarg,
59
+ TooManyRedirects,
60
+ StreamConsumed,
61
+ StreamClosed,
62
+ ResponseNotRead,
63
+ ProxyError,
64
+ ProxyConnectError,
65
+ ProxyAuthError,
66
+ Retry,
67
+ BodyNotReplayableForRetry,
68
+ RetryBudgetExhausted,
69
+ RetryNotConfigured,
70
+ Http2Error,
71
+ Http2GoAway,
72
+ Http2StreamReset,
73
+ Http2FlowControlError,
74
+ H3Error,
75
+ H3ConnectError,
76
+ H3ProtocolError,
77
+ )
78
+
79
+ __all__ = [
80
+ "__version__",
81
+ "AsyncClient",
82
+ "AsyncNetworkStream",
83
+ "AsyncStreamingBytesIterator",
84
+ "AsyncStreamingLinesIterator",
85
+ "AsyncStreamingRawBytesIterator",
86
+ "AsyncStreamingTextIterator",
87
+ "BasicAuth",
88
+ "BearerAuth",
89
+ "Client",
90
+ "NetworkStream",
91
+ "Cookie",
92
+ "Cookies",
93
+ "File",
94
+ "Headers",
95
+ "Limits",
96
+ "NoAuth",
97
+ "NOAUTH",
98
+ "Response",
99
+ "StreamingBytesIterator",
100
+ "StreamingLinesIterator",
101
+ "StreamingRawBytesIterator",
102
+ "StreamingResponse",
103
+ "StreamingTextIterator",
104
+ "Timeout",
105
+ "request",
106
+ "get",
107
+ "post",
108
+ "put",
109
+ "patch",
110
+ "delete",
111
+ "head",
112
+ "options",
113
+ "EggfetchError",
114
+ "RequestError",
115
+ "InvalidUrl",
116
+ "TimeoutException",
117
+ "PoolTimeout",
118
+ "ConnectTimeout",
119
+ "ReadTimeout",
120
+ "WriteTimeout",
121
+ "NetworkError",
122
+ "ProtocolError",
123
+ "BodyError",
124
+ "DecompressionError",
125
+ "UnsupportedContentEncoding",
126
+ "HTTPStatusError",
127
+ "UnsupportedKwarg",
128
+ "TooManyRedirects",
129
+ "StreamConsumed",
130
+ "StreamClosed",
131
+ "ResponseNotRead",
132
+ "ProxyError",
133
+ "ProxyConnectError",
134
+ "ProxyAuthError",
135
+ "Retry",
136
+ "BodyNotReplayableForRetry",
137
+ "RetryBudgetExhausted",
138
+ "RetryNotConfigured",
139
+ "Http2Error",
140
+ "Http2GoAway",
141
+ "Http2StreamReset",
142
+ "Http2FlowControlError",
143
+ "H3Error",
144
+ "H3ConnectError",
145
+ "H3ProtocolError",
146
+ ]
eggfetch/__init__.pyi ADDED
@@ -0,0 +1,89 @@
1
+ """Reviewed public typing surface for the native :mod:`eggfetch` package."""
2
+
3
+ from ._native import (
4
+ AsyncClient,
5
+ AsyncNetworkStream,
6
+ AsyncStreamingBytesIterator,
7
+ AsyncStreamingLinesIterator,
8
+ AsyncStreamingRawBytesIterator,
9
+ AsyncStreamingTextIterator,
10
+ BasicAuth,
11
+ BearerAuth,
12
+ BodyError,
13
+ BodyNotReplayableForRetry,
14
+ Client,
15
+ ConnectTimeout,
16
+ Cookie,
17
+ Cookies,
18
+ DecompressionError,
19
+ EggfetchError,
20
+ File,
21
+ H3ConnectError,
22
+ H3Error,
23
+ H3ProtocolError,
24
+ Headers,
25
+ Http2Error,
26
+ Http2FlowControlError,
27
+ Http2GoAway,
28
+ Http2StreamReset,
29
+ HTTPStatusError,
30
+ InvalidUrl,
31
+ Limits,
32
+ NetworkError,
33
+ NetworkStream,
34
+ NoAuth,
35
+ NOAUTH,
36
+ options,
37
+ PoolTimeout,
38
+ ProtocolError,
39
+ ProxyAuthError,
40
+ ProxyConnectError,
41
+ ProxyError,
42
+ ReadTimeout,
43
+ RequestError,
44
+ request,
45
+ Response,
46
+ ResponseNotRead,
47
+ Retry,
48
+ RetryBudgetExhausted,
49
+ RetryNotConfigured,
50
+ StreamingBytesIterator,
51
+ StreamingLinesIterator,
52
+ StreamingRawBytesIterator,
53
+ StreamingResponse,
54
+ StreamingTextIterator,
55
+ StreamClosed,
56
+ StreamConsumed,
57
+ Timeout,
58
+ TimeoutException,
59
+ TooManyRedirects,
60
+ UnsupportedContentEncoding,
61
+ UnsupportedKwarg,
62
+ WriteTimeout,
63
+ delete,
64
+ get,
65
+ head,
66
+ patch,
67
+ post,
68
+ put,
69
+ __version__,
70
+ )
71
+
72
+ __all__ = [
73
+ "__version__", "AsyncClient", "AsyncNetworkStream",
74
+ "AsyncStreamingBytesIterator", "AsyncStreamingLinesIterator",
75
+ "AsyncStreamingRawBytesIterator", "AsyncStreamingTextIterator",
76
+ "BasicAuth", "BearerAuth", "Client", "NetworkStream", "Cookie",
77
+ "Cookies", "File", "Headers", "Limits", "NoAuth", "NOAUTH",
78
+ "Response", "StreamingBytesIterator", "StreamingLinesIterator",
79
+ "StreamingRawBytesIterator", "StreamingResponse", "StreamingTextIterator",
80
+ "Timeout", "request", "get", "post", "put", "patch", "delete", "head",
81
+ "options", "EggfetchError", "RequestError", "InvalidUrl", "TimeoutException",
82
+ "PoolTimeout", "ConnectTimeout", "ReadTimeout", "WriteTimeout", "NetworkError",
83
+ "ProtocolError", "BodyError", "DecompressionError", "UnsupportedContentEncoding",
84
+ "HTTPStatusError", "UnsupportedKwarg", "TooManyRedirects", "StreamConsumed",
85
+ "StreamClosed", "ResponseNotRead", "ProxyError", "ProxyConnectError",
86
+ "ProxyAuthError", "Retry", "BodyNotReplayableForRetry", "RetryBudgetExhausted",
87
+ "RetryNotConfigured", "Http2Error", "Http2GoAway", "Http2StreamReset",
88
+ "Http2FlowControlError", "H3Error", "H3ConnectError", "H3ProtocolError",
89
+ ]
Binary file
eggfetch/_native.pyi ADDED
@@ -0,0 +1,341 @@
1
+ """Reviewed stubs for the private PyO3 extension.
2
+
3
+ The extension is private at runtime. The public package imports the names
4
+ listed explicitly in ``__init__.pyi``; the type aliases below are typing-only
5
+ conveniences and are not runtime exports.
6
+ """
7
+
8
+ from collections.abc import AsyncIterable, AsyncIterator, Iterable, Iterator, Mapping, Sequence
9
+ import ssl
10
+ from typing import Any, Self, TypeAlias, TypeVar, overload
11
+
12
+ BytesLike: TypeAlias = bytes | bytearray | memoryview
13
+ SyncBody: TypeAlias = BytesLike | str | Iterable[BytesLike | str]
14
+ AsyncBody: TypeAlias = AsyncIterable[BytesLike | str]
15
+ HeadersInput: TypeAlias = Mapping[str, str] | Sequence[tuple[str, str]]
16
+ Auth: TypeAlias = BasicAuth | BearerAuth | NoAuth
17
+ Verify: TypeAlias = bool | str | ssl.SSLContext | list[bytes]
18
+ Cert: TypeAlias = str | tuple[str, str]
19
+
20
+
21
+ class EggfetchError(Exception): ...
22
+ class RequestError(EggfetchError): ...
23
+ class InvalidUrl(RequestError): ...
24
+ class TimeoutException(RequestError): ...
25
+ class PoolTimeout(TimeoutException): ...
26
+ class ConnectTimeout(TimeoutException): ...
27
+ class ReadTimeout(TimeoutException): ...
28
+ class WriteTimeout(TimeoutException): ...
29
+ class NetworkError(RequestError): ...
30
+ class ProtocolError(RequestError): ...
31
+ class BodyError(RequestError): ...
32
+ class DecompressionError(RequestError): ...
33
+ class UnsupportedContentEncoding(RequestError): ...
34
+ class TooManyRedirects(RequestError): ...
35
+ class ProxyError(RequestError): ...
36
+ class ProxyConnectError(ProxyError): ...
37
+ class ProxyAuthError(ProxyError): ...
38
+ class BodyNotReplayableForRetry(RequestError): ...
39
+ class RetryBudgetExhausted(RequestError): ...
40
+ class RetryNotConfigured(RequestError): ...
41
+ class Http2Error(RequestError): ...
42
+ class Http2GoAway(Http2Error): ...
43
+ class Http2StreamReset(Http2Error): ...
44
+ class Http2FlowControlError(Http2Error): ...
45
+ class H3Error(RequestError): ...
46
+ class H3ConnectError(H3Error): ...
47
+ class H3ProtocolError(H3Error): ...
48
+ class HTTPStatusError(EggfetchError): ...
49
+ class UnsupportedKwarg(EggfetchError): ...
50
+ class StreamConsumed(EggfetchError): ...
51
+ class StreamClosed(EggfetchError): ...
52
+ class ResponseNotRead(EggfetchError): ...
53
+
54
+
55
+ class Headers:
56
+ def __init__(self, value: HeadersInput | None = ..., **kwargs: str) -> None: ...
57
+ def __getitem__(self, key: str) -> str: ...
58
+ def __contains__(self, key: str) -> bool: ...
59
+ def __iter__(self) -> Iterator[str]: ...
60
+ def __len__(self) -> int: ...
61
+ def get(self, name: str, default: str | None = ...) -> str | None: ...
62
+ def keys(self) -> list[str]: ...
63
+ def values(self) -> list[str]: ...
64
+ def items(self) -> list[tuple[str, str]]: ...
65
+ def get_list(self, name: str) -> list[str]: ...
66
+
67
+
68
+ class Cookie:
69
+ name: str
70
+ value: str
71
+ domain: str
72
+ is_host_only: bool
73
+ path: str
74
+ is_secure: bool
75
+ is_http_only: bool
76
+ same_site: str | None
77
+ expires: float | None
78
+ is_persistent: bool
79
+ name_value_pair: str
80
+
81
+
82
+ _CookieDefaultT = TypeVar("_CookieDefaultT")
83
+
84
+
85
+ class Cookies:
86
+ def __init__(self) -> None: ...
87
+ def __getitem__(self, key: str) -> Cookie: ...
88
+ def __contains__(self, key: str) -> bool: ...
89
+ def __iter__(self) -> Iterator[str]: ...
90
+ def __len__(self) -> int: ...
91
+ def __setitem__(self, key: str, value: Cookie) -> None: ...
92
+ def __delitem__(self, key: str) -> None: ...
93
+ @overload
94
+ def get(self, name: str, default: None = ...) -> Cookie | None: ...
95
+ @overload
96
+ def get(self, name: str, default: _CookieDefaultT) -> Cookie | _CookieDefaultT: ...
97
+ def set(self, name: str, value: str, *, domain: str | None = ..., path: str | None = ...) -> None: ...
98
+ def clear(self) -> None: ...
99
+ def values(self) -> list[Cookie]: ...
100
+ def items(self) -> list[tuple[str, Cookie]]: ...
101
+
102
+
103
+ class Timeout:
104
+ def __init__(
105
+ self,
106
+ seconds: float | None = ...,
107
+ *,
108
+ pool: float | None = ...,
109
+ connect: float | None = ...,
110
+ write: float | None = ...,
111
+ read: float | None = ...,
112
+ total: float | None = ...,
113
+ ) -> None: ...
114
+ pool: float | None
115
+ connect: float | None
116
+ write: float | None
117
+ read: float | None
118
+ total: float | None
119
+ def has_any(self) -> bool: ...
120
+
121
+
122
+ class Limits:
123
+ def __init__(
124
+ self,
125
+ *,
126
+ max_connections: int | None = ...,
127
+ max_keepalive_connections: int | None = ...,
128
+ keepalive_expiry: float | None = ...,
129
+ max_connections_per_host: int | None = ...,
130
+ ) -> None: ...
131
+ max_connections: int | None
132
+ max_keepalive_connections: int | None
133
+ keepalive_expiry: float | None
134
+ max_connections_per_host: int | None
135
+
136
+
137
+ class Retry:
138
+ def __init__(
139
+ self,
140
+ max_attempts: int = ...,
141
+ backoff_factor: float = ...,
142
+ max_delay: float = ...,
143
+ initial_delay: float = ...,
144
+ statuses: Sequence[int] | None = ...,
145
+ respect_retry_after: bool = ...,
146
+ allow_post: bool = ...,
147
+ allow_put: bool = ...,
148
+ allow_delete: bool = ...,
149
+ allow_patch: bool = ...,
150
+ max_elapsed: float | None = ...,
151
+ ) -> None: ...
152
+ max_attempts: int
153
+ backoff_factor: float
154
+ initial_delay: float
155
+ max_delay: float
156
+ respect_retry_after: bool
157
+ statuses: list[int]
158
+ max_elapsed: float | None
159
+ allow_post: bool
160
+ allow_put: bool
161
+ allow_delete: bool
162
+ allow_patch: bool
163
+
164
+
165
+ class BasicAuth:
166
+ def __init__(self, username: str, password: str = ...) -> None: ...
167
+ username: str
168
+
169
+
170
+ class BearerAuth:
171
+ def __init__(self, token: str) -> None: ...
172
+
173
+
174
+ class NoAuth: ...
175
+ NOAUTH: NoAuth
176
+
177
+
178
+ class File:
179
+ def __init__(self, path: str, *, filename: str | None = ..., content_type: str | None = ...) -> None: ...
180
+ path: str
181
+ filename: str
182
+ content_type: str
183
+
184
+
185
+ class NetworkStream:
186
+ def read(self, max_bytes: int = ..., timeout: float | None = ...) -> bytes: ...
187
+ def write(self, data: bytes, timeout: float | None = ...) -> None: ...
188
+ def close(self) -> None: ...
189
+ def get_extra_info(self, key: str) -> str | None: ...
190
+ @property
191
+ def is_upgraded(self) -> bool: ...
192
+ def start_tls(self, ssl_context: ssl.SSLContext | None, server_hostname: str, *, timeout: float | None = ...) -> NetworkStream: ...
193
+
194
+
195
+ class AsyncNetworkStream:
196
+ async def read(self, max_bytes: int = ..., timeout: float | None = ...) -> bytes: ...
197
+ async def write(self, data: bytes, timeout: float | None = ...) -> None: ...
198
+ async def aclose(self) -> None: ...
199
+ def get_extra_info(self, key: str) -> str | None: ...
200
+ @property
201
+ def is_upgraded(self) -> bool: ...
202
+ async def start_tls(self, ssl_context: ssl.SSLContext | None, server_hostname: str, *, timeout: float | None = ...) -> AsyncNetworkStream: ...
203
+
204
+
205
+ class Response:
206
+ status_code: int
207
+ headers: Headers
208
+ url: str
209
+ reason_phrase: str
210
+ http_version: str
211
+ encoding: str | None
212
+ history: list[Response]
213
+ cookies: Cookies
214
+ extensions: dict[str, Any]
215
+ content: bytes
216
+ text: str
217
+ is_informational: bool
218
+ is_success: bool
219
+ is_redirect: bool
220
+ is_client_error: bool
221
+ is_server_error: bool
222
+ is_error: bool
223
+ def json(self, **kwargs: Any) -> Any: ...
224
+ def iter_bytes(self, chunk_size: int = ...) -> Iterator[bytes]: ...
225
+ def iter_text(self, chunk_size: int = ...) -> Iterator[str]: ...
226
+ def iter_lines(self) -> Iterator[str]: ...
227
+ def raise_for_status(self) -> None: ...
228
+ def close(self) -> None: ...
229
+ async def aclose(self) -> None: ...
230
+
231
+
232
+ class StreamingResponse:
233
+ status_code: int
234
+ headers: Headers
235
+ url: str
236
+ reason_phrase: str
237
+ http_version: str
238
+ encoding: str | None
239
+ history: list[Response]
240
+ cookies: Cookies
241
+ extensions: dict[str, Any]
242
+ network_stream: NetworkStream | AsyncNetworkStream | None
243
+ is_informational: bool
244
+ is_success: bool
245
+ is_redirect: bool
246
+ is_client_error: bool
247
+ is_server_error: bool
248
+ is_error: bool
249
+ def __enter__(self) -> Self: ...
250
+ def __exit__(self, _exc_type: Any = ..., _exc_value: Any = ..., _traceback: Any = ...) -> bool: ...
251
+ async def __aenter__(self) -> Self: ...
252
+ async def __aexit__(self, _exc_type: Any = ..., _exc_value: Any = ..., _traceback: Any = ...) -> bool: ...
253
+ def iter_bytes(self, *, chunk_size: int = ...) -> Iterator[bytes]: ...
254
+ def iter_text(self, *, chunk_size: int = ..., encoding: str | None = ...) -> Iterator[str]: ...
255
+ def iter_lines(self, *, chunk_size: int = ..., encoding: str | None = ...) -> Iterator[str]: ...
256
+ def iter_raw(self, *, chunk_size: int | None = ...) -> Iterator[bytes]: ...
257
+ def aiter_bytes(self, *, chunk_size: int = ...) -> AsyncIterator[bytes]: ...
258
+ def aiter_text(self, *, chunk_size: int = ..., encoding: str | None = ...) -> AsyncIterator[str]: ...
259
+ def aiter_lines(self, *, chunk_size: int = ..., encoding: str | None = ...) -> AsyncIterator[str]: ...
260
+ def aiter_raw(self, *, chunk_size: int | None = ...) -> AsyncIterator[bytes]: ...
261
+ def read(self) -> bytes: ...
262
+ def text(self) -> str: ...
263
+ async def aread(self) -> bytes: ...
264
+ def raise_for_status(self) -> None: ...
265
+ def close(self) -> None: ...
266
+ async def aclose(self) -> None: ...
267
+
268
+
269
+ class StreamingBytesIterator(Iterator[bytes]):
270
+ def __iter__(self) -> Self: ...
271
+ def __next__(self) -> bytes: ...
272
+ class StreamingTextIterator(Iterator[str]):
273
+ def __iter__(self) -> Self: ...
274
+ def __next__(self) -> str: ...
275
+ class StreamingLinesIterator(Iterator[str]):
276
+ def __iter__(self) -> Self: ...
277
+ def __next__(self) -> str: ...
278
+ class StreamingRawBytesIterator(Iterator[bytes]):
279
+ def __iter__(self) -> Self: ...
280
+ def __next__(self) -> bytes: ...
281
+ class AsyncStreamingBytesIterator(AsyncIterator[bytes]):
282
+ def __aiter__(self) -> Self: ...
283
+ async def __anext__(self) -> bytes: ...
284
+ class AsyncStreamingTextIterator(AsyncIterator[str]):
285
+ def __aiter__(self) -> Self: ...
286
+ async def __anext__(self) -> str: ...
287
+ class AsyncStreamingLinesIterator(AsyncIterator[str]):
288
+ def __aiter__(self) -> Self: ...
289
+ async def __anext__(self) -> str: ...
290
+ class AsyncStreamingRawBytesIterator(AsyncIterator[bytes]):
291
+ def __aiter__(self) -> Self: ...
292
+ async def __anext__(self) -> bytes: ...
293
+
294
+
295
+ class Client:
296
+ def __init__(self, *, headers: HeadersInput | None = ..., timeout: float | Timeout | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., http1: bool | None = ..., http2: bool | None = ..., http3: bool | None = ..., limits: Limits | None = ..., trust_env: bool | None = ..., local_address: str | None = ..., socket_options: Sequence[tuple[int, ...]] | None = ..., uds: str | None = ...) -> None: ...
297
+ is_closed: bool
298
+ cookies: Cookies
299
+ def __enter__(self) -> Self: ...
300
+ def __exit__(self, _exc_type: Any = ..., _exc_value: Any = ..., _traceback: Any = ...) -> bool: ...
301
+ def request(self, method: str, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
302
+ def get(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
303
+ def post(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
304
+ def put(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
305
+ def patch(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
306
+ def delete(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
307
+ def head(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
308
+ def options(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
309
+ def stream(self, method: str, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> StreamingResponse: ...
310
+ def close(self) -> None: ...
311
+
312
+
313
+ class AsyncClient:
314
+ def __init__(self, *, headers: HeadersInput | None = ..., timeout: float | Timeout | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., http1: bool | None = ..., http2: bool | None = ..., http3: bool | None = ..., limits: Limits | None = ..., trust_env: bool | None = ..., local_address: str | None = ..., socket_options: Sequence[tuple[int, ...]] | None = ..., uds: str | None = ...) -> None: ...
315
+ is_closed: bool
316
+ cookies: Cookies
317
+ async def __aenter__(self) -> Self: ...
318
+ async def __aexit__(self, _exc_type: Any = ..., _exc_value: Any = ..., _traceback: Any = ...) -> bool: ...
319
+ async def request(self, method: str, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | AsyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
320
+ async def get(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
321
+ async def post(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | AsyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
322
+ async def put(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | AsyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
323
+ async def patch(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | AsyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
324
+ async def delete(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
325
+ async def head(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
326
+ async def options(self, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> Response: ...
327
+ async def stream(self, method: str, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | AsyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., extensions: Mapping[str, Any] | None = ...) -> StreamingResponse: ...
328
+ def close(self) -> None: ...
329
+ async def aclose(self) -> None: ...
330
+
331
+
332
+ def request(method: str, url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., limits: Limits | None = ...) -> Response: ...
333
+ def get(url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., limits: Limits | None = ...) -> Response: ...
334
+ def post(url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., limits: Limits | None = ...) -> Response: ...
335
+ def put(url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., limits: Limits | None = ...) -> Response: ...
336
+ def patch(url: str, *, headers: HeadersInput | None = ..., params: Any = ..., content: SyncBody | None = ..., data: Any = ..., json: Any = ..., files: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., limits: Limits | None = ...) -> Response: ...
337
+ def delete(url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., limits: Limits | None = ...) -> Response: ...
338
+ def head(url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., limits: Limits | None = ...) -> Response: ...
339
+ def options(url: str, *, headers: HeadersInput | None = ..., params: Any = ..., timeout: float | Timeout | None = ..., cookies: Cookies | Mapping[str, str] | None = ..., auth: Auth | None = ..., follow_redirects: bool | None = ..., max_redirects: int | None = ..., decompress: bool | None = ..., proxy: str | None = ..., verify: Verify | None = ..., cert: Cert | None = ..., retries: Retry | None = ..., limits: Limits | None = ...) -> Response: ...
340
+
341
+ __version__: str