__init__.py 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. __version__ = "3.7.4.post0"
  2. from typing import Tuple
  3. from . import hdrs as hdrs
  4. from .client import (
  5. BaseConnector as BaseConnector,
  6. ClientConnectionError as ClientConnectionError,
  7. ClientConnectorCertificateError as ClientConnectorCertificateError,
  8. ClientConnectorError as ClientConnectorError,
  9. ClientConnectorSSLError as ClientConnectorSSLError,
  10. ClientError as ClientError,
  11. ClientHttpProxyError as ClientHttpProxyError,
  12. ClientOSError as ClientOSError,
  13. ClientPayloadError as ClientPayloadError,
  14. ClientProxyConnectionError as ClientProxyConnectionError,
  15. ClientRequest as ClientRequest,
  16. ClientResponse as ClientResponse,
  17. ClientResponseError as ClientResponseError,
  18. ClientSession as ClientSession,
  19. ClientSSLError as ClientSSLError,
  20. ClientTimeout as ClientTimeout,
  21. ClientWebSocketResponse as ClientWebSocketResponse,
  22. ContentTypeError as ContentTypeError,
  23. Fingerprint as Fingerprint,
  24. InvalidURL as InvalidURL,
  25. NamedPipeConnector as NamedPipeConnector,
  26. RequestInfo as RequestInfo,
  27. ServerConnectionError as ServerConnectionError,
  28. ServerDisconnectedError as ServerDisconnectedError,
  29. ServerFingerprintMismatch as ServerFingerprintMismatch,
  30. ServerTimeoutError as ServerTimeoutError,
  31. TCPConnector as TCPConnector,
  32. TooManyRedirects as TooManyRedirects,
  33. UnixConnector as UnixConnector,
  34. WSServerHandshakeError as WSServerHandshakeError,
  35. request as request,
  36. )
  37. from .cookiejar import CookieJar as CookieJar, DummyCookieJar as DummyCookieJar
  38. from .formdata import FormData as FormData
  39. from .helpers import BasicAuth as BasicAuth, ChainMapProxy as ChainMapProxy
  40. from .http import (
  41. HttpVersion as HttpVersion,
  42. HttpVersion10 as HttpVersion10,
  43. HttpVersion11 as HttpVersion11,
  44. WebSocketError as WebSocketError,
  45. WSCloseCode as WSCloseCode,
  46. WSMessage as WSMessage,
  47. WSMsgType as WSMsgType,
  48. )
  49. from .multipart import (
  50. BadContentDispositionHeader as BadContentDispositionHeader,
  51. BadContentDispositionParam as BadContentDispositionParam,
  52. BodyPartReader as BodyPartReader,
  53. MultipartReader as MultipartReader,
  54. MultipartWriter as MultipartWriter,
  55. content_disposition_filename as content_disposition_filename,
  56. parse_content_disposition as parse_content_disposition,
  57. )
  58. from .payload import (
  59. PAYLOAD_REGISTRY as PAYLOAD_REGISTRY,
  60. AsyncIterablePayload as AsyncIterablePayload,
  61. BufferedReaderPayload as BufferedReaderPayload,
  62. BytesIOPayload as BytesIOPayload,
  63. BytesPayload as BytesPayload,
  64. IOBasePayload as IOBasePayload,
  65. JsonPayload as JsonPayload,
  66. Payload as Payload,
  67. StringIOPayload as StringIOPayload,
  68. StringPayload as StringPayload,
  69. TextIOPayload as TextIOPayload,
  70. get_payload as get_payload,
  71. payload_type as payload_type,
  72. )
  73. from .payload_streamer import streamer as streamer
  74. from .resolver import (
  75. AsyncResolver as AsyncResolver,
  76. DefaultResolver as DefaultResolver,
  77. ThreadedResolver as ThreadedResolver,
  78. )
  79. from .signals import Signal as Signal
  80. from .streams import (
  81. EMPTY_PAYLOAD as EMPTY_PAYLOAD,
  82. DataQueue as DataQueue,
  83. EofStream as EofStream,
  84. FlowControlDataQueue as FlowControlDataQueue,
  85. StreamReader as StreamReader,
  86. )
  87. from .tracing import (
  88. TraceConfig as TraceConfig,
  89. TraceConnectionCreateEndParams as TraceConnectionCreateEndParams,
  90. TraceConnectionCreateStartParams as TraceConnectionCreateStartParams,
  91. TraceConnectionQueuedEndParams as TraceConnectionQueuedEndParams,
  92. TraceConnectionQueuedStartParams as TraceConnectionQueuedStartParams,
  93. TraceConnectionReuseconnParams as TraceConnectionReuseconnParams,
  94. TraceDnsCacheHitParams as TraceDnsCacheHitParams,
  95. TraceDnsCacheMissParams as TraceDnsCacheMissParams,
  96. TraceDnsResolveHostEndParams as TraceDnsResolveHostEndParams,
  97. TraceDnsResolveHostStartParams as TraceDnsResolveHostStartParams,
  98. TraceRequestChunkSentParams as TraceRequestChunkSentParams,
  99. TraceRequestEndParams as TraceRequestEndParams,
  100. TraceRequestExceptionParams as TraceRequestExceptionParams,
  101. TraceRequestRedirectParams as TraceRequestRedirectParams,
  102. TraceRequestStartParams as TraceRequestStartParams,
  103. TraceResponseChunkReceivedParams as TraceResponseChunkReceivedParams,
  104. )
  105. __all__: Tuple[str, ...] = (
  106. "hdrs",
  107. # client
  108. "BaseConnector",
  109. "ClientConnectionError",
  110. "ClientConnectorCertificateError",
  111. "ClientConnectorError",
  112. "ClientConnectorSSLError",
  113. "ClientError",
  114. "ClientHttpProxyError",
  115. "ClientOSError",
  116. "ClientPayloadError",
  117. "ClientProxyConnectionError",
  118. "ClientResponse",
  119. "ClientRequest",
  120. "ClientResponseError",
  121. "ClientSSLError",
  122. "ClientSession",
  123. "ClientTimeout",
  124. "ClientWebSocketResponse",
  125. "ContentTypeError",
  126. "Fingerprint",
  127. "InvalidURL",
  128. "RequestInfo",
  129. "ServerConnectionError",
  130. "ServerDisconnectedError",
  131. "ServerFingerprintMismatch",
  132. "ServerTimeoutError",
  133. "TCPConnector",
  134. "TooManyRedirects",
  135. "UnixConnector",
  136. "NamedPipeConnector",
  137. "WSServerHandshakeError",
  138. "request",
  139. # cookiejar
  140. "CookieJar",
  141. "DummyCookieJar",
  142. # formdata
  143. "FormData",
  144. # helpers
  145. "BasicAuth",
  146. "ChainMapProxy",
  147. # http
  148. "HttpVersion",
  149. "HttpVersion10",
  150. "HttpVersion11",
  151. "WSMsgType",
  152. "WSCloseCode",
  153. "WSMessage",
  154. "WebSocketError",
  155. # multipart
  156. "BadContentDispositionHeader",
  157. "BadContentDispositionParam",
  158. "BodyPartReader",
  159. "MultipartReader",
  160. "MultipartWriter",
  161. "content_disposition_filename",
  162. "parse_content_disposition",
  163. # payload
  164. "AsyncIterablePayload",
  165. "BufferedReaderPayload",
  166. "BytesIOPayload",
  167. "BytesPayload",
  168. "IOBasePayload",
  169. "JsonPayload",
  170. "PAYLOAD_REGISTRY",
  171. "Payload",
  172. "StringIOPayload",
  173. "StringPayload",
  174. "TextIOPayload",
  175. "get_payload",
  176. "payload_type",
  177. # payload_streamer
  178. "streamer",
  179. # resolver
  180. "AsyncResolver",
  181. "DefaultResolver",
  182. "ThreadedResolver",
  183. # signals
  184. "Signal",
  185. "DataQueue",
  186. "EMPTY_PAYLOAD",
  187. "EofStream",
  188. "FlowControlDataQueue",
  189. "StreamReader",
  190. # tracing
  191. "TraceConfig",
  192. "TraceConnectionCreateEndParams",
  193. "TraceConnectionCreateStartParams",
  194. "TraceConnectionQueuedEndParams",
  195. "TraceConnectionQueuedStartParams",
  196. "TraceConnectionReuseconnParams",
  197. "TraceDnsCacheHitParams",
  198. "TraceDnsCacheMissParams",
  199. "TraceDnsResolveHostEndParams",
  200. "TraceDnsResolveHostStartParams",
  201. "TraceRequestChunkSentParams",
  202. "TraceRequestEndParams",
  203. "TraceRequestExceptionParams",
  204. "TraceRequestRedirectParams",
  205. "TraceRequestStartParams",
  206. "TraceResponseChunkReceivedParams",
  207. )
  208. try:
  209. from .worker import GunicornUVLoopWebWorker, GunicornWebWorker
  210. __all__ += ("GunicornWebWorker", "GunicornUVLoopWebWorker")
  211. except ImportError: # pragma: no cover
  212. pass