urllib3 の API リファレンス
urllib3 (urllib3/urllib3) の公開 API 89 件 —— クラス 34、関数 34、メソッド 21。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: urllib3/urllib3
| 種別 | 件数 |
|---|---|
| クラス | 34 |
| 関数 | 34 |
| メソッド | 21 |
API 一覧
func
dummyserver.app.alpn_protocol() -> ResponseReturnValueReturn the requester's certificate.
func
dummyserver.app.certificate() -> ResponseReturnValueReturn the requester's certificate.
func
dummyserver.app.echo() -> ResponseReturnValueEcho back the params
func
dummyserver.app.echo_json() -> ResponseReturnValueEcho back the JSON
func
dummyserver.app.echo_params() -> ResponseReturnValueEcho back the query parameters
func
dummyserver.app.echo_uri(rest:str) -> ResponseReturnValueEcho back the requested URI
func
dummyserver.app.encodingrequest() -> ResponseReturnValueCheck for UA accepting gzip/deflate encoding
func
dummyserver.app.multi_redirect() -> ResponseReturnValuePerforms a redirect chain based on ``redirect_codes``
func
dummyserver.app.redirect() -> ResponseReturnValuePerform a redirect to ``target``
func
dummyserver.app.redirect_after() -> ResponseReturnValuePerform a redirect to ``target``
func
dummyserver.app.source_address() -> ResponseReturnValueReturn the requester's IP address.
func
dummyserver.app.specific_method() -> ResponseReturnValueConfirm that the request matches the desired method type
func
dummyserver.app.upload() -> ResponseReturnValueConfirm that the uploaded file conforms to specification
class
dummyserver.socketserver.NoIPv6WarningIPv6 is not available
method
dummyserver.testcase.ConnectionMarker.consume_request(sock:socket.socket, chunks:int=65536) -> bytearrayConsume a socket until after the HTTP request is sent.
method
dummyserver.testcase.ConnectionMarker.mark(monkeypatch:pytest.MonkeyPatch) -> typing.Generator[None]Mark connections under in that context.
class
src.urllib3._collections.HTTPHeaderDict:param headers: An iterable of field-value pairs.
method
src.urllib3._collections.HTTPHeaderDict.extend(*args:ValidHTTPHeaderSource, **kwargs:str) -> NoneGeneric import function for any type of header-like object.
func
src.urllib3.add_stderr_logger(level:int=logging.DEBUG) -> logging.StreamHandler[typing.TextIO]Helper for quickly adding a StreamHandler to the logger.
class
src.urllib3.connection.DummyConnectionUsed to detect a failed ConnectionCls import.
method
src.urllib3.connection.HTTPConnection.getresponse() -> HTTPResponseGet the response from the server.
method
src.urllib3.connectionpool.ConnectionPool.close() -> NoneClose all pooled connections and disable the pool.
class
src.urllib3.connectionpool.HTTPConnectionPoolThread-safe connection pool for one host.
method
src.urllib3.connectionpool.HTTPConnectionPool.close() -> NoneClose all pooled connections and disable the pool.
class
src.urllib3.connectionpool.HTTPSConnectionPoolSame as :class:`.HTTPConnectionPool`, but HTTPS.
func
src.urllib3.contrib.emscripten.fetch.has_jspi() -> boolReturn true if jspi can be used.
func
src.urllib3.contrib.pyopenssl.extract_from_urllib3() -> NoneUndo monkey-patching by :func:`inject_into_urllib3`.
func
src.urllib3.contrib.pyopenssl.idna_encode(name:str) -> bytes | NoneBorrowed wholesale from the Python Cryptography Project.
func
src.urllib3.disable_warnings(category:type[Warning]=exceptions.HTTPWarning) -> NoneHelper for quickly disabling all urllib3 warnings.
class
src.urllib3.exceptions.DecodeErrorRaised when automatic decoding based on Content-Type fails.
class
src.urllib3.exceptions.HTTPErrorBase exception used by this module.
class
src.urllib3.exceptions.HTTPWarningBase warning used by this module.
class
src.urllib3.exceptions.InsecureRequestWarningWarned when making an unverified HTTPS request.
class
src.urllib3.exceptions.InvalidChunkLengthInvalid chunk length in a chunked response.
class
src.urllib3.exceptions.InvalidHeaderThe header provided was somehow invalid.
class
src.urllib3.exceptions.LocationValueErrorRaised when there is something wrong with a given URL input.
class
src.urllib3.exceptions.MaxRetryErrorRaised when the maximum number of retries is exceeded.
class
src.urllib3.exceptions.NameResolutionErrorRaised when host name resolution fails.
class
src.urllib3.exceptions.NewConnectionErrorRaised when we fail to establish a new connection.
class
src.urllib3.exceptions.NotOpenSSLWarningWarned when using unsupported SSL library
class
src.urllib3.exceptions.PoolErrorBase exception for errors caused within a pool.
class
src.urllib3.exceptions.ProtocolErrorRaised when something unexpected happens mid-request/response.
class
src.urllib3.exceptions.ProxyErrorRaised when the connection to a proxy fails.
class
src.urllib3.exceptions.ProxySchemeUnknownProxyManager does not support the supplied scheme
class
src.urllib3.exceptions.RequestErrorBase exception for PoolErrors that have associated URLs.
class
src.urllib3.exceptions.ResponseNotChunkedResponse needs to be chunked in order to read it as chunks.
class
src.urllib3.exceptions.SSLErrorRaised when SSL certificate fails in an HTTPS connection.
class
src.urllib3.exceptions.SecurityWarningWarned when performing security reducing actions
class
src.urllib3.exceptions.SystemTimeWarningWarned when system time is suspected to be wrong
class
src.urllib3.exceptions.TimeoutErrorRaised when a socket timeout error occurs.
class
src.urllib3.exceptions.TimeoutStateErrorRaised when passing an invalid state to a timeout
class
src.urllib3.exceptions.URLSchemeUnknownRaised when a URL input has an unsupported scheme.
class
src.urllib3.exceptions.UnrewindableBodyErrorurllib3 encountered an error when trying to rewind a body
class
src.urllib3.fields.RequestFieldA data container for request body parameters.
method
src.urllib3.fields.RequestField.render_headers() -> strRenders the headers for this request field.
func
src.urllib3.fields.format_header_param(name:str, value:_TYPE_FIELD_VALUE) -> str..
func
src.urllib3.fields.format_header_param_html5(name:str, value:_TYPE_FIELD_VALUE) -> str..
func
src.urllib3.fields.format_multipart_header_param(name:str, value:_TYPE_FIELD_VALUE) -> strFormat and quote a single multipart header parameter.
func
src.urllib3.fields.guess_content_type(filename:str | None, default:str='application/octet-stream') -> strGuess the "Content-Type" of a file.
func
src.urllib3.filepost.iter_field_objects(fields:_TYPE_FIELDS) -> typing.Iterable[RequestField]Iterate over fields.
class
src.urllib3.response.HTTPResponseHTTP Response container.
method
src.urllib3.response.HTTPResponse.stream(amt:int | None=_READ_CHUNK_SIZE, decode_content:bool | None=None) -> typing.Generator[bytes]A generator wrapper for the read() method.
method
src.urllib3.response.HTTPResponse.tell() -> intObtain the number of bytes pulled over the wire so far.
method
src.urllib3.response.HTTPResponse.url() -> str | NoneReturns the URL that was the source of this response.
func
src.urllib3.util.connection.is_connection_dropped(conn:BaseHTTPConnection) -> boolReturns True if the connection is dropped and should be closed.
func
src.urllib3.util.request.rewind_body(body:typing.IO[typing.AnyStr], body_pos:_TYPE_BODY_POSITION) -> NoneAttempt to rewind body to a certain position.
func
src.urllib3.util.request.set_file_position(body:typing.Any, pos:_TYPE_BODY_POSITION | None) -> _TYPE_BODY_POSITION | NoneIf a position is provided, move file to that point.
func
src.urllib3.util.response.assert_header_parsing(headers:httplib.HTTPMessage) -> NoneAsserts whether all headers have been successfully parsed.
func
src.urllib3.util.response.is_fp_closed(obj:object) -> boolChecks whether a given file-like object is closed.
class
src.urllib3.util.retry.RetryRetry configuration.
method
src.urllib3.util.retry.Retry.get_backoff_time() -> floatFormula for computing the current backoff :rtype: float
method
src.urllib3.util.retry.Retry.get_retry_after(response:BaseHTTPResponse) -> float | NoneGet the value of Retry-After in seconds.
method
src.urllib3.util.retry.Retry.is_exhausted() -> boolAre we out of retries?
method
src.urllib3.util.retry.Retry.is_retry(method:str, status_code:int, has_retry_after:bool=False) -> boolIs this method/status code retryable?
method
src.urllib3.util.retry.Retry.sleep(response:BaseHTTPResponse | None=None) -> NoneSleep between retry attempts.
func
src.urllib3.util.ssl_.assert_fingerprint(cert:bytes | None, fingerprint:str) -> NoneChecks if given fingerprint matches the supplied certificate.
func
src.urllib3.util.ssl_.is_ipaddress(hostname:str | bytes) -> boolDetects whether the hostname given is an IPv4 or IPv6 address.
func
src.urllib3.util.ssl_.resolve_ssl_version(candidate:None | int | str) -> intlike resolve_cert_reqs
class
src.urllib3.util.timeout.TimeoutTimeout configuration.
method
src.urllib3.util.timeout.Timeout.from_float(timeout:_TYPE_TIMEOUT) -> TimeoutCreate a new Timeout from a legacy timeout value.
method
src.urllib3.util.timeout.Timeout.read_timeout() -> float | NoneGet the value for the read timeout.
class
src.urllib3.util.url.UrlData structure for representing an HTTP URL.
method
src.urllib3.util.url.Url.authority() -> str | NoneAuthority component as defined in RFC 3986 3.2.
method
src.urllib3.util.url.Url.hostname() -> str | NoneFor backwards-compatibility with urlparse.
method
src.urllib3.util.url.Url.netloc() -> str | NoneNetwork location including host and port.
method
src.urllib3.util.url.Url.request_uri() -> strAbsolute path including the query string.
func
src.urllib3.util.url.parse_url(url:str) -> UrlGiven a url, return a parsed :class:`.Url` namedtuple.
func
src.urllib3.util.wait.wait_for_read(sock:socket.socket, timeout:float | None=None) -> boolWaits for reading to be available on a given socket.
func
src.urllib3.util.wait.wait_for_write(sock:socket.socket, timeout:float | None=None) -> boolWaits for writing to be available on a given socket.
この情報について
掲載しているシグネチャは urllib3/urllib3 の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。