brk-code

httpx2 の API リファレンス

httpx2 (pydantic/httpx2) の公開 API 120 件 —— クラス 58、関数 5、メソッド 57。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: pydantic/httpx2

種別件数
クラス58
関数5
メソッド57

API 一覧

classsrc.httpcore2.httpcore2._async.connection_pool.AsyncConnectionPool
A connection pool for making HTTP requests.
methodsrc.httpcore2.httpcore2._async.connection_pool.AsyncConnectionPool.handle_async_request(request:Request) -> Response
Send an HTTP request, and return an HTTP response.
classsrc.httpcore2.httpcore2._models.Request
An HTTP request.
classsrc.httpcore2.httpcore2._models.Response
An HTTP response.
classsrc.httpcore2.httpcore2._models.URL
Represents the URL against which an HTTP request may be made.
funcsrc.httpcore2.httpcore2._models.enforce_url(value:URL | bytes | str, *name:str) -> URL
Type check for URL parameters.
classsrc.httpcore2.httpcore2._sync.connection_pool.ConnectionPool
A connection pool for making HTTP requests.
methodsrc.httpcore2.httpcore2._sync.connection_pool.ConnectionPool.handle_request(request:Request) -> Response
Send an HTTP request, and return an HTTP response.
classsrc.httpcore2.httpcore2._synchronization.AsyncLock
This is a standard lock.
classsrc.httpcore2.httpcore2._synchronization.AsyncThreadLock
This is a threading-only lock for no-I/O contexts.
classsrc.httpcore2.httpcore2._synchronization.Lock
This is a standard lock.
classsrc.httpcore2.httpcore2._synchronization.ThreadLock
This is a threading-only lock for no-I/O contexts.
classsrc.httpx2.httpx2._auth.Auth
Base class for all authentication schemes.
methodsrc.httpx2.httpx2._auth.Auth.async_auth_flow(request:Request) -> typing.AsyncGenerator[Request, Response]
Execute the authentication flow asynchronously.
methodsrc.httpx2.httpx2._auth.Auth.auth_flow(request:Request) -> typing.Generator[Request, Response, None]
Execute the authentication flow.
methodsrc.httpx2.httpx2._auth.Auth.sync_auth_flow(request:Request) -> typing.Generator[Request, Response, None]
Execute the authentication flow synchronously.
methodsrc.httpx2.httpx2._client.AsyncClient.aclose() -> None
Close transport and proxies.
methodsrc.httpx2.httpx2._client.AsyncClient.send(request:Request, *stream:bool=False, *auth:AuthTypes | UseClientDefault | None=USE_CLIENT_DEFAULT, *follow_redirects:bool | UseClientDefault=USE_CLIENT_DEFAULT) -> Response
Send a request.
methodsrc.httpx2.httpx2._client.BaseClient.cookies() -> Cookies
Cookie values to include when sending requests.
methodsrc.httpx2.httpx2._client.BaseClient.headers() -> Headers
HTTP headers to include when sending requests.
methodsrc.httpx2.httpx2._client.BaseClient.is_closed() -> bool
Check if the client being closed
classsrc.httpx2.httpx2._client.BoundSyncStream
A byte stream that tracks elapsed time for a response.
methodsrc.httpx2.httpx2._client.Client.close() -> None
Close transport and proxies.
methodsrc.httpx2.httpx2._client.Client.send(request:Request, *stream:bool=False, *auth:AuthTypes | UseClientDefault | None=USE_CLIENT_DEFAULT, *follow_redirects:bool | UseClientDefault=USE_CLIENT_DEFAULT) -> Response
Send a request.
classsrc.httpx2.httpx2._config.Limits
Configuration for limits to various client behaviors.
classsrc.httpx2.httpx2._config.Timeout
Timeout configuration.
classsrc.httpx2.httpx2._decoders.BrotliDecoder
Handle 'brotli' decoding.
classsrc.httpx2.httpx2._decoders.ByteChunker
Handles returning byte content in fixed-size chunks.
classsrc.httpx2.httpx2._decoders.DeflateDecoder
Handle 'deflate' decoding.
classsrc.httpx2.httpx2._decoders.GZipDecoder
Handle 'gzip' decoding.
classsrc.httpx2.httpx2._decoders.IdentityDecoder
Handle unencoded data.
classsrc.httpx2.httpx2._decoders.LineDecoder
Handles incrementally reading lines from text.
classsrc.httpx2.httpx2._decoders.MultiDecoder
Handle the case where multiple encodings have been applied.
classsrc.httpx2.httpx2._decoders.TextChunker
Handles returning text content in fixed-size chunks.
classsrc.httpx2.httpx2._decoders.TextDecoder
Handles incrementally decoding bytes into text
classsrc.httpx2.httpx2._decoders.ZStandardDecoder
Handle 'zstd' RFC 8878 decoding.
classsrc.httpx2.httpx2._exceptions.CloseError
Failed to close a connection.
classsrc.httpx2.httpx2._exceptions.ConnectError
Failed to establish a connection.
classsrc.httpx2.httpx2._exceptions.ConnectTimeout
Timed out while connecting to the host.
classsrc.httpx2.httpx2._exceptions.DecodingError
Decoding of the response failed, due to a malformed encoding.
classsrc.httpx2.httpx2._exceptions.HTTPError
Base class for `RequestError` and `HTTPStatusError`.
classsrc.httpx2.httpx2._exceptions.HTTPStatusError
The response had an error HTTP status of 4xx or 5xx.
classsrc.httpx2.httpx2._exceptions.HTTPXDeprecationWarning
A custom deprecation warning for HTTPX.
classsrc.httpx2.httpx2._exceptions.InvalidURL
URL is improperly formed or cannot be parsed.
classsrc.httpx2.httpx2._exceptions.LocalProtocolError
A protocol was violated by the client.
classsrc.httpx2.httpx2._exceptions.NetworkError
The base class for network-related errors.
classsrc.httpx2.httpx2._exceptions.PoolTimeout
Timed out waiting to acquire a connection from the pool.
classsrc.httpx2.httpx2._exceptions.ProtocolError
The protocol was violated.
classsrc.httpx2.httpx2._exceptions.ProxyError
An error occurred while establishing a proxy connection.
classsrc.httpx2.httpx2._exceptions.ReadError
Failed to receive data from the network.
classsrc.httpx2.httpx2._exceptions.ReadTimeout
Timed out while receiving data from the host.
classsrc.httpx2.httpx2._exceptions.RemoteProtocolError
The protocol was violated by the server.
classsrc.httpx2.httpx2._exceptions.RequestError
Base class for all exceptions that may occur when issuing a `.request()`.
classsrc.httpx2.httpx2._exceptions.StreamError
The base class for stream exceptions.
classsrc.httpx2.httpx2._exceptions.TimeoutException
The base class for timeout errors.
classsrc.httpx2.httpx2._exceptions.TooManyRedirects
Too many redirects.
classsrc.httpx2.httpx2._exceptions.TransportError
Base class for all exceptions that occur at the level of the Transport API.
classsrc.httpx2.httpx2._exceptions.UnsupportedProtocol
Attempted to make a request to an unsupported protocol.
classsrc.httpx2.httpx2._exceptions.WriteError
Failed to send data through the network.
classsrc.httpx2.httpx2._exceptions.WriteTimeout
Timed out while sending data to the host.
classsrc.httpx2.httpx2._models.Cookies
HTTP Cookies, as a mutable mapping.
methodsrc.httpx2.httpx2._models.Cookies.clear(domain:str | None=None, path:str | None=None) -> None
Delete all cookies.
methodsrc.httpx2.httpx2._models.Cookies.delete(name:str, domain:str | None=None, path:str | None=None) -> None
Delete a cookie by name.
methodsrc.httpx2.httpx2._models.Cookies.extract_cookies(response:Response) -> None
Loads any cookies based on the response `Set-Cookie` headers.
methodsrc.httpx2.httpx2._models.Cookies.get(name:str, default:str | None=None, domain:str | None=None, path:str | None=None) -> str | None
Get a cookie by name.
methodsrc.httpx2.httpx2._models.Cookies.set(name:str, value:str, domain:str='', path:str='/') -> None
Set a cookie value by name.
methodsrc.httpx2.httpx2._models.Cookies.set_cookie_header(request:Request) -> None
Sets an appropriate 'Cookie:' HTTP header on the `Request`.
classsrc.httpx2.httpx2._models.Headers
HTTP headers, as a case-insensitive multi-dict.
methodsrc.httpx2.httpx2._models.Headers.get(key:str, default:typing.Any=None) -> typing.Any
Return a header value.
methodsrc.httpx2.httpx2._models.Headers.get_list(key:str, split_commas:bool=False) -> list[str]
Return a list of all header values for a given key.
methodsrc.httpx2.httpx2._models.Headers.items() -> typing.ItemsView[str, str]
Return `(key, value)` items of headers.
methodsrc.httpx2.httpx2._models.Headers.multi_items() -> list[tuple[str, str]]
Return a list of `(key, value)` pairs of headers.
methodsrc.httpx2.httpx2._models.Request.aread() -> bytes
Read and return the request content.
methodsrc.httpx2.httpx2._models.Request.read() -> bytes
Read and return the request content.
methodsrc.httpx2.httpx2._models.Response.aclose() -> None
Close the response and release the connection.
methodsrc.httpx2.httpx2._models.Response.aiter_bytes(chunk_size:int | None=None) -> typing.AsyncIterator[bytes]
A byte-iterator over the decoded response content.
methodsrc.httpx2.httpx2._models.Response.aiter_raw(chunk_size:int | None=None) -> typing.AsyncIterator[bytes]
A byte-iterator over the raw response content.
methodsrc.httpx2.httpx2._models.Response.aread() -> bytes
Read and return the response content.
methodsrc.httpx2.httpx2._models.Response.close() -> None
Close the response and release the connection.
methodsrc.httpx2.httpx2._models.Response.iter_bytes(chunk_size:int | None=None) -> typing.Iterator[bytes]
A byte-iterator over the decoded response content.
methodsrc.httpx2.httpx2._models.Response.iter_raw(chunk_size:int | None=None) -> typing.Iterator[bytes]
A byte-iterator over the raw response content.
methodsrc.httpx2.httpx2._models.Response.raise_for_status() -> Response
Raise the `HTTPStatusError` if one occurred.
methodsrc.httpx2.httpx2._models.Response.read() -> bytes
Read and return the response content.
methodsrc.httpx2.httpx2._models.Response.url() -> URL
Returns the URL for which the request was made.
classsrc.httpx2.httpx2._multipart.DataField
A single form field item, within a multipart form field.
classsrc.httpx2.httpx2._multipart.FileField
A single file field item, within a multipart form field.
classsrc.httpx2.httpx2._multipart.MultipartStream
Request content as streaming multipart encoded form data.
methodsrc.httpx2.httpx2._transports.base.BaseTransport.handle_request(request:Request) -> Response
Send a single HTTP request and return a response.
funcsrc.httpx2.httpx2._urlparse.normalize_path(path:str) -> str
Drop "." and ".." segments from a URL path.
funcsrc.httpx2.httpx2._urlparse.percent_encoded(string:str, safe:str) -> str
Use percent-encoding to quote a string.
classsrc.httpx2.httpx2._urls.QueryParams
URL query parameters, as a multi-dict.
methodsrc.httpx2.httpx2._urls.QueryParams.get(key:typing.Any, default:typing.Any=None) -> typing.Any
Get a value from the query param for a given key.
methodsrc.httpx2.httpx2._urls.QueryParams.get_list(key:str) -> list[str]
Get all values from the query param for a given key.
methodsrc.httpx2.httpx2._urls.QueryParams.items() -> typing.ItemsView[str, str]
Return all items in the query params.
methodsrc.httpx2.httpx2._urls.QueryParams.keys() -> typing.KeysView[str]
Return all the keys in the query params.
methodsrc.httpx2.httpx2._urls.QueryParams.merge(params:QueryParamTypes | None=None) -> QueryParams
Return a new QueryParams instance, updated with.
methodsrc.httpx2.httpx2._urls.QueryParams.multi_items() -> list[tuple[str, str]]
Return all items in the query params.
methodsrc.httpx2.httpx2._urls.QueryParams.remove(key:str) -> QueryParams
Return a new QueryParams instance, removing the value of a key.
methodsrc.httpx2.httpx2._urls.QueryParams.set(key:str, value:typing.Any=None) -> QueryParams
Return a new QueryParams instance, setting the value of a key.
methodsrc.httpx2.httpx2._urls.QueryParams.values() -> typing.ValuesView[str]
Return all the values in the query params.
methodsrc.httpx2.httpx2._urls.URL.copy_with(**kwargs:typing.Any) -> URL
Copy this URL, returning a new URL with some components altered.
methodsrc.httpx2.httpx2._urls.URL.fragment() -> str
The URL fragments, as used in HTML anchors.
methodsrc.httpx2.httpx2._urls.URL.host() -> str
The URL host as a string.
methodsrc.httpx2.httpx2._urls.URL.join(url:URL | str) -> URL
Return an absolute URL, using this URL as the base.
methodsrc.httpx2.httpx2._urls.URL.netloc() -> bytes
Either `<host>` or `<host>:<port>` as bytes.
methodsrc.httpx2.httpx2._urls.URL.password() -> str
The URL password as a string, with URL decoding applied.
methodsrc.httpx2.httpx2._urls.URL.path() -> str
The URL path as a string.
methodsrc.httpx2.httpx2._urls.URL.port() -> int | None
The URL port as an integer.
methodsrc.httpx2.httpx2._urls.URL.raw_host() -> bytes
The raw bytes representation of the URL host.
methodsrc.httpx2.httpx2._urls.URL.raw_path() -> bytes
The complete URL path and query string as raw bytes.
methodsrc.httpx2.httpx2._urls.URL.scheme() -> str
The URL scheme, such as "http", "https".
methodsrc.httpx2.httpx2._urls.URL.userinfo() -> bytes
The URL userinfo as a raw bytestring.
methodsrc.httpx2.httpx2._urls.URL.username() -> str
The URL username as a string, with URL decoding applied.
funcsrc.httpx2.httpx2._utils.get_environment_proxies() -> dict[str, str | None]
Gets proxy information from the environment
funcsrc.httpx2.httpx2._utils.primitive_value_to_str(value:PrimitiveData) -> str
Coerce a primitive data type into a string value.
classsrc.httpx2.httpx2.websockets._api.AsyncWebSocketClient
An async WebSocket client.
classsrc.httpx2.httpx2.websockets._api.WebSocketClient
A sync WebSocket client.
classsrc.httpx2.httpx2.websockets._exceptions.HTTPXWSException
Base exception class for HTTPX WS.
classsrc.httpx2.httpx2.websockets._exceptions.WebSocketDisconnect
Raised when the server closed the WebSocket session.
classsrc.httpx2.httpx2.websockets._exceptions.WebSocketInvalidTypeReceived
Raised when a event is not of the expected type.

この情報について

掲載しているシグネチャは pydantic/httpx2 の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る