http API Reference
Full documentation for http (Standard Library / Native)
http.HTTPMethod
Python Library Documentation: class HTTPMethod in module http
class HTTPMethod(enum.StrEnum)
| HTTPMethod(*values)
|
| HTTP methods and descriptions
|
| Methods from the following RFCs are all observed:
|
| * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
| * RFC 5789: PATCH Method for HTTP
|
| Method resolution order:
| HTTPMethod
| enum.StrEnum
| builtins.str
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.str
| Return a formatted version of the string as described by format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self, /) from builtins.str
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CONNECT = <HTTPMethod.CONNECT>
|
| DELETE = <HTTPMethod.DELETE>
|
| GET = <HTTPMethod.GET>
|
| HEAD = <HTTPMethod.HEAD>
|
| OPTIONS = <HTTPMethod.OPTIONS>
|
| PATCH = <HTTPMethod.PATCH>
|
| POST = <HTTPMethod.POST>
|
| PUT = <HTTPMethod.PUT>
|
| TRACE = <HTTPMethod.TRACE>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
http.HTTPStatus
Python Library Documentation: class HTTPStatus in module http class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.IntEnum
Python Library Documentation: class IntEnum in module enum class IntEnum(builtins.int, ReprEnum) | IntEnum(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None) | | Enum where members are also (and must be) ints | | Method resolution order: | IntEnum | builtins.int | ReprEnum | Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.StrEnum
Python Library Documentation: class StrEnum in module enum
class StrEnum(builtins.str, ReprEnum)
| StrEnum(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)
|
| Enum where members are also (and must be) strings
|
| Method resolution order:
| StrEnum
| builtins.str
| ReprEnum
| Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.str
| Return a formatted version of the string as described by format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__(self, /) from builtins.str
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
http.client
Python Library Documentation: module http.client in http
NAME
http.client - HTTP/1.1 client library
MODULE REFERENCE
https://docs.python.org/3.12/library/http.client.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
<intro stuff goes here>
<other stuff, too>
HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:
(null)
|
| HTTPConnection()
v
Idle
|
| putrequest()
v
Request-started
|
| ( putheader() )* endheaders()
v
Request-sent
|\_____________________________
| | getresponse() raises
| response = getresponse() | ConnectionError
v v
Unread-response Idle
[Response-headers-read]
|\____________________
| |
| response.read() | putrequest()
v v
Idle Req-started-unread-response
______/|
/ |
response.read() | | ( putheader() )* endheaders()
v v
Request-started Req-sent-unread-response
|
| response.read()
v
Request-sent
This diagram presents the following rules:
-- a second request may not be started until {response-headers-read}
-- a response [object] cannot be retrieved until {request-sent}
-- there is no differentiation between an unread response body and a
partially read response body
Note: this enforcement is applied by the HTTPConnection class. The
HTTPResponse class does not enforce this state machine, which
implies sophisticated clients may accelerate the request/response
pipeline. Caution should be taken, though: accelerating the states
beyond the above pattern may imply knowledge of the server's
connection-close behavior for certain requests. For example, it
is impossible to tell whether the server will close the connection
UNTIL the response headers have been read; this means that further
requests cannot be placed into the pipeline until it is known that
the server will NOT be closing the connection.
Logical State __state __response
------------- ------- ----------
Idle _CS_IDLE None
Request-started _CS_REQ_STARTED None
Request-sent _CS_REQ_SENT None
Unread-response _CS_IDLE <response_class>
Req-started-unread-response _CS_REQ_STARTED <response_class>
Req-sent-unread-response _CS_REQ_SENT <response_class>
CLASSES
builtins.ConnectionResetError(builtins.ConnectionError)
RemoteDisconnected(builtins.ConnectionResetError, BadStatusLine)
builtins.Exception(builtins.BaseException)
HTTPException
BadStatusLine
RemoteDisconnected(builtins.ConnectionResetError, BadStatusLine)
ImproperConnectionState
CannotSendHeader
CannotSendRequest
ResponseNotReady
IncompleteRead
InvalidURL
LineTooLong
NotConnected
UnimplementedFileMode
UnknownProtocol
UnknownTransferEncoding
builtins.object
HTTPConnection
HTTPSConnection
io.BufferedIOBase(_io._BufferedIOBase, io.IOBase)
HTTPResponse
class BadStatusLine(HTTPException)
| BadStatusLine(line)
|
| Method resolution order:
| BadStatusLine
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, line)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class CannotSendHeader(ImproperConnectionState)
| Method resolution order:
| CannotSendHeader
| ImproperConnectionState
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class CannotSendRequest(ImproperConnectionState)
| Method resolution order:
| CannotSendRequest
| ImproperConnectionState
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class HTTPConnection(builtins.object)
| HTTPConnection(host, port=None, timeout=<object object at 0x0000017B07D78B30>, source_address=None, blocksize=8192)
|
| Methods defined here:
|
| __init__(self, host, port=None, timeout=<object object at 0x0000017B07D78B30>, source_address=None, blocksize=8192)
| Initialize self. See help(type(self)) for accurate signature.
|
| close(self)
| Close the connection to the HTTP server.
|
| connect(self)
| Connect to the host and port specified in __init__.
|
| endheaders(self, message_body=None, *, encode_chunked=False)
| Indicate that the last header line has been sent to the server.
|
| This method sends the request to the server. The optional message_body
| argument can be used to pass a message body associated with the
| request.
|
| get_proxy_response_headers(self)
| Returns a dictionary with the headers of the response
| received from the proxy server to the CONNECT request
| sent to set the tunnel.
|
| If the CONNECT request was not sent, the method returns None.
|
| getresponse(self)
| Get the response from the server.
|
| If the HTTPConnection is in the correct state, returns an
| instance of HTTPResponse or of whatever object is returned by
| the response_class variable.
|
| If a request has not been sent or if a previous response has
| not be handled, ResponseNotReady is raised. If the HTTP
| response indicates that the connection should be closed, then
| it will be closed before the response is returned. When the
| connection is closed, the underlying socket is closed.
|
| putheader(self, header, *values)
| Send a request header line to the server.
|
| For example: h.putheader('Accept', 'text/html')
|
| putrequest(self, method, url, skip_host=False, skip_accept_encoding=False)
| Send a request to the server.
|
| `method' specifies an HTTP request method, e.g. 'GET'.
| `url' specifies the object being requested, e.g. '/index.html'.
| `skip_host' if True does not add automatically a 'Host:' header
| `skip_accept_encoding' if True does not add automatically an
| 'Accept-Encoding:' header
|
| request(self, method, url, body=None, headers={}, *, encode_chunked=False)
| Send a complete request to the server.
|
| send(self, data)
| Send `data' to the server.
| ``data`` can be a string object, a bytes object, an array object, a
| file-like object that supports a .read() method, or an iterable object.
|
| set_debuglevel(self, level)
|
| set_tunnel(self, host, port=None, headers=None)
| Set up host and port for HTTP CONNECT tunnelling.
|
| In a connection that uses HTTP CONNECT tunnelling, the host passed to
| the constructor is used as a proxy server that relays all communication
| to the endpoint passed to `set_tunnel`. This done by sending an HTTP
| CONNECT request to the proxy server when the connection is established.
|
| This method must be called before the HTTP connection has been
| established.
|
| The headers argument should be a mapping of extra HTTP headers to send
| with the CONNECT request.
|
| As HTTP/1.1 is used for HTTP CONNECT tunnelling request, as per the RFC
| (https://tools.ietf.org/html/rfc7231#section-4.3.6), a HTTP Host:
| header must be provided, matching the authority-form of the request
| target provided as the destination for the CONNECT request. If a
| HTTP Host: header is not provided via the headers argument, one
| is generated and transmitted automatically.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| auto_open = 1
|
| debuglevel = 0
|
| default_port = 80
|
| response_class = <class 'http.client.HTTPResponse'>
class HTTPException(builtins.Exception)
| Method resolution order:
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class HTTPResponse(io.BufferedIOBase)
| HTTPResponse(sock, debuglevel=0, method=None, url=None)
|
| Method resolution order:
| HTTPResponse
| io.BufferedIOBase
| _io._BufferedIOBase
| io.IOBase
| _io._IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, sock, debuglevel=0, method=None, url=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self)
| Implement iter(self).
|
| begin(self)
|
| close(self)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| getcode(self)
| Return the HTTP status code that was sent with the response,
| or None if the URL is not an HTTP URL.
|
| getheader(self, name, default=None)
| Returns the value of the header matching *name*.
|
| If there are multiple matching headers, the values are
| combined into a single string separated by commas and spaces.
|
| If no matching header is found, returns *default* or None if
| the *default* is not specified.
|
| If the headers are unknown, raises http.client.ResponseNotReady.
|
| getheaders(self)
| Return list of (header, value) tuples.
|
| geturl(self)
| Return the real URL of the page.
|
| In some cases, the HTTP server redirects a client to another
| URL. The urlopen() function handles this transparently, but in
| some cases the caller needs to know which URL the client was
| redirected to. The geturl() method can be used to get at this
| redirected URL.
|
| info(self)
| Returns an instance of the class mimetools.Message containing
| meta-information associated with the URL.
|
| When the method is HTTP, these headers are those returned by
| the server at the head of the retrieved HTML page (including
| Content-Length and Content-Type).
|
| When the method is FTP, a Content-Length header will be
| present if (as is now usual) the server passed back a file
| length in response to the FTP retrieval request. A
| Content-Type header will be present if the MIME type can be
| guessed.
|
| When the method is local-file, returned headers will include
| a Date representing the file's last-modified time, a
| Content-Length giving file size, and a Content-Type
| containing a guess at the file's type. See also the
| description of the mimetools module.
|
| isclosed(self)
| True if the connection is closed.
|
| peek(self, n=-1)
|
| read(self, amt=None)
| Read and return the response body, or up to the next amt bytes.
|
| read1(self, n=-1)
| Read with at most one underlying system call. If at least one
| byte is buffered, return that instead.
|
| readable(self)
| Always returns True
|
| readinto(self, b)
| Read up to len(b) bytes into bytearray b and return the number
| of bytes read.
|
| readline(self, limit=-1)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._BufferedIOBase:
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| readinto1(self, buffer, /)
|
| write(self, b, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __next__(self, /)
| Implement next(self).
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class HTTPSConnection(HTTPConnection)
| HTTPSConnection(host, port=None, *, timeout=<object object at 0x0000017B07D78B30>, source_address=None, context=None, blocksize=8192)
|
| This class allows communication via SSL.
|
| Method resolution order:
| HTTPSConnection
| HTTPConnection
| builtins.object
|
| Methods defined here:
|
| __init__(self, host, port=None, *, timeout=<object object at 0x0000017B07D78B30>, source_address=None, context=None, blocksize=8192)
| Initialize self. See help(type(self)) for accurate signature.
|
| connect(self)
| Connect to a host on a given (SSL) port.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| default_port = 443
|
| ----------------------------------------------------------------------
| Methods inherited from HTTPConnection:
|
| close(self)
| Close the connection to the HTTP server.
|
| endheaders(self, message_body=None, *, encode_chunked=False)
| Indicate that the last header line has been sent to the server.
|
| This method sends the request to the server. The optional message_body
| argument can be used to pass a message body associated with the
| request.
|
| get_proxy_response_headers(self)
| Returns a dictionary with the headers of the response
| received from the proxy server to the CONNECT request
| sent to set the tunnel.
|
| If the CONNECT request was not sent, the method returns None.
|
| getresponse(self)
| Get the response from the server.
|
| If the HTTPConnection is in the correct state, returns an
| instance of HTTPResponse or of whatever object is returned by
| the response_class variable.
|
| If a request has not been sent or if a previous response has
| not be handled, ResponseNotReady is raised. If the HTTP
| response indicates that the connection should be closed, then
| it will be closed before the response is returned. When the
| connection is closed, the underlying socket is closed.
|
| putheader(self, header, *values)
| Send a request header line to the server.
|
| For example: h.putheader('Accept', 'text/html')
|
| putrequest(self, method, url, skip_host=False, skip_accept_encoding=False)
| Send a request to the server.
|
| `method' specifies an HTTP request method, e.g. 'GET'.
| `url' specifies the object being requested, e.g. '/index.html'.
| `skip_host' if True does not add automatically a 'Host:' header
| `skip_accept_encoding' if True does not add automatically an
| 'Accept-Encoding:' header
|
| request(self, method, url, body=None, headers={}, *, encode_chunked=False)
| Send a complete request to the server.
|
| send(self, data)
| Send `data' to the server.
| ``data`` can be a string object, a bytes object, an array object, a
| file-like object that supports a .read() method, or an iterable object.
|
| set_debuglevel(self, level)
|
| set_tunnel(self, host, port=None, headers=None)
| Set up host and port for HTTP CONNECT tunnelling.
|
| In a connection that uses HTTP CONNECT tunnelling, the host passed to
| the constructor is used as a proxy server that relays all communication
| to the endpoint passed to `set_tunnel`. This done by sending an HTTP
| CONNECT request to the proxy server when the connection is established.
|
| This method must be called before the HTTP connection has been
| established.
|
| The headers argument should be a mapping of extra HTTP headers to send
| with the CONNECT request.
|
| As HTTP/1.1 is used for HTTP CONNECT tunnelling request, as per the RFC
| (https://tools.ietf.org/html/rfc7231#section-4.3.6), a HTTP Host:
| header must be provided, matching the authority-form of the request
| target provided as the destination for the CONNECT request. If a
| HTTP Host: header is not provided via the headers argument, one
| is generated and transmitted automatically.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from HTTPConnection:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from HTTPConnection:
|
| auto_open = 1
|
| debuglevel = 0
|
| response_class = <class 'http.client.HTTPResponse'>
class ImproperConnectionState(HTTPException)
| Method resolution order:
| ImproperConnectionState
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class IncompleteRead(HTTPException)
| IncompleteRead(partial, expected=None)
|
| Method resolution order:
| IncompleteRead
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, partial, expected=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self, /) from builtins.object
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class InvalidURL(HTTPException)
| Method resolution order:
| InvalidURL
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class LineTooLong(HTTPException)
| LineTooLong(line_type)
|
| Method resolution order:
| LineTooLong
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, line_type)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class NotConnected(HTTPException)
| Method resolution order:
| NotConnected
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class RemoteDisconnected(builtins.ConnectionResetError, BadStatusLine)
| RemoteDisconnected(*pos, **kw)
|
| Method resolution order:
| RemoteDisconnected
| builtins.ConnectionResetError
| builtins.ConnectionError
| builtins.OSError
| BadStatusLine
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, *pos, **kw)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ResponseNotReady(ImproperConnectionState)
| Method resolution order:
| ResponseNotReady
| ImproperConnectionState
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnimplementedFileMode(HTTPException)
| Method resolution order:
| UnimplementedFileMode
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnknownProtocol(HTTPException)
| UnknownProtocol(version)
|
| Method resolution order:
| UnknownProtocol
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, version)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnknownTransferEncoding(HTTPException)
| Method resolution order:
| UnknownTransferEncoding
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from HTTPException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
error = class HTTPException(builtins.Exception)
| Method resolution order:
| HTTPException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
DATA
__all__ = ['HTTPResponse', 'HTTPConnection', 'HTTPException', 'NotConn...
responses = {<HTTPStatus.CONTINUE: 100>: 'Continue', <HTTPStatus.SWITC...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\http\client.py
http.cookiejar
Python Library Documentation: module http.cookiejar in http
NAME
http.cookiejar - HTTP cookie handling for web clients.
MODULE REFERENCE
https://docs.python.org/3.12/library/http.cookiejar.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module has (now fairly distant) origins in Gisle Aas' Perl module
HTTP::Cookies, from the libwww-perl library.
Docstrings, comments and debug strings in this code refer to the
attributes of the HTTP cookie system as cookie-attributes, to distinguish
them clearly from Python attributes.
Class diagram (note that BSDDBCookieJar and the MSIE* classes are not
distributed with the Python standard library, but are available from
http://wwwsearch.sf.net/):
CookieJar____
/ \ \
FileCookieJar \ \
/ | \ \ \
MozillaCookieJar | LWPCookieJar \ \
| | \
| ---MSIEBase | \
| / | | \
| / MSIEDBCookieJar BSDDBCookieJar
|/
MSIECookieJar
CLASSES
builtins.OSError(builtins.Exception)
LoadError
builtins.object
Cookie
CookieJar
FileCookieJar
LWPCookieJar
MozillaCookieJar
CookiePolicy
DefaultCookiePolicy
class Cookie(builtins.object)
| Cookie(version, name, value, port, port_specified, domain, domain_specified, domain_initial_dot, path, path_specified, secure, expires, discard, comment, comment_url, rest, rfc2109=False)
|
| HTTP Cookie.
|
| This class represents both Netscape and RFC 2965 cookies.
|
| This is deliberately a very simple class. It just holds attributes. It's
| possible to construct Cookie instances that don't comply with the cookie
| standards. CookieJar.make_cookies is the factory function for Cookie
| objects -- it deals with cookie parsing, supplying defaults, and
| normalising to the representation used in this class. CookiePolicy is
| responsible for checking them to see whether they should be accepted from
| and returned to the server.
|
| Note that the port may be present in the headers, but unspecified ("Port"
| rather than"Port=80", for example); if this is the case, port is None.
|
| Methods defined here:
|
| __init__(self, version, name, value, port, port_specified, domain, domain_specified, domain_initial_dot, path, path_specified, secure, expires, discard, comment, comment_url, rest, rfc2109=False)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| get_nonstandard_attr(self, name, default=None)
|
| has_nonstandard_attr(self, name)
|
| is_expired(self, now=None)
|
| set_nonstandard_attr(self, name, value)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class CookieJar(builtins.object)
| CookieJar(policy=None)
|
| Collection of HTTP cookies.
|
| You may not need to know about this class: try
| urllib.request.build_opener(HTTPCookieProcessor).open(url).
|
| Methods defined here:
|
| __init__(self, policy=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self)
|
| __len__(self)
| Return number of contained cookies.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| add_cookie_header(self, request)
| Add correct Cookie: header to request (urllib.request.Request object).
|
| The Cookie2 header is also added unless policy.hide_cookie2 is true.
|
| clear(self, domain=None, path=None, name=None)
| Clear some cookies.
|
| Invoking this method without arguments will clear all cookies. If
| given a single argument, only cookies belonging to that domain will be
| removed. If given two arguments, cookies belonging to the specified
| path within that domain are removed. If given three arguments, then
| the cookie with the specified name, path and domain is removed.
|
| Raises KeyError if no matching cookie exists.
|
| clear_expired_cookies(self)
| Discard all expired cookies.
|
| You probably don't need to call this method: expired cookies are never
| sent back to the server (provided you're using DefaultCookiePolicy),
| this method is called by CookieJar itself every so often, and the
| .save() method won't save expired cookies anyway (unless you ask
| otherwise by passing a true ignore_expires argument).
|
| clear_session_cookies(self)
| Discard all session cookies.
|
| Note that the .save() method won't save session cookies anyway, unless
| you ask otherwise by passing a true ignore_discard argument.
|
| extract_cookies(self, response, request)
| Extract cookies from response, where allowable given the request.
|
| make_cookies(self, response, request)
| Return sequence of Cookie objects extracted from response object.
|
| set_cookie(self, cookie)
| Set a cookie, without checking whether or not it should be set.
|
| set_cookie_if_ok(self, cookie, request)
| Set a cookie if policy says it's OK to do so.
|
| set_policy(self, policy)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| domain_re = re.compile('[^.]*')
|
| dots_re = re.compile('^\\.+')
|
| magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
|
| non_word_re = re.compile('\\W')
|
| quote_re = re.compile('([\\"\\\\])')
|
| strict_domain_re = re.compile('\\.?[^.]*')
class CookiePolicy(builtins.object)
| Defines which cookies get accepted from and returned to server.
|
| May also modify cookies, though this is probably a bad idea.
|
| The subclass DefaultCookiePolicy defines the standard rules for Netscape
| and RFC 2965 cookies -- override that if you want a customized policy.
|
| Methods defined here:
|
| domain_return_ok(self, domain, request)
| Return false if cookies should not be returned, given cookie domain.
|
| path_return_ok(self, path, request)
| Return false if cookies should not be returned, given cookie path.
|
| return_ok(self, cookie, request)
| Return true if (and only if) cookie should be returned to server.
|
| set_ok(self, cookie, request)
| Return true if (and only if) cookie should be accepted from server.
|
| Currently, pre-expired cookies never get this far -- the CookieJar
| class deletes such cookies itself.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class DefaultCookiePolicy(CookiePolicy)
| DefaultCookiePolicy(blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False, rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False, strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False, strict_ns_domain=0, strict_ns_set_initial_dollar=False, strict_ns_set_path=False, secure_protocols=('https', 'wss'))
|
| Implements the standard rules for accepting and returning cookies.
|
| Method resolution order:
| DefaultCookiePolicy
| CookiePolicy
| builtins.object
|
| Methods defined here:
|
| __init__(self, blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False, rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False, strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False, strict_ns_domain=0, strict_ns_set_initial_dollar=False, strict_ns_set_path=False, secure_protocols=('https', 'wss'))
| Constructor arguments should be passed as keyword arguments only.
|
| allowed_domains(self)
| Return None, or the sequence of allowed domains (as a tuple).
|
| blocked_domains(self)
| Return the sequence of blocked domains (as a tuple).
|
| domain_return_ok(self, domain, request)
| Return false if cookies should not be returned, given cookie domain.
|
| is_blocked(self, domain)
|
| is_not_allowed(self, domain)
|
| path_return_ok(self, path, request)
| Return false if cookies should not be returned, given cookie path.
|
| return_ok(self, cookie, request)
| If you override .return_ok(), be sure to call this method. If it
| returns false, so should your subclass (assuming your subclass wants to
| be more strict about which cookies to return).
|
| return_ok_domain(self, cookie, request)
|
| return_ok_expires(self, cookie, request)
|
| return_ok_port(self, cookie, request)
|
| return_ok_secure(self, cookie, request)
|
| return_ok_verifiability(self, cookie, request)
|
| return_ok_version(self, cookie, request)
|
| set_allowed_domains(self, allowed_domains)
| Set the sequence of allowed domains, or None.
|
| set_blocked_domains(self, blocked_domains)
| Set the sequence of blocked domains.
|
| set_ok(self, cookie, request)
| If you override .set_ok(), be sure to call this method. If it returns
| false, so should your subclass (assuming your subclass wants to be more
| strict about which cookies to accept).
|
| set_ok_domain(self, cookie, request)
|
| set_ok_name(self, cookie, request)
|
| set_ok_path(self, cookie, request)
|
| set_ok_port(self, cookie, request)
|
| set_ok_verifiability(self, cookie, request)
|
| set_ok_version(self, cookie, request)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| DomainLiberal = 0
|
| DomainRFC2965Match = 4
|
| DomainStrict = 3
|
| DomainStrictNoDots = 1
|
| DomainStrictNonDomain = 2
|
| ----------------------------------------------------------------------
| Data descriptors inherited from CookiePolicy:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class FileCookieJar(CookieJar)
| FileCookieJar(filename=None, delayload=False, policy=None)
|
| CookieJar that can be loaded from and saved to a file.
|
| Method resolution order:
| FileCookieJar
| CookieJar
| builtins.object
|
| Methods defined here:
|
| __init__(self, filename=None, delayload=False, policy=None)
| Cookies are NOT loaded from the named file until either the .load() or
| .revert() method is called.
|
| load(self, filename=None, ignore_discard=False, ignore_expires=False)
| Load cookies from a file.
|
| revert(self, filename=None, ignore_discard=False, ignore_expires=False)
| Clear all cookies and reload cookies from a saved file.
|
| Raises LoadError (or OSError) if reversion is not successful; the
| object's state will not be altered if this happens.
|
| save(self, filename=None, ignore_discard=False, ignore_expires=False)
| Save cookies to a file.
|
| ----------------------------------------------------------------------
| Methods inherited from CookieJar:
|
| __iter__(self)
|
| __len__(self)
| Return number of contained cookies.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| add_cookie_header(self, request)
| Add correct Cookie: header to request (urllib.request.Request object).
|
| The Cookie2 header is also added unless policy.hide_cookie2 is true.
|
| clear(self, domain=None, path=None, name=None)
| Clear some cookies.
|
| Invoking this method without arguments will clear all cookies. If
| given a single argument, only cookies belonging to that domain will be
| removed. If given two arguments, cookies belonging to the specified
| path within that domain are removed. If given three arguments, then
| the cookie with the specified name, path and domain is removed.
|
| Raises KeyError if no matching cookie exists.
|
| clear_expired_cookies(self)
| Discard all expired cookies.
|
| You probably don't need to call this method: expired cookies are never
| sent back to the server (provided you're using DefaultCookiePolicy),
| this method is called by CookieJar itself every so often, and the
| .save() method won't save expired cookies anyway (unless you ask
| otherwise by passing a true ignore_expires argument).
|
| clear_session_cookies(self)
| Discard all session cookies.
|
| Note that the .save() method won't save session cookies anyway, unless
| you ask otherwise by passing a true ignore_discard argument.
|
| extract_cookies(self, response, request)
| Extract cookies from response, where allowable given the request.
|
| make_cookies(self, response, request)
| Return sequence of Cookie objects extracted from response object.
|
| set_cookie(self, cookie)
| Set a cookie, without checking whether or not it should be set.
|
| set_cookie_if_ok(self, cookie, request)
| Set a cookie if policy says it's OK to do so.
|
| set_policy(self, policy)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from CookieJar:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from CookieJar:
|
| domain_re = re.compile('[^.]*')
|
| dots_re = re.compile('^\\.+')
|
| magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
|
| non_word_re = re.compile('\\W')
|
| quote_re = re.compile('([\\"\\\\])')
|
| strict_domain_re = re.compile('\\.?[^.]*')
class LWPCookieJar(FileCookieJar)
| LWPCookieJar(filename=None, delayload=False, policy=None)
|
| The LWPCookieJar saves a sequence of "Set-Cookie3" lines.
| "Set-Cookie3" is the format used by the libwww-perl library, not known
| to be compatible with any browser, but which is easy to read and
| doesn't lose information about RFC 2965 cookies.
|
| Additional methods
|
| as_lwp_str(ignore_discard=True, ignore_expired=True)
|
| Method resolution order:
| LWPCookieJar
| FileCookieJar
| CookieJar
| builtins.object
|
| Methods defined here:
|
| as_lwp_str(self, ignore_discard=True, ignore_expires=True)
| Return cookies as a string of "\n"-separated "Set-Cookie3" headers.
|
| ignore_discard and ignore_expires: see docstring for FileCookieJar.save
|
| save(self, filename=None, ignore_discard=False, ignore_expires=False)
| Save cookies to a file.
|
| ----------------------------------------------------------------------
| Methods inherited from FileCookieJar:
|
| __init__(self, filename=None, delayload=False, policy=None)
| Cookies are NOT loaded from the named file until either the .load() or
| .revert() method is called.
|
| load(self, filename=None, ignore_discard=False, ignore_expires=False)
| Load cookies from a file.
|
| revert(self, filename=None, ignore_discard=False, ignore_expires=False)
| Clear all cookies and reload cookies from a saved file.
|
| Raises LoadError (or OSError) if reversion is not successful; the
| object's state will not be altered if this happens.
|
| ----------------------------------------------------------------------
| Methods inherited from CookieJar:
|
| __iter__(self)
|
| __len__(self)
| Return number of contained cookies.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| add_cookie_header(self, request)
| Add correct Cookie: header to request (urllib.request.Request object).
|
| The Cookie2 header is also added unless policy.hide_cookie2 is true.
|
| clear(self, domain=None, path=None, name=None)
| Clear some cookies.
|
| Invoking this method without arguments will clear all cookies. If
| given a single argument, only cookies belonging to that domain will be
| removed. If given two arguments, cookies belonging to the specified
| path within that domain are removed. If given three arguments, then
| the cookie with the specified name, path and domain is removed.
|
| Raises KeyError if no matching cookie exists.
|
| clear_expired_cookies(self)
| Discard all expired cookies.
|
| You probably don't need to call this method: expired cookies are never
| sent back to the server (provided you're using DefaultCookiePolicy),
| this method is called by CookieJar itself every so often, and the
| .save() method won't save expired cookies anyway (unless you ask
| otherwise by passing a true ignore_expires argument).
|
| clear_session_cookies(self)
| Discard all session cookies.
|
| Note that the .save() method won't save session cookies anyway, unless
| you ask otherwise by passing a true ignore_discard argument.
|
| extract_cookies(self, response, request)
| Extract cookies from response, where allowable given the request.
|
| make_cookies(self, response, request)
| Return sequence of Cookie objects extracted from response object.
|
| set_cookie(self, cookie)
| Set a cookie, without checking whether or not it should be set.
|
| set_cookie_if_ok(self, cookie, request)
| Set a cookie if policy says it's OK to do so.
|
| set_policy(self, policy)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from CookieJar:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from CookieJar:
|
| domain_re = re.compile('[^.]*')
|
| dots_re = re.compile('^\\.+')
|
| magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
|
| non_word_re = re.compile('\\W')
|
| quote_re = re.compile('([\\"\\\\])')
|
| strict_domain_re = re.compile('\\.?[^.]*')
class LoadError(builtins.OSError)
| # derives from OSError for backwards-compatibility with Python 2.4.0
|
| Method resolution order:
| LoadError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class MozillaCookieJar(FileCookieJar)
| MozillaCookieJar(filename=None, delayload=False, policy=None)
|
| WARNING: you may want to backup your browser's cookies file if you use
| this class to save cookies. I *think* it works, but there have been
| bugs in the past!
|
| This class differs from CookieJar only in the format it uses to save and
| load cookies to and from a file. This class uses the Mozilla/Netscape
| `cookies.txt' format. curl and lynx use this file format, too.
|
| Don't expect cookies saved while the browser is running to be noticed by
| the browser (in fact, Mozilla on unix will overwrite your saved cookies if
| you change them on disk while it's running; on Windows, you probably can't
| save at all while the browser is running).
|
| Note that the Mozilla/Netscape format will downgrade RFC2965 cookies to
| Netscape cookies on saving.
|
| In particular, the cookie version and port number information is lost,
| together with information about whether or not Path, Port and Discard were
| specified by the Set-Cookie2 (or Set-Cookie) header, and whether or not the
| domain as set in the HTTP header started with a dot (yes, I'm aware some
| domains in Netscape files start with a dot and some don't -- trust me, you
| really don't want to know any more about this).
|
| Note that though Mozilla and Netscape use the same format, they use
| slightly different headers. The class saves cookies using the Netscape
| header by default (Mozilla can cope with that).
|
| Method resolution order:
| MozillaCookieJar
| FileCookieJar
| CookieJar
| builtins.object
|
| Methods defined here:
|
| save(self, filename=None, ignore_discard=False, ignore_expires=False)
| Save cookies to a file.
|
| ----------------------------------------------------------------------
| Methods inherited from FileCookieJar:
|
| __init__(self, filename=None, delayload=False, policy=None)
| Cookies are NOT loaded from the named file until either the .load() or
| .revert() method is called.
|
| load(self, filename=None, ignore_discard=False, ignore_expires=False)
| Load cookies from a file.
|
| revert(self, filename=None, ignore_discard=False, ignore_expires=False)
| Clear all cookies and reload cookies from a saved file.
|
| Raises LoadError (or OSError) if reversion is not successful; the
| object's state will not be altered if this happens.
|
| ----------------------------------------------------------------------
| Methods inherited from CookieJar:
|
| __iter__(self)
|
| __len__(self)
| Return number of contained cookies.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| add_cookie_header(self, request)
| Add correct Cookie: header to request (urllib.request.Request object).
|
| The Cookie2 header is also added unless policy.hide_cookie2 is true.
|
| clear(self, domain=None, path=None, name=None)
| Clear some cookies.
|
| Invoking this method without arguments will clear all cookies. If
| given a single argument, only cookies belonging to that domain will be
| removed. If given two arguments, cookies belonging to the specified
| path within that domain are removed. If given three arguments, then
| the cookie with the specified name, path and domain is removed.
|
| Raises KeyError if no matching cookie exists.
|
| clear_expired_cookies(self)
| Discard all expired cookies.
|
| You probably don't need to call this method: expired cookies are never
| sent back to the server (provided you're using DefaultCookiePolicy),
| this method is called by CookieJar itself every so often, and the
| .save() method won't save expired cookies anyway (unless you ask
| otherwise by passing a true ignore_expires argument).
|
| clear_session_cookies(self)
| Discard all session cookies.
|
| Note that the .save() method won't save session cookies anyway, unless
| you ask otherwise by passing a true ignore_discard argument.
|
| extract_cookies(self, response, request)
| Extract cookies from response, where allowable given the request.
|
| make_cookies(self, response, request)
| Return sequence of Cookie objects extracted from response object.
|
| set_cookie(self, cookie)
| Set a cookie, without checking whether or not it should be set.
|
| set_cookie_if_ok(self, cookie, request)
| Set a cookie if policy says it's OK to do so.
|
| set_policy(self, policy)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from CookieJar:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from CookieJar:
|
| domain_re = re.compile('[^.]*')
|
| dots_re = re.compile('^\\.+')
|
| magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
|
| non_word_re = re.compile('\\W')
|
| quote_re = re.compile('([\\"\\\\])')
|
| strict_domain_re = re.compile('\\.?[^.]*')
DATA
__all__ = ['Cookie', 'CookieJar', 'CookiePolicy', 'DefaultCookiePolicy...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\http\cookiejar.py
http.cookies
Python Library Documentation: module http.cookies in http
NAME
http.cookies
MODULE REFERENCE
https://docs.python.org/3.12/library/http.cookies.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
Here's a sample session to show how to use this module.
At the moment, this is the only documentation.
The Basics
----------
Importing is easy...
>>> from http import cookies
Most of the time you start by creating a cookie.
>>> C = cookies.SimpleCookie()
Once you've created your Cookie, you can add values just as if it were
a dictionary.
>>> C = cookies.SimpleCookie()
>>> C["fig"] = "newton"
>>> C["sugar"] = "wafer"
>>> C.output()
'Set-Cookie: fig=newton\r\nSet-Cookie: sugar=wafer'
Notice that the printable representation of a Cookie is the
appropriate format for a Set-Cookie: header. This is the
default behavior. You can change the header and printed
attributes by using the .output() function
>>> C = cookies.SimpleCookie()
>>> C["rocky"] = "road"
>>> C["rocky"]["path"] = "/cookie"
>>> print(C.output(header="Cookie:"))
Cookie: rocky=road; Path=/cookie
>>> print(C.output(attrs=[], header="Cookie:"))
Cookie: rocky=road
The load() method of a Cookie extracts cookies from a string. In a
CGI script, you would use this method to extract the cookies from the
HTTP_COOKIE environment variable.
>>> C = cookies.SimpleCookie()
>>> C.load("chips=ahoy; vienna=finger")
>>> C.output()
'Set-Cookie: chips=ahoy\r\nSet-Cookie: vienna=finger'
The load() method is darn-tootin smart about identifying cookies
within a string. Escaped quotation marks, nested semicolons, and other
such trickeries do not confuse it.
>>> C = cookies.SimpleCookie()
>>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
>>> print(C)
Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"
Each element of the Cookie also supports all of the RFC 2109
Cookie attributes. Here's an example which sets the Path
attribute.
>>> C = cookies.SimpleCookie()
>>> C["oreo"] = "doublestuff"
>>> C["oreo"]["path"] = "/"
>>> print(C)
Set-Cookie: oreo=doublestuff; Path=/
Each dictionary element has a 'value' attribute, which gives you
back the value associated with the key.
>>> C = cookies.SimpleCookie()
>>> C["twix"] = "none for you"
>>> C["twix"].value
'none for you'
The SimpleCookie expects that all values should be standard strings.
Just to be sure, SimpleCookie invokes the str() builtin to convert
the value to a string, when the values are set dictionary-style.
>>> C = cookies.SimpleCookie()
>>> C["number"] = 7
>>> C["string"] = "seven"
>>> C["number"].value
'7'
>>> C["string"].value
'seven'
>>> C.output()
'Set-Cookie: number=7\r\nSet-Cookie: string=seven'
Finis.
CLASSES
builtins.Exception(builtins.BaseException)
CookieError
builtins.dict(builtins.object)
BaseCookie
SimpleCookie
class BaseCookie(builtins.dict)
| BaseCookie(input=None)
|
| A container class for a set of Morsels.
|
| Method resolution order:
| BaseCookie
| builtins.dict
| builtins.object
|
| Methods defined here:
|
| __init__(self, input=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, value)
| Dictionary style assignment.
|
| __str__ = output(self, attrs=None, header='Set-Cookie:', sep='\r\n')
|
| js_output(self, attrs=None)
| Return a string suitable for JavaScript.
|
| load(self, rawdata)
| Load cookies from a string (presumably HTTP_COOKIE) or
| from a dictionary. Loading cookies from a dictionary 'd'
| is equivalent to calling:
| map(Cookie.__setitem__, d.keys(), d.values())
|
| output(self, attrs=None, header='Set-Cookie:', sep='\r\n')
| Return a string suitable for HTTP.
|
| value_decode(self, val)
| real_value, coded_value = value_decode(STRING)
| Called prior to setting a cookie's value from the network
| representation. The VALUE is the value read from HTTP
| header.
| Override this function to modify the behavior of cookies.
|
| value_encode(self, val)
| real_value, coded_value = value_encode(VALUE)
| Called prior to setting a cookie's value from the dictionary
| representation. The VALUE is the value being assigned.
| Override this function to modify the behavior of cookies.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.dict:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __reversed__(self, /)
| Return a reverse iterator over the dict keys.
|
| __ror__(self, value, /)
| Return value|self.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /)
| Remove and return a (key, value) pair as a 2-tuple.
|
| Pairs are returned in LIFO (last-in, first-out) order.
| Raises KeyError if the dict is empty.
|
| setdefault(self, key, default=None, /)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| update(...)
| D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
| If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
| If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
| In either case, this is followed by: for k in F: D[k] = F[k]
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.dict:
|
| __class_getitem__(...)
| See PEP 585
|
| fromkeys(iterable, value=None, /)
| Create a new dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.dict:
|
| __new__(*args, **kwargs) class method of builtins.dict
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from builtins.dict:
|
| __hash__ = None
class CookieError(builtins.Exception)
| # Define an exception visible to External modules
|
| Method resolution order:
| CookieError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SimpleCookie(BaseCookie)
| SimpleCookie(input=None)
|
| SimpleCookie supports strings as cookie values. When setting
| the value using the dictionary assignment notation, SimpleCookie
| calls the builtin str() to convert the value to a string. Values
| received from HTTP are kept as strings.
|
| Method resolution order:
| SimpleCookie
| BaseCookie
| builtins.dict
| builtins.object
|
| Methods defined here:
|
| value_decode(self, val)
| real_value, coded_value = value_decode(STRING)
| Called prior to setting a cookie's value from the network
| representation. The VALUE is the value read from HTTP
| header.
| Override this function to modify the behavior of cookies.
|
| value_encode(self, val)
| real_value, coded_value = value_encode(VALUE)
| Called prior to setting a cookie's value from the dictionary
| representation. The VALUE is the value being assigned.
| Override this function to modify the behavior of cookies.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseCookie:
|
| __init__(self, input=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, value)
| Dictionary style assignment.
|
| __str__ = output(self, attrs=None, header='Set-Cookie:', sep='\r\n')
|
| js_output(self, attrs=None)
| Return a string suitable for JavaScript.
|
| load(self, rawdata)
| Load cookies from a string (presumably HTTP_COOKIE) or
| from a dictionary. Loading cookies from a dictionary 'd'
| is equivalent to calling:
| map(Cookie.__setitem__, d.keys(), d.values())
|
| output(self, attrs=None, header='Set-Cookie:', sep='\r\n')
| Return a string suitable for HTTP.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseCookie:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.dict:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __reversed__(self, /)
| Return a reverse iterator over the dict keys.
|
| __ror__(self, value, /)
| Return value|self.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /)
| Remove and return a (key, value) pair as a 2-tuple.
|
| Pairs are returned in LIFO (last-in, first-out) order.
| Raises KeyError if the dict is empty.
|
| setdefault(self, key, default=None, /)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| update(...)
| D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
| If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
| If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
| In either case, this is followed by: for k in F: D[k] = F[k]
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.dict:
|
| __class_getitem__(...)
| See PEP 585
|
| fromkeys(iterable, value=None, /)
| Create a new dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.dict:
|
| __new__(*args, **kwargs) class method of builtins.dict
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from builtins.dict:
|
| __hash__ = None
DATA
__all__ = ['CookieError', 'BaseCookie', 'SimpleCookie']
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\http\cookies.py
http.server
Python Library Documentation: module http.server in http
NAME
http.server - HTTP server classes.
MODULE REFERENCE
https://docs.python.org/3.12/library/http.server.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
Note: BaseHTTPRequestHandler doesn't implement any HTTP request; see
SimpleHTTPRequestHandler for simple implementations of GET, HEAD and POST,
and CGIHTTPRequestHandler for CGI scripts.
It does, however, optionally implement HTTP/1.1 persistent connections,
as of version 0.3.
Notes on CGIHTTPRequestHandler
------------------------------
This class implements GET and POST requests to cgi-bin scripts.
If the os.fork() function is not present (e.g. on Windows),
subprocess.Popen() is used as a fallback, with slightly altered semantics.
In all cases, the implementation is intentionally naive -- all
requests are executed synchronously.
SECURITY WARNING: DON'T USE THIS CODE UNLESS YOU ARE INSIDE A FIREWALL
-- it may execute arbitrary Python code or external programs.
Note that status code 200 is sent prior to execution of a CGI script, so
scripts cannot send other status codes such as 302 (redirect).
XXX To do:
- log requests even later (to capture byte count)
- log user-agent header and other interesting goodies
- send error log to separate file
CLASSES
socketserver.StreamRequestHandler(socketserver.BaseRequestHandler)
BaseHTTPRequestHandler
SimpleHTTPRequestHandler
CGIHTTPRequestHandler
socketserver.TCPServer(socketserver.BaseServer)
HTTPServer
ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer)
socketserver.ThreadingMixIn(builtins.object)
ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer)
class BaseHTTPRequestHandler(socketserver.StreamRequestHandler)
| BaseHTTPRequestHandler(request, client_address, server)
|
| HTTP request handler base class.
|
| The following explanation of HTTP serves to guide you through the
| code as well as to expose any misunderstandings I may have about
| HTTP (so you don't need to read the code to figure out I'm wrong
| :-).
|
| HTTP (HyperText Transfer Protocol) is an extensible protocol on
| top of a reliable stream transport (e.g. TCP/IP). The protocol
| recognizes three parts to a request:
|
| 1. One line identifying the request type and path
| 2. An optional set of RFC-822-style headers
| 3. An optional data part
|
| The headers and data are separated by a blank line.
|
| The first line of the request has the form
|
| <command> <path> <version>
|
| where <command> is a (case-sensitive) keyword such as GET or POST,
| <path> is a string containing path information for the request,
| and <version> should be the string "HTTP/1.0" or "HTTP/1.1".
| <path> is encoded using the URL encoding scheme (using %xx to signify
| the ASCII character with hex code xx).
|
| The specification specifies that lines are separated by CRLF but
| for compatibility with the widest range of clients recommends
| servers also handle LF. Similarly, whitespace in the request line
| is treated sensibly (allowing multiple spaces between components
| and allowing trailing whitespace).
|
| Similarly, for output, lines ought to be separated by CRLF pairs
| but most clients grok LF characters just fine.
|
| If the first line of the request has the form
|
| <command> <path>
|
| (i.e. <version> is left out) then this is assumed to be an HTTP
| 0.9 request; this form has no optional headers and data part and
| the reply consists of just the data.
|
| The reply form of the HTTP 1.x protocol again has three parts:
|
| 1. One line giving the response code
| 2. An optional set of RFC-822-style headers
| 3. The data
|
| Again, the headers and data are separated by a blank line.
|
| The response code line has the form
|
| <version> <responsecode> <responsestring>
|
| where <version> is the protocol version ("HTTP/1.0" or "HTTP/1.1"),
| <responsecode> is a 3-digit response code indicating success or
| failure of the request, and <responsestring> is an optional
| human-readable string explaining what the response code means.
|
| This server parses the request and the headers, and then calls a
| function specific to the request type (<command>). Specifically,
| a request SPAM will be handled by a method do_SPAM(). If no
| such method exists the server sends an error response to the
| client. If it exists, it is called with no arguments:
|
| do_SPAM()
|
| Note that the request name is case sensitive (i.e. SPAM and spam
| are different requests).
|
| The various request details are stored in instance variables:
|
| - client_address is the client IP address in the form (host,
| port);
|
| - command, path and version are the broken-down request line;
|
| - headers is an instance of email.message.Message (or a derived
| class) containing the header information;
|
| - rfile is a file object open for reading positioned at the
| start of the optional input data part;
|
| - wfile is a file object open for writing.
|
| IT IS IMPORTANT TO ADHERE TO THE PROTOCOL FOR WRITING!
|
| The first thing to be written must be the response line. Then
| follow 0 or more header lines, then a blank line, and then the
| actual data (if any). The meaning of the header lines depends on
| the command executed by the server; in most cases, when data is
| returned, there should be at least one header line of the form
|
| Content-type: <type>/<subtype>
|
| where <type> and <subtype> should be registered MIME types,
| e.g. "text/html" or "text/plain".
|
| Method resolution order:
| BaseHTTPRequestHandler
| socketserver.StreamRequestHandler
| socketserver.BaseRequestHandler
| builtins.object
|
| Methods defined here:
|
| address_string(self)
| Return the client address.
|
| date_time_string(self, timestamp=None)
| Return the current date and time formatted for a message header.
|
| end_headers(self)
| Send the blank line ending the MIME headers.
|
| flush_headers(self)
|
| handle(self)
| Handle multiple requests if necessary.
|
| handle_expect_100(self)
| Decide what to do with an "Expect: 100-continue" header.
|
| If the client is expecting a 100 Continue response, we must
| respond with either a 100 Continue or a final response before
| waiting for the request body. The default is to always respond
| with a 100 Continue. You can behave differently (for example,
| reject unauthorized requests) by overriding this method.
|
| This method should either return True (possibly after sending
| a 100 Continue response) or send an error response and return
| False.
|
| handle_one_request(self)
| Handle a single HTTP request.
|
| You normally don't need to override this method; see the class
| __doc__ string for information on how to handle specific HTTP
| commands such as GET and POST.
|
| log_date_time_string(self)
| Return the current time formatted for logging.
|
| log_error(self, format, *args)
| Log an error.
|
| This is called when a request cannot be fulfilled. By
| default it passes the message on to log_message().
|
| Arguments are the same as for log_message().
|
| XXX This should go to the separate error log.
|
| log_message(self, format, *args)
| Log an arbitrary message.
|
| This is used by all other logging functions. Override
| it if you have specific logging wishes.
|
| The first argument, FORMAT, is a format string for the
| message to be logged. If the format string contains
| any % escapes requiring parameters, they should be
| specified as subsequent arguments (it's just like
| printf!).
|
| The client ip and current date/time are prefixed to
| every message.
|
| Unicode control characters are replaced with escaped hex
| before writing the output to stderr.
|
| log_request(self, code='-', size='-')
| Log an accepted request.
|
| This is called by send_response().
|
| parse_request(self)
| Parse a request (internal).
|
| The request should be stored in self.raw_requestline; the results
| are in self.command, self.path, self.request_version and
| self.headers.
|
| Return True for success, False for failure; on failure, any relevant
| error response has already been sent back.
|
| send_error(self, code, message=None, explain=None)
| Send and log an error reply.
|
| Arguments are
| * code: an HTTP error code
| 3 digits
| * message: a simple optional 1 line reason phrase.
| *( HTAB / SP / VCHAR / %x80-FF )
| defaults to short entry matching the response code
| * explain: a detailed message defaults to the long entry
| matching the response code.
|
| This sends an error response (so it must be called before any
| output has been generated), logs the error, and finally sends
| a piece of HTML explaining the error to the user.
|
| send_header(self, keyword, value)
| Send a MIME header to the headers buffer.
|
| send_response(self, code, message=None)
| Add the response header to the headers buffer and log the
| response code.
|
| Also send two standard headers with the server software
| version and the current date.
|
| send_response_only(self, code, message=None)
| Send the response header only.
|
| version_string(self)
| Return the server software version string.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| MessageClass = <class 'http.client.HTTPMessage'>
|
| default_request_version = 'HTTP/0.9'
|
| error_content_type = 'text/html;charset=utf-8'
|
| error_message_format = '<!DOCTYPE HTML>\n<html lang="en">\n <head>\...
|
| monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'A...
|
| protocol_version = 'HTTP/1.0'
|
| responses = {<HTTPStatus.CONTINUE: 100>: ('Continue', 'Request receive...
|
| server_version = 'BaseHTTP/0.6'
|
| sys_version = 'Python/3.12.6'
|
| weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.StreamRequestHandler:
|
| finish(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.StreamRequestHandler:
|
| disable_nagle_algorithm = False
|
| rbufsize = -1
|
| timeout = None
|
| wbufsize = 0
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.BaseRequestHandler:
|
| __init__(self, request, client_address, server)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socketserver.BaseRequestHandler:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class CGIHTTPRequestHandler(SimpleHTTPRequestHandler)
| CGIHTTPRequestHandler(*args, directory=None, **kwargs)
|
| Complete HTTP server with GET, HEAD and POST commands.
|
| GET and HEAD also support running CGI scripts.
|
| The POST command is *only* implemented for CGI scripts.
|
| Method resolution order:
| CGIHTTPRequestHandler
| SimpleHTTPRequestHandler
| BaseHTTPRequestHandler
| socketserver.StreamRequestHandler
| socketserver.BaseRequestHandler
| builtins.object
|
| Methods defined here:
|
| do_POST(self)
| Serve a POST request.
|
| This is only implemented for CGI scripts.
|
| is_cgi(self)
| Test whether self.path corresponds to a CGI script.
|
| Returns True and updates the cgi_info attribute to the tuple
| (dir, rest) if self.path requires running a CGI script.
| Returns False otherwise.
|
| If any exception is raised, the caller should assume that
| self.path was rejected as invalid and act accordingly.
|
| The default implementation tests whether the normalized url
| path begins with one of the strings in self.cgi_directories
| (and the next character is a '/' or the end of the string).
|
| is_executable(self, path)
| Test whether argument path is an executable file.
|
| is_python(self, path)
| Test whether argument path is a Python script.
|
| run_cgi(self)
| Execute a CGI script.
|
| send_head(self)
| Version of send_head that support CGI scripts
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| cgi_directories = ['/cgi-bin', '/htbin']
|
| have_fork = False
|
| rbufsize = 0
|
| ----------------------------------------------------------------------
| Methods inherited from SimpleHTTPRequestHandler:
|
| __init__(self, *args, directory=None, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| copyfile(self, source, outputfile)
| Copy all data between two file objects.
|
| The SOURCE argument is a file object open for reading
| (or anything with a read() method) and the DESTINATION
| argument is a file object open for writing (or
| anything with a write() method).
|
| The only reason for overriding this would be to change
| the block size or perhaps to replace newlines by CRLF
| -- note however that this the default server uses this
| to copy binary data as well.
|
| do_GET(self)
| Serve a GET request.
|
| do_HEAD(self)
| Serve a HEAD request.
|
| guess_type(self, path)
| Guess the type of a file.
|
| Argument is a PATH (a filename).
|
| Return value is a string of the form type/subtype,
| usable for a MIME Content-type header.
|
| The default implementation looks the file's extension
| up in the table self.extensions_map, using application/octet-stream
| as a default; however it would be permissible (if
| slow) to look inside the data to make a better guess.
|
| list_directory(self, path)
| Helper to produce a directory listing (absent index.html).
|
| Return value is either a file object, or None (indicating an
| error). In either case, the headers are sent, making the
| interface the same as for send_head().
|
| translate_path(self, path)
| Translate a /-separated PATH to the local filename syntax.
|
| Components that mean special things to the local file system
| (e.g. drive or directory names) are ignored. (XXX They should
| probably be diagnosed.)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from SimpleHTTPRequestHandler:
|
| extensions_map = {'.Z': 'application/octet-stream', '.bz2': 'applicati...
|
| index_pages = ('index.html', 'index.htm')
|
| server_version = 'SimpleHTTP/0.6'
|
| ----------------------------------------------------------------------
| Methods inherited from BaseHTTPRequestHandler:
|
| address_string(self)
| Return the client address.
|
| date_time_string(self, timestamp=None)
| Return the current date and time formatted for a message header.
|
| end_headers(self)
| Send the blank line ending the MIME headers.
|
| flush_headers(self)
|
| handle(self)
| Handle multiple requests if necessary.
|
| handle_expect_100(self)
| Decide what to do with an "Expect: 100-continue" header.
|
| If the client is expecting a 100 Continue response, we must
| respond with either a 100 Continue or a final response before
| waiting for the request body. The default is to always respond
| with a 100 Continue. You can behave differently (for example,
| reject unauthorized requests) by overriding this method.
|
| This method should either return True (possibly after sending
| a 100 Continue response) or send an error response and return
| False.
|
| handle_one_request(self)
| Handle a single HTTP request.
|
| You normally don't need to override this method; see the class
| __doc__ string for information on how to handle specific HTTP
| commands such as GET and POST.
|
| log_date_time_string(self)
| Return the current time formatted for logging.
|
| log_error(self, format, *args)
| Log an error.
|
| This is called when a request cannot be fulfilled. By
| default it passes the message on to log_message().
|
| Arguments are the same as for log_message().
|
| XXX This should go to the separate error log.
|
| log_message(self, format, *args)
| Log an arbitrary message.
|
| This is used by all other logging functions. Override
| it if you have specific logging wishes.
|
| The first argument, FORMAT, is a format string for the
| message to be logged. If the format string contains
| any % escapes requiring parameters, they should be
| specified as subsequent arguments (it's just like
| printf!).
|
| The client ip and current date/time are prefixed to
| every message.
|
| Unicode control characters are replaced with escaped hex
| before writing the output to stderr.
|
| log_request(self, code='-', size='-')
| Log an accepted request.
|
| This is called by send_response().
|
| parse_request(self)
| Parse a request (internal).
|
| The request should be stored in self.raw_requestline; the results
| are in self.command, self.path, self.request_version and
| self.headers.
|
| Return True for success, False for failure; on failure, any relevant
| error response has already been sent back.
|
| send_error(self, code, message=None, explain=None)
| Send and log an error reply.
|
| Arguments are
| * code: an HTTP error code
| 3 digits
| * message: a simple optional 1 line reason phrase.
| *( HTAB / SP / VCHAR / %x80-FF )
| defaults to short entry matching the response code
| * explain: a detailed message defaults to the long entry
| matching the response code.
|
| This sends an error response (so it must be called before any
| output has been generated), logs the error, and finally sends
| a piece of HTML explaining the error to the user.
|
| send_header(self, keyword, value)
| Send a MIME header to the headers buffer.
|
| send_response(self, code, message=None)
| Add the response header to the headers buffer and log the
| response code.
|
| Also send two standard headers with the server software
| version and the current date.
|
| send_response_only(self, code, message=None)
| Send the response header only.
|
| version_string(self)
| Return the server software version string.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from BaseHTTPRequestHandler:
|
| MessageClass = <class 'http.client.HTTPMessage'>
|
| default_request_version = 'HTTP/0.9'
|
| error_content_type = 'text/html;charset=utf-8'
|
| error_message_format = '<!DOCTYPE HTML>\n<html lang="en">\n <head>\...
|
| monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'A...
|
| protocol_version = 'HTTP/1.0'
|
| responses = {<HTTPStatus.CONTINUE: 100>: ('Continue', 'Request receive...
|
| sys_version = 'Python/3.12.6'
|
| weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.StreamRequestHandler:
|
| finish(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.StreamRequestHandler:
|
| disable_nagle_algorithm = False
|
| timeout = None
|
| wbufsize = 0
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socketserver.BaseRequestHandler:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class HTTPServer(socketserver.TCPServer)
| HTTPServer(server_address, RequestHandlerClass, bind_and_activate=True)
|
| Method resolution order:
| HTTPServer
| socketserver.TCPServer
| socketserver.BaseServer
| builtins.object
|
| Methods defined here:
|
| server_bind(self)
| Override server_bind to store the server name.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| allow_reuse_address = 1
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.TCPServer:
|
| __init__(self, server_address, RequestHandlerClass, bind_and_activate=True)
| Constructor. May be extended, do not override.
|
| close_request(self, request)
| Called to clean up an individual request.
|
| fileno(self)
| Return socket file number.
|
| Interface required by selector.
|
| get_request(self)
| Get the request and client address from the socket.
|
| May be overridden.
|
| server_activate(self)
| Called by constructor to activate the server.
|
| May be overridden.
|
| server_close(self)
| Called to clean-up the server.
|
| May be overridden.
|
| shutdown_request(self, request)
| Called to shutdown and close an individual request.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.TCPServer:
|
| address_family = <AddressFamily.AF_INET: 2>
|
| allow_reuse_port = False
|
| request_queue_size = 5
|
| socket_type = <SocketKind.SOCK_STREAM: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.BaseServer:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| finish_request(self, request, client_address)
| Finish one request by instantiating RequestHandlerClass.
|
| handle_error(self, request, client_address)
| Handle an error gracefully. May be overridden.
|
| The default is to print a traceback and continue.
|
| handle_request(self)
| Handle one request, possibly blocking.
|
| Respects self.timeout.
|
| handle_timeout(self)
| Called if no new request arrives within self.timeout.
|
| Overridden by ForkingMixIn.
|
| process_request(self, request, client_address)
| Call finish_request.
|
| Overridden by ForkingMixIn and ThreadingMixIn.
|
| serve_forever(self, poll_interval=0.5)
| Handle one request at a time until shutdown.
|
| Polls for shutdown every poll_interval seconds. Ignores
| self.timeout. If you need to do periodic tasks, do them in
| another thread.
|
| service_actions(self)
| Called by the serve_forever() loop.
|
| May be overridden by a subclass / Mixin to implement any code that
| needs to be run during the loop.
|
| shutdown(self)
| Stops the serve_forever loop.
|
| Blocks until the loop has finished. This must be called while
| serve_forever() is running in another thread, or it will
| deadlock.
|
| verify_request(self, request, client_address)
| Verify the request. May be overridden.
|
| Return True if we should proceed with this request.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socketserver.BaseServer:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.BaseServer:
|
| timeout = None
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler)
| SimpleHTTPRequestHandler(*args, directory=None, **kwargs)
|
| Simple HTTP request handler with GET and HEAD commands.
|
| This serves files from the current directory and any of its
| subdirectories. The MIME type for files is determined by
| calling the .guess_type() method.
|
| The GET and HEAD requests are identical except that the HEAD
| request omits the actual contents of the file.
|
| Method resolution order:
| SimpleHTTPRequestHandler
| BaseHTTPRequestHandler
| socketserver.StreamRequestHandler
| socketserver.BaseRequestHandler
| builtins.object
|
| Methods defined here:
|
| __init__(self, *args, directory=None, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| copyfile(self, source, outputfile)
| Copy all data between two file objects.
|
| The SOURCE argument is a file object open for reading
| (or anything with a read() method) and the DESTINATION
| argument is a file object open for writing (or
| anything with a write() method).
|
| The only reason for overriding this would be to change
| the block size or perhaps to replace newlines by CRLF
| -- note however that this the default server uses this
| to copy binary data as well.
|
| do_GET(self)
| Serve a GET request.
|
| do_HEAD(self)
| Serve a HEAD request.
|
| guess_type(self, path)
| Guess the type of a file.
|
| Argument is a PATH (a filename).
|
| Return value is a string of the form type/subtype,
| usable for a MIME Content-type header.
|
| The default implementation looks the file's extension
| up in the table self.extensions_map, using application/octet-stream
| as a default; however it would be permissible (if
| slow) to look inside the data to make a better guess.
|
| list_directory(self, path)
| Helper to produce a directory listing (absent index.html).
|
| Return value is either a file object, or None (indicating an
| error). In either case, the headers are sent, making the
| interface the same as for send_head().
|
| send_head(self)
| Common code for GET and HEAD commands.
|
| This sends the response code and MIME headers.
|
| Return value is either a file object (which has to be copied
| to the outputfile by the caller unless the command was HEAD,
| and must be closed by the caller under all circumstances), or
| None, in which case the caller has nothing further to do.
|
| translate_path(self, path)
| Translate a /-separated PATH to the local filename syntax.
|
| Components that mean special things to the local file system
| (e.g. drive or directory names) are ignored. (XXX They should
| probably be diagnosed.)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| extensions_map = {'.Z': 'application/octet-stream', '.bz2': 'applicati...
|
| index_pages = ('index.html', 'index.htm')
|
| server_version = 'SimpleHTTP/0.6'
|
| ----------------------------------------------------------------------
| Methods inherited from BaseHTTPRequestHandler:
|
| address_string(self)
| Return the client address.
|
| date_time_string(self, timestamp=None)
| Return the current date and time formatted for a message header.
|
| end_headers(self)
| Send the blank line ending the MIME headers.
|
| flush_headers(self)
|
| handle(self)
| Handle multiple requests if necessary.
|
| handle_expect_100(self)
| Decide what to do with an "Expect: 100-continue" header.
|
| If the client is expecting a 100 Continue response, we must
| respond with either a 100 Continue or a final response before
| waiting for the request body. The default is to always respond
| with a 100 Continue. You can behave differently (for example,
| reject unauthorized requests) by overriding this method.
|
| This method should either return True (possibly after sending
| a 100 Continue response) or send an error response and return
| False.
|
| handle_one_request(self)
| Handle a single HTTP request.
|
| You normally don't need to override this method; see the class
| __doc__ string for information on how to handle specific HTTP
| commands such as GET and POST.
|
| log_date_time_string(self)
| Return the current time formatted for logging.
|
| log_error(self, format, *args)
| Log an error.
|
| This is called when a request cannot be fulfilled. By
| default it passes the message on to log_message().
|
| Arguments are the same as for log_message().
|
| XXX This should go to the separate error log.
|
| log_message(self, format, *args)
| Log an arbitrary message.
|
| This is used by all other logging functions. Override
| it if you have specific logging wishes.
|
| The first argument, FORMAT, is a format string for the
| message to be logged. If the format string contains
| any % escapes requiring parameters, they should be
| specified as subsequent arguments (it's just like
| printf!).
|
| The client ip and current date/time are prefixed to
| every message.
|
| Unicode control characters are replaced with escaped hex
| before writing the output to stderr.
|
| log_request(self, code='-', size='-')
| Log an accepted request.
|
| This is called by send_response().
|
| parse_request(self)
| Parse a request (internal).
|
| The request should be stored in self.raw_requestline; the results
| are in self.command, self.path, self.request_version and
| self.headers.
|
| Return True for success, False for failure; on failure, any relevant
| error response has already been sent back.
|
| send_error(self, code, message=None, explain=None)
| Send and log an error reply.
|
| Arguments are
| * code: an HTTP error code
| 3 digits
| * message: a simple optional 1 line reason phrase.
| *( HTAB / SP / VCHAR / %x80-FF )
| defaults to short entry matching the response code
| * explain: a detailed message defaults to the long entry
| matching the response code.
|
| This sends an error response (so it must be called before any
| output has been generated), logs the error, and finally sends
| a piece of HTML explaining the error to the user.
|
| send_header(self, keyword, value)
| Send a MIME header to the headers buffer.
|
| send_response(self, code, message=None)
| Add the response header to the headers buffer and log the
| response code.
|
| Also send two standard headers with the server software
| version and the current date.
|
| send_response_only(self, code, message=None)
| Send the response header only.
|
| version_string(self)
| Return the server software version string.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from BaseHTTPRequestHandler:
|
| MessageClass = <class 'http.client.HTTPMessage'>
|
| default_request_version = 'HTTP/0.9'
|
| error_content_type = 'text/html;charset=utf-8'
|
| error_message_format = '<!DOCTYPE HTML>\n<html lang="en">\n <head>\...
|
| monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'A...
|
| protocol_version = 'HTTP/1.0'
|
| responses = {<HTTPStatus.CONTINUE: 100>: ('Continue', 'Request receive...
|
| sys_version = 'Python/3.12.6'
|
| weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.StreamRequestHandler:
|
| finish(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.StreamRequestHandler:
|
| disable_nagle_algorithm = False
|
| rbufsize = -1
|
| timeout = None
|
| wbufsize = 0
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socketserver.BaseRequestHandler:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer)
| ThreadingHTTPServer(server_address, RequestHandlerClass, bind_and_activate=True)
|
| Method resolution order:
| ThreadingHTTPServer
| socketserver.ThreadingMixIn
| HTTPServer
| socketserver.TCPServer
| socketserver.BaseServer
| builtins.object
|
| Data and other attributes defined here:
|
| daemon_threads = True
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.ThreadingMixIn:
|
| process_request(self, request, client_address)
| Start a new thread to process the request.
|
| process_request_thread(self, request, client_address)
| Same as in BaseServer but as a thread.
|
| In addition, exception handling is done here.
|
| server_close(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socketserver.ThreadingMixIn:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.ThreadingMixIn:
|
| block_on_close = True
|
| ----------------------------------------------------------------------
| Methods inherited from HTTPServer:
|
| server_bind(self)
| Override server_bind to store the server name.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from HTTPServer:
|
| allow_reuse_address = 1
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.TCPServer:
|
| __init__(self, server_address, RequestHandlerClass, bind_and_activate=True)
| Constructor. May be extended, do not override.
|
| close_request(self, request)
| Called to clean up an individual request.
|
| fileno(self)
| Return socket file number.
|
| Interface required by selector.
|
| get_request(self)
| Get the request and client address from the socket.
|
| May be overridden.
|
| server_activate(self)
| Called by constructor to activate the server.
|
| May be overridden.
|
| shutdown_request(self, request)
| Called to shutdown and close an individual request.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.TCPServer:
|
| address_family = <AddressFamily.AF_INET: 2>
|
| allow_reuse_port = False
|
| request_queue_size = 5
|
| socket_type = <SocketKind.SOCK_STREAM: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.BaseServer:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| finish_request(self, request, client_address)
| Finish one request by instantiating RequestHandlerClass.
|
| handle_error(self, request, client_address)
| Handle an error gracefully. May be overridden.
|
| The default is to print a traceback and continue.
|
| handle_request(self)
| Handle one request, possibly blocking.
|
| Respects self.timeout.
|
| handle_timeout(self)
| Called if no new request arrives within self.timeout.
|
| Overridden by ForkingMixIn.
|
| serve_forever(self, poll_interval=0.5)
| Handle one request at a time until shutdown.
|
| Polls for shutdown every poll_interval seconds. Ignores
| self.timeout. If you need to do periodic tasks, do them in
| another thread.
|
| service_actions(self)
| Called by the serve_forever() loop.
|
| May be overridden by a subclass / Mixin to implement any code that
| needs to be run during the loop.
|
| shutdown(self)
| Stops the serve_forever loop.
|
| Blocks until the loop has finished. This must be called while
| serve_forever() is running in another thread, or it will
| deadlock.
|
| verify_request(self, request, client_address)
| Verify the request. May be overridden.
|
| Return True if we should proceed with this request.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.BaseServer:
|
| timeout = None
DATA
__all__ = ['HTTPServer', 'ThreadingHTTPServer', 'BaseHTTPRequestHandle...
VERSION
0.6
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\http\server.py
http.client.ACCEPTED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.ALREADY_REPORTED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.BAD_GATEWAY
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.BAD_REQUEST
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.BadStatusLine
Python Library Documentation: class BadStatusLine in module http.client class BadStatusLine(HTTPException) | BadStatusLine(line) | | Method resolution order: | BadStatusLine | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, line) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.CONFLICT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.CONTINUE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.CREATED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.CannotSendHeader
Python Library Documentation: class CannotSendHeader in module http.client class CannotSendHeader(ImproperConnectionState) | Method resolution order: | CannotSendHeader | ImproperConnectionState | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.CannotSendRequest
Python Library Documentation: class CannotSendRequest in module http.client class CannotSendRequest(ImproperConnectionState) | Method resolution order: | CannotSendRequest | ImproperConnectionState | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.EARLY_HINTS
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.EXPECTATION_FAILED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.FAILED_DEPENDENCY
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.FORBIDDEN
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.FOUND
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.GATEWAY_TIMEOUT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.GONE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.HTTPConnection
Python Library Documentation: class HTTPConnection in module http.client
class HTTPConnection(builtins.object)
| HTTPConnection(host, port=None, timeout=<object object at 0x0000017B07D78B30>, source_address=None, blocksize=8192)
|
| Methods defined here:
|
| __init__(self, host, port=None, timeout=<object object at 0x0000017B07D78B30>, source_address=None, blocksize=8192)
| Initialize self. See help(type(self)) for accurate signature.
|
| close(self)
| Close the connection to the HTTP server.
|
| connect(self)
| Connect to the host and port specified in __init__.
|
| endheaders(self, message_body=None, *, encode_chunked=False)
| Indicate that the last header line has been sent to the server.
|
| This method sends the request to the server. The optional message_body
| argument can be used to pass a message body associated with the
| request.
|
| get_proxy_response_headers(self)
| Returns a dictionary with the headers of the response
| received from the proxy server to the CONNECT request
| sent to set the tunnel.
|
| If the CONNECT request was not sent, the method returns None.
|
| getresponse(self)
| Get the response from the server.
|
| If the HTTPConnection is in the correct state, returns an
| instance of HTTPResponse or of whatever object is returned by
| the response_class variable.
|
| If a request has not been sent or if a previous response has
| not be handled, ResponseNotReady is raised. If the HTTP
| response indicates that the connection should be closed, then
| it will be closed before the response is returned. When the
| connection is closed, the underlying socket is closed.
|
| putheader(self, header, *values)
| Send a request header line to the server.
|
| For example: h.putheader('Accept', 'text/html')
|
| putrequest(self, method, url, skip_host=False, skip_accept_encoding=False)
| Send a request to the server.
|
| `method' specifies an HTTP request method, e.g. 'GET'.
| `url' specifies the object being requested, e.g. '/index.html'.
| `skip_host' if True does not add automatically a 'Host:' header
| `skip_accept_encoding' if True does not add automatically an
| 'Accept-Encoding:' header
|
| request(self, method, url, body=None, headers={}, *, encode_chunked=False)
| Send a complete request to the server.
|
| send(self, data)
| Send `data' to the server.
| ``data`` can be a string object, a bytes object, an array object, a
| file-like object that supports a .read() method, or an iterable object.
|
| set_debuglevel(self, level)
|
| set_tunnel(self, host, port=None, headers=None)
| Set up host and port for HTTP CONNECT tunnelling.
|
| In a connection that uses HTTP CONNECT tunnelling, the host passed to
| the constructor is used as a proxy server that relays all communication
| to the endpoint passed to `set_tunnel`. This done by sending an HTTP
| CONNECT request to the proxy server when the connection is established.
|
| This method must be called before the HTTP connection has been
| established.
|
| The headers argument should be a mapping of extra HTTP headers to send
| with the CONNECT request.
|
| As HTTP/1.1 is used for HTTP CONNECT tunnelling request, as per the RFC
| (https://tools.ietf.org/html/rfc7231#section-4.3.6), a HTTP Host:
| header must be provided, matching the authority-form of the request
| target provided as the destination for the CONNECT request. If a
| HTTP Host: header is not provided via the headers argument, one
| is generated and transmitted automatically.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| auto_open = 1
|
| debuglevel = 0
|
| default_port = 80
|
| response_class = <class 'http.client.HTTPResponse'>
http.client.HTTPException
Python Library Documentation: class HTTPException in module http.client class HTTPException(builtins.Exception) | Method resolution order: | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.HTTPMessage
Python Library Documentation: class HTTPMessage in module http.client
class HTTPMessage(email.message.Message)
| HTTPMessage(policy=Compat32())
|
| Method resolution order:
| HTTPMessage
| email.message.Message
| builtins.object
|
| Methods defined here:
|
| getallmatchingheaders(self, name)
| Find all header lines matching a given header name.
|
| Look through the list of headers and find all lines matching a given
| header name (and their continuation lines). A list of the lines is
| returned, without interpretation. If the header does not occur, an
| empty list is returned. If the header occurs multiple times, all
| occurrences are returned. Case is not important in the header name.
|
| ----------------------------------------------------------------------
| Methods inherited from email.message.Message:
|
| __bytes__(self)
| Return the entire formatted message as a bytes object.
|
| __contains__(self, name)
|
| __delitem__(self, name)
| Delete all occurrences of a header, if present.
|
| Does not raise an exception if the header is missing.
|
| __getitem__(self, name)
| Get a header value.
|
| Return None if the header is missing instead of raising an exception.
|
| Note that if the header appeared multiple times, exactly which
| occurrence gets returned is undefined. Use get_all() to get all
| the values matching a header field name.
|
| __init__(self, policy=Compat32())
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self)
|
| __len__(self)
| Return the total number of headers, including duplicates.
|
| __setitem__(self, name, val)
| Set the value of a header.
|
| Note: this does not overwrite an existing header with the same field
| name. Use __delitem__() first to delete any existing headers.
|
| __str__(self)
| Return the entire formatted message as a string.
|
| add_header(self, _name, _value, **_params)
| Extended header setting.
|
| name is the header field to add. keyword arguments can be used to set
| additional parameters for the header field, with underscores converted
| to dashes. Normally the parameter will be added as key="value" unless
| value is None, in which case only the key will be added. If a
| parameter value contains non-ASCII characters it can be specified as a
| three-tuple of (charset, language, value), in which case it will be
| encoded according to RFC2231 rules. Otherwise it will be encoded using
| the utf-8 charset and a language of ''.
|
| Examples:
|
| msg.add_header('content-disposition', 'attachment', filename='bud.gif')
| msg.add_header('content-disposition', 'attachment',
| filename=('utf-8', '', Fußballer.ppt'))
| msg.add_header('content-disposition', 'attachment',
| filename='Fußballer.ppt'))
|
| as_bytes(self, unixfrom=False, policy=None)
| Return the entire formatted message as a bytes object.
|
| Optional 'unixfrom', when true, means include the Unix From_ envelope
| header. 'policy' is passed to the BytesGenerator instance used to
| serialize the message; if not specified the policy associated with
| the message instance is used.
|
| as_string(self, unixfrom=False, maxheaderlen=0, policy=None)
| Return the entire formatted message as a string.
|
| Optional 'unixfrom', when true, means include the Unix From_ envelope
| header. For backward compatibility reasons, if maxheaderlen is
| not specified it defaults to 0, so you must override it explicitly
| if you want a different maxheaderlen. 'policy' is passed to the
| Generator instance used to serialize the message; if it is not
| specified the policy associated with the message instance is used.
|
| If the message object contains binary data that is not encoded
| according to RFC standards, the non-compliant data will be replaced by
| unicode "unknown character" code points.
|
| attach(self, payload)
| Add the given payload to the current payload.
|
| The current payload will always be a list of objects after this method
| is called. If you want to set the payload to a scalar object, use
| set_payload() instead.
|
| del_param(self, param, header='content-type', requote=True)
| Remove the given parameter completely from the Content-Type header.
|
| The header will be re-written in place without the parameter or its
| value. All values will be quoted as necessary unless requote is
| False. Optional header specifies an alternative to the Content-Type
| header.
|
| get(self, name, failobj=None)
| Get a header value.
|
| Like __getitem__() but return failobj instead of None when the field
| is missing.
|
| get_all(self, name, failobj=None)
| Return a list of all the values for the named field.
|
| These will be sorted in the order they appeared in the original
| message, and may contain duplicates. Any fields deleted and
| re-inserted are always appended to the header list.
|
| If no such fields exist, failobj is returned (defaults to None).
|
| get_boundary(self, failobj=None)
| Return the boundary associated with the payload if present.
|
| The boundary is extracted from the Content-Type header's `boundary'
| parameter, and it is unquoted.
|
| get_charset(self)
| Return the Charset instance associated with the message's payload.
|
| get_charsets(self, failobj=None)
| Return a list containing the charset(s) used in this message.
|
| The returned list of items describes the Content-Type headers'
| charset parameter for this message and all the subparts in its
| payload.
|
| Each item will either be a string (the value of the charset parameter
| in the Content-Type header of that part) or the value of the
| 'failobj' parameter (defaults to None), if the part does not have a
| main MIME type of "text", or the charset is not defined.
|
| The list will contain one string for each part of the message, plus
| one for the container message (i.e. self), so that a non-multipart
| message will still return a list of length 1.
|
| get_content_charset(self, failobj=None)
| Return the charset parameter of the Content-Type header.
|
| The returned string is always coerced to lower case. If there is no
| Content-Type header, or if that header has no charset parameter,
| failobj is returned.
|
| get_content_disposition(self)
| Return the message's content-disposition if it exists, or None.
|
| The return values can be either 'inline', 'attachment' or None
| according to the rfc2183.
|
| get_content_maintype(self)
| Return the message's main content type.
|
| This is the `maintype' part of the string returned by
| get_content_type().
|
| get_content_subtype(self)
| Returns the message's sub-content type.
|
| This is the `subtype' part of the string returned by
| get_content_type().
|
| get_content_type(self)
| Return the message's content type.
|
| The returned string is coerced to lower case of the form
| `maintype/subtype'. If there was no Content-Type header in the
| message, the default type as given by get_default_type() will be
| returned. Since according to RFC 2045, messages always have a default
| type this will always return a value.
|
| RFC 2045 defines a message's default type to be text/plain unless it
| appears inside a multipart/digest container, in which case it would be
| message/rfc822.
|
| get_default_type(self)
| Return the `default' content type.
|
| Most messages have a default content type of text/plain, except for
| messages that are subparts of multipart/digest containers. Such
| subparts have a default content type of message/rfc822.
|
| get_filename(self, failobj=None)
| Return the filename associated with the payload if present.
|
| The filename is extracted from the Content-Disposition header's
| `filename' parameter, and it is unquoted. If that header is missing
| the `filename' parameter, this method falls back to looking for the
| `name' parameter.
|
| get_param(self, param, failobj=None, header='content-type', unquote=True)
| Return the parameter value if found in the Content-Type header.
|
| Optional failobj is the object to return if there is no Content-Type
| header, or the Content-Type header has no such parameter. Optional
| header is the header to search instead of Content-Type.
|
| Parameter keys are always compared case insensitively. The return
| value can either be a string, or a 3-tuple if the parameter was RFC
| 2231 encoded. When it's a 3-tuple, the elements of the value are of
| the form (CHARSET, LANGUAGE, VALUE). Note that both CHARSET and
| LANGUAGE can be None, in which case you should consider VALUE to be
| encoded in the us-ascii charset. You can usually ignore LANGUAGE.
| The parameter value (either the returned string, or the VALUE item in
| the 3-tuple) is always unquoted, unless unquote is set to False.
|
| If your application doesn't care whether the parameter was RFC 2231
| encoded, it can turn the return value into a string as follows:
|
| rawparam = msg.get_param('foo')
| param = email.utils.collapse_rfc2231_value(rawparam)
|
| get_params(self, failobj=None, header='content-type', unquote=True)
| Return the message's Content-Type parameters, as a list.
|
| The elements of the returned list are 2-tuples of key/value pairs, as
| split on the `=' sign. The left hand side of the `=' is the key,
| while the right hand side is the value. If there is no `=' sign in
| the parameter the value is the empty string. The value is as
| described in the get_param() method.
|
| Optional failobj is the object to return if there is no Content-Type
| header. Optional header is the header to search instead of
| Content-Type. If unquote is True, the value is unquoted.
|
| get_payload(self, i=None, decode=False)
| Return a reference to the payload.
|
| The payload will either be a list object or a string. If you mutate
| the list object, you modify the message's payload in place. Optional
| i returns that index into the payload.
|
| Optional decode is a flag indicating whether the payload should be
| decoded or not, according to the Content-Transfer-Encoding header
| (default is False).
|
| When True and the message is not a multipart, the payload will be
| decoded if this header's value is `quoted-printable' or `base64'. If
| some other encoding is used, or the header is missing, or if the
| payload has bogus data (i.e. bogus base64 or uuencoded data), the
| payload is returned as-is.
|
| If the message is a multipart and the decode flag is True, then None
| is returned.
|
| get_unixfrom(self)
|
| is_multipart(self)
| Return True if the message consists of multiple parts.
|
| items(self)
| Get all the message's header fields and values.
|
| These will be sorted in the order they appeared in the original
| message, or were added to the message, and may contain duplicates.
| Any fields deleted and re-inserted are always appended to the header
| list.
|
| keys(self)
| Return a list of all the message's header field names.
|
| These will be sorted in the order they appeared in the original
| message, or were added to the message, and may contain duplicates.
| Any fields deleted and re-inserted are always appended to the header
| list.
|
| raw_items(self)
| Return the (name, value) header pairs without modification.
|
| This is an "internal" API, intended only for use by a generator.
|
| replace_header(self, _name, _value)
| Replace a header.
|
| Replace the first matching header found in the message, retaining
| header order and case. If no matching header was found, a KeyError is
| raised.
|
| set_boundary(self, boundary)
| Set the boundary parameter in Content-Type to 'boundary'.
|
| This is subtly different than deleting the Content-Type header and
| adding a new one with a new boundary parameter via add_header(). The
| main difference is that using the set_boundary() method preserves the
| order of the Content-Type header in the original message.
|
| HeaderParseError is raised if the message has no Content-Type header.
|
| set_charset(self, charset)
| Set the charset of the payload to a given character set.
|
| charset can be a Charset instance, a string naming a character set, or
| None. If it is a string it will be converted to a Charset instance.
| If charset is None, the charset parameter will be removed from the
| Content-Type field. Anything else will generate a TypeError.
|
| The message will be assumed to be of type text/* encoded with
| charset.input_charset. It will be converted to charset.output_charset
| and encoded properly, if needed, when generating the plain text
| representation of the message. MIME headers (MIME-Version,
| Content-Type, Content-Transfer-Encoding) will be added as needed.
|
| set_default_type(self, ctype)
| Set the `default' content type.
|
| ctype should be either "text/plain" or "message/rfc822", although this
| is not enforced. The default content type is not stored in the
| Content-Type header.
|
| set_param(self, param, value, header='Content-Type', requote=True, charset=None, language='', replace=False)
| Set a parameter in the Content-Type header.
|
| If the parameter already exists in the header, its value will be
| replaced with the new value.
|
| If header is Content-Type and has not yet been defined for this
| message, it will be set to "text/plain" and the new parameter and
| value will be appended as per RFC 2045.
|
| An alternate header can be specified in the header argument, and all
| parameters will be quoted as necessary unless requote is False.
|
| If charset is specified, the parameter will be encoded according to RFC
| 2231. Optional language specifies the RFC 2231 language, defaulting
| to the empty string. Both charset and language should be strings.
|
| set_payload(self, payload, charset=None)
| Set the payload to the given value.
|
| Optional charset sets the message's default character set. See
| set_charset() for details.
|
| set_raw(self, name, value)
| Store name and value in the model without modification.
|
| This is an "internal" API, intended only for use by a parser.
|
| set_type(self, type, header='Content-Type', requote=True)
| Set the main type and subtype for the Content-Type header.
|
| type must be a string in the form "maintype/subtype", otherwise a
| ValueError is raised.
|
| This method replaces the Content-Type header, keeping all the
| parameters in place. If requote is False, this leaves the existing
| header's quoting as is. Otherwise, the parameters will be quoted (the
| default).
|
| An alternative header can be specified in the header argument. When
| the Content-Type header is set, we'll always also add a MIME-Version
| header.
|
| set_unixfrom(self, unixfrom)
| # Unix From_ line
|
| values(self)
| Return a list of all the message's header values.
|
| These will be sorted in the order they appeared in the original
| message, or were added to the message, and may contain duplicates.
| Any fields deleted and re-inserted are always appended to the header
| list.
|
| walk(self) from email.iterators
| Walk over the message tree, yielding each subpart.
|
| The walk is performed in depth-first order. This method is a
| generator.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from email.message.Message:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
http.client.HTTPResponse
Python Library Documentation: class HTTPResponse in module http.client class HTTPResponse(io.BufferedIOBase) | HTTPResponse(sock, debuglevel=0, method=None, url=None) | | Method resolution order: | HTTPResponse | io.BufferedIOBase | _io._BufferedIOBase | io.IOBase | _io._IOBase | builtins.object | | Methods defined here: | | __init__(self, sock, debuglevel=0, method=None, url=None) | Initialize self. See help(type(self)) for accurate signature. | | __iter__(self) | Implement iter(self). | | begin(self) | | close(self) | Flush and close the IO object. | | This method has no effect if the file is already closed. | | fileno(self) | Return underlying file descriptor if one exists. | | Raise OSError if the IO object does not use a file descriptor. | | flush(self) | Flush write buffers, if applicable. | | This is not implemented for read-only and non-blocking streams. | | getcode(self) | Return the HTTP status code that was sent with the response, | or None if the URL is not an HTTP URL. | | getheader(self, name, default=None) | Returns the value of the header matching *name*. | | If there are multiple matching headers, the values are | combined into a single string separated by commas and spaces. | | If no matching header is found, returns *default* or None if | the *default* is not specified. | | If the headers are unknown, raises http.client.ResponseNotReady. | | getheaders(self) | Return list of (header, value) tuples. | | geturl(self) | Return the real URL of the page. | | In some cases, the HTTP server redirects a client to another | URL. The urlopen() function handles this transparently, but in | some cases the caller needs to know which URL the client was | redirected to. The geturl() method can be used to get at this | redirected URL. | | info(self) | Returns an instance of the class mimetools.Message containing | meta-information associated with the URL. | | When the method is HTTP, these headers are those returned by | the server at the head of the retrieved HTML page (including | Content-Length and Content-Type). | | When the method is FTP, a Content-Length header will be | present if (as is now usual) the server passed back a file | length in response to the FTP retrieval request. A | Content-Type header will be present if the MIME type can be | guessed. | | When the method is local-file, returned headers will include | a Date representing the file's last-modified time, a | Content-Length giving file size, and a Content-Type | containing a guess at the file's type. See also the | description of the mimetools module. | | isclosed(self) | True if the connection is closed. | | peek(self, n=-1) | | read(self, amt=None) | Read and return the response body, or up to the next amt bytes. | | read1(self, n=-1) | Read with at most one underlying system call. If at least one | byte is buffered, return that instead. | | readable(self) | Always returns True | | readinto(self, b) | Read up to len(b) bytes into bytearray b and return the number | of bytes read. | | readline(self, limit=-1) | Read and return a line from the stream. | | If size is specified, at most size bytes will be read. | | The line terminator is always b'\n' for binary files; for text | files, the newlines argument to open can be used to select the line | terminator(s) recognized. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __abstractmethods__ = frozenset() | | ---------------------------------------------------------------------- | Methods inherited from _io._BufferedIOBase: | | detach(self, /) | Disconnect this buffer from its underlying raw stream and return it. | | After the raw stream has been detached, the buffer is in an unusable | state. | | readinto1(self, buffer, /) | | write(self, b, /) | Write buffer b to the IO stream. | | Return the number of bytes written, which is always | the length of b in bytes. | | Raise BlockingIOError if the buffer is full and the | underlying raw stream cannot accept more data at the moment. | | ---------------------------------------------------------------------- | Methods inherited from _io._IOBase: | | __del__(...) | | __enter__(...) | | __exit__(...) | | __next__(self, /) | Implement next(self). | | isatty(self, /) | Return whether this is an 'interactive' stream. | | Return False if it can't be determined. | | readlines(self, hint=-1, /) | Return a list of lines from the stream. | | hint can be specified to control the number of lines read: no more | lines will be read if the total size (in bytes/characters) of all | lines so far exceeds hint. | | seek(self, offset, whence=0, /) | Change the stream position to the given byte offset. | | offset | The stream position, relative to 'whence'. | whence | The relative position to seek from. | | The offset is interpreted relative to the position indicated by whence. | Values for whence are: | | * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive | * os.SEEK_CUR or 1 -- current stream position; offset may be negative | * os.SEEK_END or 2 -- end of stream; offset is usually negative | | Return the new absolute position. | | seekable(self, /) | Return whether object supports random access. | | If False, seek(), tell() and truncate() will raise OSError. | This method may need to do a test seek(). | | tell(self, /) | Return current stream position. | | truncate(self, size=None, /) | Truncate file to size bytes. | | File pointer is left unchanged. Size defaults to the current IO position | as reported by tell(). Return the new size. | | writable(self, /) | Return whether object was opened for writing. | | If False, write() will raise OSError. | | writelines(self, lines, /) | Write a list of lines to stream. | | Line separators are not added, so it is usual for each of the | lines provided to have a line separator at the end. | | ---------------------------------------------------------------------- | Data descriptors inherited from _io._IOBase: | | __dict__ | | closed
http.client.HTTPSConnection
Python Library Documentation: class HTTPSConnection in module http.client
class HTTPSConnection(HTTPConnection)
| HTTPSConnection(host, port=None, *, timeout=<object object at 0x0000017B07D78B30>, source_address=None, context=None, blocksize=8192)
|
| This class allows communication via SSL.
|
| Method resolution order:
| HTTPSConnection
| HTTPConnection
| builtins.object
|
| Methods defined here:
|
| __init__(self, host, port=None, *, timeout=<object object at 0x0000017B07D78B30>, source_address=None, context=None, blocksize=8192)
| Initialize self. See help(type(self)) for accurate signature.
|
| connect(self)
| Connect to a host on a given (SSL) port.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| default_port = 443
|
| ----------------------------------------------------------------------
| Methods inherited from HTTPConnection:
|
| close(self)
| Close the connection to the HTTP server.
|
| endheaders(self, message_body=None, *, encode_chunked=False)
| Indicate that the last header line has been sent to the server.
|
| This method sends the request to the server. The optional message_body
| argument can be used to pass a message body associated with the
| request.
|
| get_proxy_response_headers(self)
| Returns a dictionary with the headers of the response
| received from the proxy server to the CONNECT request
| sent to set the tunnel.
|
| If the CONNECT request was not sent, the method returns None.
|
| getresponse(self)
| Get the response from the server.
|
| If the HTTPConnection is in the correct state, returns an
| instance of HTTPResponse or of whatever object is returned by
| the response_class variable.
|
| If a request has not been sent or if a previous response has
| not be handled, ResponseNotReady is raised. If the HTTP
| response indicates that the connection should be closed, then
| it will be closed before the response is returned. When the
| connection is closed, the underlying socket is closed.
|
| putheader(self, header, *values)
| Send a request header line to the server.
|
| For example: h.putheader('Accept', 'text/html')
|
| putrequest(self, method, url, skip_host=False, skip_accept_encoding=False)
| Send a request to the server.
|
| `method' specifies an HTTP request method, e.g. 'GET'.
| `url' specifies the object being requested, e.g. '/index.html'.
| `skip_host' if True does not add automatically a 'Host:' header
| `skip_accept_encoding' if True does not add automatically an
| 'Accept-Encoding:' header
|
| request(self, method, url, body=None, headers={}, *, encode_chunked=False)
| Send a complete request to the server.
|
| send(self, data)
| Send `data' to the server.
| ``data`` can be a string object, a bytes object, an array object, a
| file-like object that supports a .read() method, or an iterable object.
|
| set_debuglevel(self, level)
|
| set_tunnel(self, host, port=None, headers=None)
| Set up host and port for HTTP CONNECT tunnelling.
|
| In a connection that uses HTTP CONNECT tunnelling, the host passed to
| the constructor is used as a proxy server that relays all communication
| to the endpoint passed to `set_tunnel`. This done by sending an HTTP
| CONNECT request to the proxy server when the connection is established.
|
| This method must be called before the HTTP connection has been
| established.
|
| The headers argument should be a mapping of extra HTTP headers to send
| with the CONNECT request.
|
| As HTTP/1.1 is used for HTTP CONNECT tunnelling request, as per the RFC
| (https://tools.ietf.org/html/rfc7231#section-4.3.6), a HTTP Host:
| header must be provided, matching the authority-form of the request
| target provided as the destination for the CONNECT request. If a
| HTTP Host: header is not provided via the headers argument, one
| is generated and transmitted automatically.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from HTTPConnection:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from HTTPConnection:
|
| auto_open = 1
|
| debuglevel = 0
|
| response_class = <class 'http.client.HTTPResponse'>
http.client.HTTPS_PORT
Python Library Documentation: int object
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
http.client.HTTP_PORT
Python Library Documentation: int object
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
http.client.HTTP_VERSION_NOT_SUPPORTED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.IM_A_TEAPOT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.IM_USED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.INSUFFICIENT_STORAGE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.INTERNAL_SERVER_ERROR
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.ImproperConnectionState
Python Library Documentation: class ImproperConnectionState in module http.client class ImproperConnectionState(HTTPException) | Method resolution order: | ImproperConnectionState | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.IncompleteRead
Python Library Documentation: class IncompleteRead in module http.client class IncompleteRead(HTTPException) | IncompleteRead(partial, expected=None) | | Method resolution order: | IncompleteRead | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, partial, expected=None) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | __str__(self, /) from builtins.object | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.InvalidURL
Python Library Documentation: class InvalidURL in module http.client class InvalidURL(HTTPException) | Method resolution order: | InvalidURL | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.LENGTH_REQUIRED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.LOCKED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.LOOP_DETECTED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.LineTooLong
Python Library Documentation: class LineTooLong in module http.client class LineTooLong(HTTPException) | LineTooLong(line_type) | | Method resolution order: | LineTooLong | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, line_type) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.METHOD_NOT_ALLOWED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.MISDIRECTED_REQUEST
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.MOVED_PERMANENTLY
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.MULTIPLE_CHOICES
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.MULTI_STATUS
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NETWORK_AUTHENTICATION_REQUIRED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NON_AUTHORITATIVE_INFORMATION
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NOT_ACCEPTABLE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NOT_EXTENDED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NOT_FOUND
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NOT_IMPLEMENTED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NOT_MODIFIED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NO_CONTENT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.NotConnected
Python Library Documentation: class NotConnected in module http.client class NotConnected(HTTPException) | Method resolution order: | NotConnected | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.OK
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.PARTIAL_CONTENT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.PAYMENT_REQUIRED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.PERMANENT_REDIRECT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.PRECONDITION_FAILED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.PRECONDITION_REQUIRED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.PROCESSING
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.PROXY_AUTHENTICATION_REQUIRED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.REQUESTED_RANGE_NOT_SATISFIABLE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.REQUEST_ENTITY_TOO_LARGE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.REQUEST_HEADER_FIELDS_TOO_LARGE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.REQUEST_TIMEOUT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.REQUEST_URI_TOO_LONG
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.RESET_CONTENT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.RemoteDisconnected
Python Library Documentation: class RemoteDisconnected in module http.client class RemoteDisconnected(builtins.ConnectionResetError, BadStatusLine) | RemoteDisconnected(*pos, **kw) | | Method resolution order: | RemoteDisconnected | builtins.ConnectionResetError | builtins.ConnectionError | builtins.OSError | BadStatusLine | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, *pos, **kw) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __reduce__(...) | Helper for pickle. | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) class method of builtins.OSError | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | winerror | Win32 exception code | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.ResponseNotReady
Python Library Documentation: class ResponseNotReady in module http.client class ResponseNotReady(ImproperConnectionState) | Method resolution order: | ResponseNotReady | ImproperConnectionState | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.SEE_OTHER
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.SERVICE_UNAVAILABLE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.SWITCHING_PROTOCOLS
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.TEMPORARY_REDIRECT
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.TOO_EARLY
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.TOO_MANY_REQUESTS
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.UNAUTHORIZED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.UNAVAILABLE_FOR_LEGAL_REASONS
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.UNPROCESSABLE_ENTITY
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.UNSUPPORTED_MEDIA_TYPE
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.UPGRADE_REQUIRED
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.USE_PROXY
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.UnimplementedFileMode
Python Library Documentation: class UnimplementedFileMode in module http.client class UnimplementedFileMode(HTTPException) | Method resolution order: | UnimplementedFileMode | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.UnknownProtocol
Python Library Documentation: class UnknownProtocol in module http.client class UnknownProtocol(HTTPException) | UnknownProtocol(version) | | Method resolution order: | UnknownProtocol | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, version) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.UnknownTransferEncoding
Python Library Documentation: class UnknownTransferEncoding in module http.client class UnknownTransferEncoding(HTTPException) | Method resolution order: | UnknownTransferEncoding | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from HTTPException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.VARIANT_ALSO_NEGOTIATES
Python Library Documentation: HTTPStatus in module http object class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.client.collections
Python Library Documentation: package collections
NAME
collections
MODULE REFERENCE
https://docs.python.org/3.12/library/collections.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module implements specialized container datatypes providing
alternatives to Python's general purpose built-in containers, dict,
list, set, and tuple.
* namedtuple factory function for creating tuple subclasses with named fields
* deque list-like container with fast appends and pops on either end
* ChainMap dict-like class for creating a single view of multiple mappings
* Counter dict subclass for counting hashable objects
* OrderedDict dict subclass that remembers the order entries were added
* defaultdict dict subclass that calls a factory function to supply missing values
* UserDict wrapper around dictionary objects for easier dict subclassing
* UserList wrapper around list objects for easier list subclassing
* UserString wrapper around string objects for easier string subclassing
PACKAGE CONTENTS
abc
SUBMODULES
_collections_abc
CLASSES
builtins.dict(builtins.object)
Counter
OrderedDict
defaultdict
builtins.object
deque
collections.abc.MutableMapping(collections.abc.Mapping)
ChainMap
UserDict
collections.abc.MutableSequence(collections.abc.Sequence)
UserList
collections.abc.Sequence(collections.abc.Reversible, collections.abc.Collection)
UserString
class ChainMap(collections.abc.MutableMapping)
| ChainMap(*maps)
|
| A ChainMap groups multiple dicts (or other mappings) together
| to create a single, updateable view.
|
| The underlying mappings are stored in a list. That list is public and can
| be accessed or updated using the *maps* attribute. There is no other
| state.
|
| Lookups search the underlying mappings successively until a key is found.
| In contrast, writes, updates, and deletions only operate on the first
| mapping.
|
| Method resolution order:
| ChainMap
| collections.abc.MutableMapping
| collections.abc.Mapping
| collections.abc.Collection
| collections.abc.Sized
| collections.abc.Iterable
| collections.abc.Container
| builtins.object
|
| Methods defined here:
|
| __bool__(self)
|
| __contains__(self, key)
|
| __copy__ = copy(self)
|
| __delitem__(self, key)
|
| __getitem__(self, key)
|
| __init__(self, *maps)
| Initialize a ChainMap by setting *maps* to the given mappings.
| If no mappings are provided, a single empty dictionary is used.
|
| __ior__(self, other)
|
| __iter__(self)
|
| __len__(self)
|
| __missing__(self, key)
|
| __or__(self, other)
| Return self|value.
|
| __repr__(self)
| Return repr(self).
|
| __ror__(self, other)
| Return value|self.
|
| __setitem__(self, key, value)
|
| clear(self)
| Clear maps[0], leaving maps[1:] intact.
|
| copy(self)
| New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]
|
| get(self, key, default=None)
| D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
|
| new_child(self, m=None, **kwargs)
| New ChainMap with a new map followed by all previous maps.
| If no map is provided, an empty dict is used.
| Keyword arguments update the map or new empty dict.
|
| pop(self, key, *args)
| Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].
|
| popitem(self)
| Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromkeys(iterable, *args)
| Create a ChainMap with a single dict created from the iterable.
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| parents
| New ChainMap from maps[1:].
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.MutableMapping:
|
| setdefault(self, key, default=None)
| D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
|
| update(self, other=(), /, **kwds)
| D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.
| If E present and has a .keys() method, does: for k in E: D[k] = E[k]
| If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v
| In either case, this is followed by: for k, v in F.items(): D[k] = v
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.Mapping:
|
| __eq__(self, other)
| Return self==value.
|
| items(self)
| D.items() -> a set-like object providing a view on D's items
|
| keys(self)
| D.keys() -> a set-like object providing a view on D's keys
|
| values(self)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from collections.abc.Mapping:
|
| __hash__ = None
|
| __reversed__ = None
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Collection:
|
| __subclasshook__(C)
| Abstract classes can override this to customize issubclass().
|
| This is invoked early on by abc.ABCMeta.__subclasscheck__().
| It should return True, False or NotImplemented. If it returns
| NotImplemented, the normal algorithm is used. Otherwise, it
| overrides the normal algorithm (and the outcome is cached).
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Iterable:
|
| __class_getitem__ = GenericAlias(...)
| Represent a PEP 585 generic type
|
| E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
class Counter(builtins.dict)
| Counter(iterable=None, /, **kwds)
|
| Dict subclass for counting hashable items. Sometimes called a bag
| or multiset. Elements are stored as dictionary keys and their counts
| are stored as dictionary values.
|
| >>> c = Counter('abcdeabcdabcaba') # count elements from a string
|
| >>> c.most_common(3) # three most common elements
| [('a', 5), ('b', 4), ('c', 3)]
| >>> sorted(c) # list all unique elements
| ['a', 'b', 'c', 'd', 'e']
| >>> ''.join(sorted(c.elements())) # list elements with repetitions
| 'aaaaabbbbcccdde'
| >>> sum(c.values()) # total of all counts
| 15
|
| >>> c['a'] # count of letter 'a'
| 5
| >>> for elem in 'shazam': # update counts from an iterable
| ... c[elem] += 1 # by adding 1 to each element's count
| >>> c['a'] # now there are seven 'a'
| 7
| >>> del c['b'] # remove all 'b'
| >>> c['b'] # now there are zero 'b'
| 0
|
| >>> d = Counter('simsalabim') # make another counter
| >>> c.update(d) # add in the second counter
| >>> c['a'] # now there are nine 'a'
| 9
|
| >>> c.clear() # empty the counter
| >>> c
| Counter()
|
| Note: If a count is set to zero or reduced to zero, it will remain
| in the counter until the entry is deleted or the counter is cleared:
|
| >>> c = Counter('aaabbc')
| >>> c['b'] -= 2 # reduce the count of 'b' by two
| >>> c.most_common() # 'b' is still in, but its count is zero
| [('a', 3), ('c', 1), ('b', 0)]
|
| Method resolution order:
| Counter
| builtins.dict
| builtins.object
|
| Methods defined here:
|
| __add__(self, other)
| Add counts from two counters.
|
| >>> Counter('abbb') + Counter('bcc')
| Counter({'b': 4, 'c': 2, 'a': 1})
|
| __and__(self, other)
| Intersection is the minimum of corresponding counts.
|
| >>> Counter('abbb') & Counter('bcc')
| Counter({'b': 1})
|
| __delitem__(self, elem)
| Like dict.__delitem__() but does not raise KeyError for missing values.
|
| __eq__(self, other)
| True if all counts agree. Missing counts are treated as zero.
|
| __ge__(self, other)
| True if all counts in self are a superset of those in other.
|
| __gt__(self, other)
| True if all counts in self are a proper superset of those in other.
|
| __iadd__(self, other)
| Inplace add from another counter, keeping only positive counts.
|
| >>> c = Counter('abbb')
| >>> c += Counter('bcc')
| >>> c
| Counter({'b': 4, 'c': 2, 'a': 1})
|
| __iand__(self, other)
| Inplace intersection is the minimum of corresponding counts.
|
| >>> c = Counter('abbb')
| >>> c &= Counter('bcc')
| >>> c
| Counter({'b': 1})
|
| __init__(self, iterable=None, /, **kwds)
| Create a new, empty Counter object. And if given, count elements
| from an input iterable. Or, initialize the count from another mapping
| of elements to their counts.
|
| >>> c = Counter() # a new, empty counter
| >>> c = Counter('gallahad') # a new counter from an iterable
| >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping
| >>> c = Counter(a=4, b=2) # a new counter from keyword args
|
| __ior__(self, other)
| Inplace union is the maximum of value from either counter.
|
| >>> c = Counter('abbb')
| >>> c |= Counter('bcc')
| >>> c
| Counter({'b': 3, 'c': 2, 'a': 1})
|
| __isub__(self, other)
| Inplace subtract counter, but keep only results with positive counts.
|
| >>> c = Counter('abbbc')
| >>> c -= Counter('bccd')
| >>> c
| Counter({'b': 2, 'a': 1})
|
| __le__(self, other)
| True if all counts in self are a subset of those in other.
|
| __lt__(self, other)
| True if all counts in self are a proper subset of those in other.
|
| __missing__(self, key)
| The count of elements not in the Counter is zero.
|
| __ne__(self, other)
| True if any counts disagree. Missing counts are treated as zero.
|
| __neg__(self)
| Subtracts from an empty counter. Strips positive and zero counts,
| and flips the sign on negative counts.
|
| __or__(self, other)
| Union is the maximum of value in either of the input counters.
|
| >>> Counter('abbb') | Counter('bcc')
| Counter({'b': 3, 'c': 2, 'a': 1})
|
| __pos__(self)
| Adds an empty counter, effectively stripping negative and zero counts
|
| __reduce__(self)
| Helper for pickle.
|
| __repr__(self)
| Return repr(self).
|
| __sub__(self, other)
| Subtract count, but keep only results with positive counts.
|
| >>> Counter('abbbc') - Counter('bccd')
| Counter({'b': 2, 'a': 1})
|
| copy(self)
| Return a shallow copy.
|
| elements(self)
| Iterator over elements repeating each as many times as its count.
|
| >>> c = Counter('ABCABC')
| >>> sorted(c.elements())
| ['A', 'A', 'B', 'B', 'C', 'C']
|
| Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1
|
| >>> import math
| >>> prime_factors = Counter({2: 2, 3: 3, 17: 1})
| >>> math.prod(prime_factors.elements())
| 1836
|
| Note, if an element's count has been set to zero or is a negative
| number, elements() will ignore it.
|
| most_common(self, n=None)
| List the n most common elements and their counts from the most
| common to the least. If n is None, then list all element counts.
|
| >>> Counter('abracadabra').most_common(3)
| [('a', 5), ('b', 2), ('r', 2)]
|
| subtract(self, iterable=None, /, **kwds)
| Like dict.update() but subtracts counts instead of replacing them.
| Counts can be reduced below zero. Both the inputs and outputs are
| allowed to contain zero and negative counts.
|
| Source can be an iterable, a dictionary, or another Counter instance.
|
| >>> c = Counter('which')
| >>> c.subtract('witch') # subtract elements from another iterable
| >>> c.subtract(Counter('watch')) # subtract elements from another counter
| >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch
| 0
| >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch
| -1
|
| total(self)
| Sum of the counts
|
| update(self, iterable=None, /, **kwds)
| Like dict.update() but add counts instead of replacing them.
|
| Source can be an iterable, a dictionary, or another Counter instance.
|
| >>> c = Counter('which')
| >>> c.update('witch') # add elements from another iterable
| >>> d = Counter('watch')
| >>> c.update(d) # add elements from another counter
| >>> c['h'] # four 'h' in which, witch, and watch
| 4
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromkeys(iterable, v=None)
| Create a new dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.dict:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __iter__(self, /)
| Implement iter(self).
|
| __len__(self, /)
| Return len(self).
|
| __reversed__(self, /)
| Return a reverse iterator over the dict keys.
|
| __ror__(self, value, /)
| Return value|self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /)
| Remove and return a (key, value) pair as a 2-tuple.
|
| Pairs are returned in LIFO (last-in, first-out) order.
| Raises KeyError if the dict is empty.
|
| setdefault(self, key, default=None, /)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.dict:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.dict:
|
| __new__(*args, **kwargs) class method of builtins.dict
| Create and return a new object. See help(type) for accurate signature.
class OrderedDict(builtins.dict)
| Dictionary that remembers insertion order
|
| Method resolution order:
| OrderedDict
| builtins.dict
| builtins.object
|
| Methods defined here:
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __reduce__(...)
| Return state information for pickling
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(...)
| od.__reversed__() <==> reversed(od)
|
| __ror__(self, value, /)
| Return value|self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| od.clear() -> None. Remove all items from od.
|
| copy(...)
| od.copy() -> a shallow copy of od
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| move_to_end(self, /, key, last=True)
| Move an existing element to the end (or beginning if last is false).
|
| Raise KeyError if the element does not exist.
|
| pop(...)
| od.pop(key[,default]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /, last=True)
| Remove and return a (key, value) pair from the dictionary.
|
| Pairs are returned in LIFO order if last is true or FIFO order if false.
|
| setdefault(self, /, key, default=None)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| update(...)
| D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
| If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
| If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
| In either case, this is followed by: for k in F: D[k] = F[k]
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromkeys(iterable, value=None)
| Create a new ordered dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.dict:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __len__(self, /)
| Return len(self).
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.dict:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.dict:
|
| __new__(*args, **kwargs) class method of builtins.dict
| Create and return a new object. See help(type) for accurate signature.
class UserDict(collections.abc.MutableMapping)
| UserDict(dict=None, /, **kwargs)
|
| Method resolution order:
| UserDict
| collections.abc.MutableMapping
| collections.abc.Mapping
| collections.abc.Collection
| collections.abc.Sized
| collections.abc.Iterable
| collections.abc.Container
| builtins.object
|
| Methods defined here:
|
| __contains__(self, key)
| # Modify __contains__ and get() to work like dict
| # does when __missing__ is present.
|
| __copy__(self)
|
| __delitem__(self, key)
|
| __getitem__(self, key)
|
| __init__(self, dict=None, /, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __ior__(self, other)
|
| __iter__(self)
|
| __len__(self)
|
| __or__(self, other)
| Return self|value.
|
| __repr__(self)
| Return repr(self).
|
| __ror__(self, other)
| Return value|self.
|
| __setitem__(self, key, item)
|
| copy(self)
|
| get(self, key, default=None)
| D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromkeys(iterable, value=None)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.MutableMapping:
|
| clear(self)
| D.clear() -> None. Remove all items from D.
|
| pop(self, key, default=<object object at 0x0000017B07D781F0>)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
| If key is not found, d is returned if given, otherwise KeyError is raised.
|
| popitem(self)
| D.popitem() -> (k, v), remove and return some (key, value) pair
| as a 2-tuple; but raise KeyError if D is empty.
|
| setdefault(self, key, default=None)
| D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
|
| update(self, other=(), /, **kwds)
| D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.
| If E present and has a .keys() method, does: for k in E: D[k] = E[k]
| If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v
| In either case, this is followed by: for k, v in F.items(): D[k] = v
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.Mapping:
|
| __eq__(self, other)
| Return self==value.
|
| items(self)
| D.items() -> a set-like object providing a view on D's items
|
| keys(self)
| D.keys() -> a set-like object providing a view on D's keys
|
| values(self)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from collections.abc.Mapping:
|
| __hash__ = None
|
| __reversed__ = None
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Collection:
|
| __subclasshook__(C)
| Abstract classes can override this to customize issubclass().
|
| This is invoked early on by abc.ABCMeta.__subclasscheck__().
| It should return True, False or NotImplemented. If it returns
| NotImplemented, the normal algorithm is used. Otherwise, it
| overrides the normal algorithm (and the outcome is cached).
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Iterable:
|
| __class_getitem__ = GenericAlias(...)
| Represent a PEP 585 generic type
|
| E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
class UserList(collections.abc.MutableSequence)
| UserList(initlist=None)
|
| A more or less complete user-defined wrapper around list objects.
|
| Method resolution order:
| UserList
| collections.abc.MutableSequence
| collections.abc.Sequence
| collections.abc.Reversible
| collections.abc.Collection
| collections.abc.Sized
| collections.abc.Iterable
| collections.abc.Container
| builtins.object
|
| Methods defined here:
|
| __add__(self, other)
|
| __contains__(self, item)
|
| __copy__(self)
|
| __delitem__(self, i)
|
| __eq__(self, other)
| Return self==value.
|
| __ge__(self, other)
| Return self>=value.
|
| __getitem__(self, i)
|
| __gt__(self, other)
| Return self>value.
|
| __iadd__(self, other)
|
| __imul__(self, n)
|
| __init__(self, initlist=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __le__(self, other)
| Return self<=value.
|
| __len__(self)
|
| __lt__(self, other)
| Return self<value.
|
| __mul__(self, n)
|
| __radd__(self, other)
|
| __repr__(self)
| Return repr(self).
|
| __rmul__ = __mul__(self, n)
|
| __setitem__(self, i, item)
|
| append(self, item)
| S.append(value) -- append value to the end of the sequence
|
| clear(self)
| S.clear() -> None -- remove all items from S
|
| copy(self)
|
| count(self, item)
| S.count(value) -> integer -- return number of occurrences of value
|
| extend(self, other)
| S.extend(iterable) -- extend sequence by appending elements from the iterable
|
| index(self, item, *args)
| S.index(value, [start, [stop]]) -> integer -- return first index of value.
| Raises ValueError if the value is not present.
|
| Supporting start and stop arguments is optional, but
| recommended.
|
| insert(self, i, item)
| S.insert(index, value) -- insert value before index
|
| pop(self, i=-1)
| S.pop([index]) -> item -- remove and return item at index (default last).
| Raise IndexError if list is empty or index is out of range.
|
| remove(self, item)
| S.remove(value) -- remove first occurrence of value.
| Raise ValueError if the value is not present.
|
| reverse(self)
| S.reverse() -- reverse *IN PLACE*
|
| sort(self, /, *args, **kwds)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __hash__ = None
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.Sequence:
|
| __iter__(self)
|
| __reversed__(self)
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Reversible:
|
| __subclasshook__(C)
| Abstract classes can override this to customize issubclass().
|
| This is invoked early on by abc.ABCMeta.__subclasscheck__().
| It should return True, False or NotImplemented. If it returns
| NotImplemented, the normal algorithm is used. Otherwise, it
| overrides the normal algorithm (and the outcome is cached).
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Iterable:
|
| __class_getitem__ = GenericAlias(...)
| Represent a PEP 585 generic type
|
| E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
class UserString(collections.abc.Sequence)
| UserString(seq)
|
| Method resolution order:
| UserString
| collections.abc.Sequence
| collections.abc.Reversible
| collections.abc.Collection
| collections.abc.Sized
| collections.abc.Iterable
| collections.abc.Container
| builtins.object
|
| Methods defined here:
|
| __add__(self, other)
|
| __complex__(self)
|
| __contains__(self, char)
|
| __eq__(self, string)
| Return self==value.
|
| __float__(self)
|
| __ge__(self, string)
| Return self>=value.
|
| __getitem__(self, index)
|
| __getnewargs__(self)
|
| __gt__(self, string)
| Return self>value.
|
| __hash__(self)
| Return hash(self).
|
| __init__(self, seq)
| Initialize self. See help(type(self)) for accurate signature.
|
| __int__(self)
|
| __le__(self, string)
| Return self<=value.
|
| __len__(self)
|
| __lt__(self, string)
| Return self<value.
|
| __mod__(self, args)
|
| __mul__(self, n)
|
| __radd__(self, other)
|
| __repr__(self)
| Return repr(self).
|
| __rmod__(self, template)
|
| __rmul__ = __mul__(self, n)
|
| __str__(self)
| Return str(self).
|
| capitalize(self)
| # the following methods are defined in alphabetical order:
|
| casefold(self)
|
| center(self, width, *args)
|
| count(self, sub, start=0, end=9223372036854775807)
| S.count(value) -> integer -- return number of occurrences of value
|
| encode(self, encoding='utf-8', errors='strict')
|
| endswith(self, suffix, start=0, end=9223372036854775807)
|
| expandtabs(self, tabsize=8)
|
| find(self, sub, start=0, end=9223372036854775807)
|
| format(self, /, *args, **kwds)
|
| format_map(self, mapping)
|
| index(self, sub, start=0, end=9223372036854775807)
| S.index(value, [start, [stop]]) -> integer -- return first index of value.
| Raises ValueError if the value is not present.
|
| Supporting start and stop arguments is optional, but
| recommended.
|
| isalnum(self)
|
| isalpha(self)
|
| isascii(self)
|
| isdecimal(self)
|
| isdigit(self)
|
| isidentifier(self)
|
| islower(self)
|
| isnumeric(self)
|
| isprintable(self)
|
| isspace(self)
|
| istitle(self)
|
| isupper(self)
|
| join(self, seq)
|
| ljust(self, width, *args)
|
| lower(self)
|
| lstrip(self, chars=None)
|
| partition(self, sep)
|
| removeprefix(self, prefix, /)
|
| removesuffix(self, suffix, /)
|
| replace(self, old, new, maxsplit=-1)
|
| rfind(self, sub, start=0, end=9223372036854775807)
|
| rindex(self, sub, start=0, end=9223372036854775807)
|
| rjust(self, width, *args)
|
| rpartition(self, sep)
|
| rsplit(self, sep=None, maxsplit=-1)
|
| rstrip(self, chars=None)
|
| split(self, sep=None, maxsplit=-1)
|
| splitlines(self, keepends=False)
|
| startswith(self, prefix, start=0, end=9223372036854775807)
|
| strip(self, chars=None)
|
| swapcase(self)
|
| title(self)
|
| translate(self, *args)
|
| upper(self)
|
| zfill(self, width)
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.Sequence:
|
| __iter__(self)
|
| __reversed__(self)
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Reversible:
|
| __subclasshook__(C)
| Abstract classes can override this to customize issubclass().
|
| This is invoked early on by abc.ABCMeta.__subclasscheck__().
| It should return True, False or NotImplemented. If it returns
| NotImplemented, the normal algorithm is used. Otherwise, it
| overrides the normal algorithm (and the outcome is cached).
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Iterable:
|
| __class_getitem__ = GenericAlias(...)
| Represent a PEP 585 generic type
|
| E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
class defaultdict(builtins.dict)
| defaultdict(default_factory=None, /, [...]) --> dict with default factory
|
| The default factory is called without arguments to produce
| a new value when a key is not present, in __getitem__ only.
| A defaultdict compares equal to a dict with the same items.
| All remaining arguments are treated the same as if they were
| passed to the dict constructor, including keyword arguments.
|
| Method resolution order:
| defaultdict
| builtins.dict
| builtins.object
|
| Methods defined here:
|
| __copy__(...)
| D.copy() -> a shallow copy of D.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __missing__(...)
| __missing__(key) # Called by __getitem__ for missing key; pseudo-code:
| if self.default_factory is None: raise KeyError((key,))
| self[key] = value = self.default_factory()
| return value
|
| __or__(self, value, /)
| Return self|value.
|
| __reduce__(...)
| Return state information for pickling.
|
| __repr__(self, /)
| Return repr(self).
|
| __ror__(self, value, /)
| Return value|self.
|
| copy(...)
| D.copy() -> a shallow copy of D.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| default_factory
| Factory for default value called by __missing__().
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.dict:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reversed__(self, /)
| Return a reverse iterator over the dict keys.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /)
| Remove and return a (key, value) pair as a 2-tuple.
|
| Pairs are returned in LIFO (last-in, first-out) order.
| Raises KeyError if the dict is empty.
|
| setdefault(self, key, default=None, /)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| update(...)
| D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
| If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
| If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
| In either case, this is followed by: for k in F: D[k] = F[k]
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.dict:
|
| fromkeys(iterable, value=None, /)
| Create a new dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.dict:
|
| __new__(*args, **kwargs) class method of builtins.dict
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from builtins.dict:
|
| __hash__ = None
class deque(builtins.object)
| deque([iterable[, maxlen]]) --> deque object
|
| A list-like sequence optimized for data accesses near its endpoints.
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __copy__(...)
| Return a shallow copy of a deque.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __iadd__(self, value, /)
| Implement self+=value.
|
| __imul__(self, value, /)
| Implement self*=value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| Return state information for pickling.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(...)
| D.__reversed__() -- return a reverse iterator over the deque
|
| __rmul__(self, value, /)
| Return value*self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| D.__sizeof__() -- size of D in memory, in bytes
|
| append(...)
| Add an element to the right side of the deque.
|
| appendleft(...)
| Add an element to the left side of the deque.
|
| clear(...)
| Remove all elements from the deque.
|
| copy(...)
| Return a shallow copy of a deque.
|
| count(...)
| D.count(value) -- return number of occurrences of value
|
| extend(...)
| Extend the right side of the deque with elements from the iterable
|
| extendleft(...)
| Extend the left side of the deque with elements from the iterable
|
| index(...)
| D.index(value, [start, [stop]]) -- return first index of value.
| Raises ValueError if the value is not present.
|
| insert(...)
| D.insert(index, object) -- insert object before index
|
| pop(...)
| Remove and return the rightmost element.
|
| popleft(...)
| Remove and return the leftmost element.
|
| remove(...)
| D.remove(value) -- remove first occurrence of value.
|
| reverse(...)
| D.reverse() -- reverse *IN PLACE*
|
| rotate(...)
| Rotate the deque n steps to the right (default n=1). If n is negative, rotates left.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| maxlen
| maximum size of a deque or None if unbounded
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
FUNCTIONS
namedtuple(typename, field_names, *, rename=False, defaults=None, module=None)
Returns a new subclass of tuple with named fields.
>>> Point = namedtuple('Point', ['x', 'y'])
>>> Point.__doc__ # docstring for the new class
'Point(x, y)'
>>> p = Point(11, y=22) # instantiate with positional args or keywords
>>> p[0] + p[1] # indexable like a plain tuple
33
>>> x, y = p # unpack like a regular tuple
>>> x, y
(11, 22)
>>> p.x + p.y # fields also accessible by name
33
>>> d = p._asdict() # convert to a dictionary
>>> d['x']
11
>>> Point(**d) # convert from a dictionary
Point(x=11, y=22)
>>> p._replace(x=100) # _replace() is like str.replace() but targets named fields
Point(x=100, y=22)
DATA
__all__ = ['ChainMap', 'Counter', 'OrderedDict', 'UserDict', 'UserList...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\collections\__init__.py
http.client.email
Python Library Documentation: package email
NAME
email - A package for parsing, handling, and generating email messages.
MODULE REFERENCE
https://docs.python.org/3.12/library/email.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
PACKAGE CONTENTS
_encoded_words
_header_value_parser
_parseaddr
_policybase
base64mime
charset
contentmanager
encoders
errors
feedparser
generator
header
headerregistry
iterators
message
mime (package)
parser
policy
quoprimime
utils
FUNCTIONS
message_from_binary_file(fp, *args, **kws)
Read a binary file and parse its contents into a Message object model.
Optional _class and strict are passed to the Parser constructor.
message_from_bytes(s, *args, **kws)
Parse a bytes string into a Message object model.
Optional _class and strict are passed to the Parser constructor.
message_from_file(fp, *args, **kws)
Read a file and parse its contents into a Message object model.
Optional _class and strict are passed to the Parser constructor.
message_from_string(s, *args, **kws)
Parse a string into a Message object model.
Optional _class and strict are passed to the Parser constructor.
DATA
__all__ = ['base64mime', 'charset', 'encoders', 'errors', 'feedparser'...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\email\__init__.py
http.client.errno
Python Library Documentation: built-in module errno
NAME
errno - This module makes available standard errno system symbols.
MODULE REFERENCE
https://docs.python.org/3.12/library/errno.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
The value of each symbol is the corresponding integer value,
e.g., on most systems, errno.ENOENT equals the integer 2.
The dictionary errno.errorcode maps numeric codes to symbol names,
e.g., errno.errorcode[2] could be the string 'ENOENT'.
Symbols that are not relevant to the underlying system are not defined.
To map error codes to error messages, use the function os.strerror(),
e.g. os.strerror(2) could return 'No such file or directory'.
DATA
E2BIG = 7
EACCES = 13
EADDRINUSE = 10048
EADDRNOTAVAIL = 10049
EAFNOSUPPORT = 10047
EAGAIN = 11
EALREADY = 10037
EBADF = 9
EBADMSG = 104
EBUSY = 16
ECANCELED = 105
ECHILD = 10
ECONNABORTED = 10053
ECONNREFUSED = 10061
ECONNRESET = 10054
EDEADLK = 36
EDEADLOCK = 36
EDESTADDRREQ = 10039
EDOM = 33
EDQUOT = 10069
EEXIST = 17
EFAULT = 14
EFBIG = 27
EHOSTDOWN = 10064
EHOSTUNREACH = 10065
EIDRM = 111
EILSEQ = 42
EINPROGRESS = 10036
EINTR = 4
EINVAL = 22
EIO = 5
EISCONN = 10056
EISDIR = 21
ELOOP = 10062
EMFILE = 24
EMLINK = 31
EMSGSIZE = 10040
ENAMETOOLONG = 38
ENETDOWN = 10050
ENETRESET = 10052
ENETUNREACH = 10051
ENFILE = 23
ENOBUFS = 10055
ENODATA = 120
ENODEV = 19
ENOENT = 2
ENOEXEC = 8
ENOLCK = 39
ENOLINK = 121
ENOMEM = 12
ENOMSG = 122
ENOPROTOOPT = 10042
ENOSPC = 28
ENOSR = 124
ENOSTR = 125
ENOSYS = 40
ENOTCONN = 10057
ENOTDIR = 20
ENOTEMPTY = 41
ENOTRECOVERABLE = 127
ENOTSOCK = 10038
ENOTSUP = 129
ENOTTY = 25
ENXIO = 6
EOPNOTSUPP = 10045
EOVERFLOW = 132
EOWNERDEAD = 133
EPERM = 1
EPFNOSUPPORT = 10046
EPIPE = 32
EPROTO = 134
EPROTONOSUPPORT = 10043
EPROTOTYPE = 10041
ERANGE = 34
EREMOTE = 10071
EROFS = 30
ESHUTDOWN = 10058
ESOCKTNOSUPPORT = 10044
ESPIPE = 29
ESRCH = 3
ESTALE = 10070
ETIME = 137
ETIMEDOUT = 10060
ETOOMANYREFS = 10059
ETXTBSY = 139
EUSERS = 10068
EWOULDBLOCK = 10035
EXDEV = 18
WSABASEERR = 10000
WSAEACCES = 10013
WSAEADDRINUSE = 10048
WSAEADDRNOTAVAIL = 10049
WSAEAFNOSUPPORT = 10047
WSAEALREADY = 10037
WSAEBADF = 10009
WSAECONNABORTED = 10053
WSAECONNREFUSED = 10061
WSAECONNRESET = 10054
WSAEDESTADDRREQ = 10039
WSAEDISCON = 10101
WSAEDQUOT = 10069
WSAEFAULT = 10014
WSAEHOSTDOWN = 10064
WSAEHOSTUNREACH = 10065
WSAEINPROGRESS = 10036
WSAEINTR = 10004
WSAEINVAL = 10022
WSAEISCONN = 10056
WSAELOOP = 10062
WSAEMFILE = 10024
WSAEMSGSIZE = 10040
WSAENAMETOOLONG = 10063
WSAENETDOWN = 10050
WSAENETRESET = 10052
WSAENETUNREACH = 10051
WSAENOBUFS = 10055
WSAENOPROTOOPT = 10042
WSAENOTCONN = 10057
WSAENOTEMPTY = 10066
WSAENOTSOCK = 10038
WSAEOPNOTSUPP = 10045
WSAEPFNOSUPPORT = 10046
WSAEPROCLIM = 10067
WSAEPROTONOSUPPORT = 10043
WSAEPROTOTYPE = 10041
WSAEREMOTE = 10071
WSAESHUTDOWN = 10058
WSAESOCKTNOSUPPORT = 10044
WSAESTALE = 10070
WSAETIMEDOUT = 10060
WSAETOOMANYREFS = 10059
WSAEUSERS = 10068
WSAEWOULDBLOCK = 10035
WSANOTINITIALISED = 10093
WSASYSNOTREADY = 10091
WSAVERNOTSUPPORTED = 10092
errorcode = {1: 'EPERM', 2: 'ENOENT', 3: 'ESRCH', 4: 'EINTR', 5: 'EIO'...
FILE
(built-in)
http.client.error
Python Library Documentation: class HTTPException in module http.client class HTTPException(builtins.Exception) | Method resolution order: | HTTPException | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.client.http
Python Library Documentation: package http
NAME
http
MODULE REFERENCE
https://docs.python.org/3.12/library/http.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
PACKAGE CONTENTS
client
cookiejar
cookies
server
CLASSES
enum.IntEnum(builtins.int, enum.ReprEnum)
HTTPStatus
enum.StrEnum(builtins.str, enum.ReprEnum)
HTTPMethod
class HTTPMethod(enum.StrEnum)
| HTTPMethod(*values)
|
| HTTP methods and descriptions
|
| Methods from the following RFCs are all observed:
|
| * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
| * RFC 5789: PATCH Method for HTTP
|
| Method resolution order:
| HTTPMethod
| enum.StrEnum
| builtins.str
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.str
| Return a formatted version of the string as described by format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self, /) from builtins.str
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CONNECT = <HTTPMethod.CONNECT>
|
| DELETE = <HTTPMethod.DELETE>
|
| GET = <HTTPMethod.GET>
|
| HEAD = <HTTPMethod.HEAD>
|
| OPTIONS = <HTTPMethod.OPTIONS>
|
| PATCH = <HTTPMethod.PATCH>
|
| POST = <HTTPMethod.POST>
|
| PUT = <HTTPMethod.PUT>
|
| TRACE = <HTTPMethod.TRACE>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class HTTPStatus(enum.IntEnum)
| HTTPStatus(*values)
|
| HTTP status codes and reason phrases
|
| Status codes from the following RFCs are all observed:
|
| * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
| * RFC 6585: Additional HTTP Status Codes
| * RFC 3229: Delta encoding in HTTP
| * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518
| * RFC 5842: Binding Extensions to WebDAV
| * RFC 7238: Permanent Redirect
| * RFC 2295: Transparent Content Negotiation in HTTP
| * RFC 2774: An HTTP Extension Framework
| * RFC 7725: An HTTP Status Code to Report Legal Obstacles
| * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2)
| * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
| * RFC 8297: An HTTP Status Code for Indicating Hints
| * RFC 8470: Using Early Data in HTTP
|
| Method resolution order:
| HTTPStatus
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ACCEPTED = <HTTPStatus.ACCEPTED: 202>
|
| ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208>
|
| BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502>
|
| BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400>
|
| CONFLICT = <HTTPStatus.CONFLICT: 409>
|
| CONTINUE = <HTTPStatus.CONTINUE: 100>
|
| CREATED = <HTTPStatus.CREATED: 201>
|
| EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103>
|
| EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417>
|
| FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424>
|
| FORBIDDEN = <HTTPStatus.FORBIDDEN: 403>
|
| FOUND = <HTTPStatus.FOUND: 302>
|
| GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504>
|
| GONE = <HTTPStatus.GONE: 410>
|
| HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5...
|
| IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418>
|
| IM_USED = <HTTPStatus.IM_USED: 226>
|
| INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507>
|
| INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500>
|
| LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411>
|
| LOCKED = <HTTPStatus.LOCKED: 423>
|
| LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508>
|
| METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405>
|
| MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421>
|
| MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301>
|
| MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300>
|
| MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207>
|
| NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R...
|
| NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT...
|
| NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406>
|
| NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510>
|
| NOT_FOUND = <HTTPStatus.NOT_FOUND: 404>
|
| NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501>
|
| NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304>
|
| NO_CONTENT = <HTTPStatus.NO_CONTENT: 204>
|
| OK = <HTTPStatus.OK: 200>
|
| PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206>
|
| PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402>
|
| PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308>
|
| PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412>
|
| PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428>
|
| PROCESSING = <HTTPStatus.PROCESSING: 102>
|
| PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI...
|
| REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI...
|
| REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413>
|
| REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO...
|
| REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408>
|
| REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414>
|
| RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205>
|
| SEE_OTHER = <HTTPStatus.SEE_OTHER: 303>
|
| SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503>
|
| SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101>
|
| TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307>
|
| TOO_EARLY = <HTTPStatus.TOO_EARLY: 425>
|
| TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429>
|
| UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401>
|
| UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS...
|
| UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422>
|
| UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415>
|
| UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426>
|
| USE_PROXY = <HTTPStatus.USE_PROXY: 305>
|
| VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
DATA
__all__ = ['HTTPStatus', 'HTTPMethod']
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\http\__init__.py
http.client.io
Python Library Documentation: module io
NAME
io
MODULE REFERENCE
https://docs.python.org/3.12/library/io.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
The io module provides the Python interfaces to stream handling. The
builtin open function is defined in this module.
At the top of the I/O hierarchy is the abstract base class IOBase. It
defines the basic interface to a stream. Note, however, that there is no
separation between reading and writing to streams; implementations are
allowed to raise an OSError if they do not support a given operation.
Extending IOBase is RawIOBase which deals simply with the reading and
writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide
an interface to OS files.
BufferedIOBase deals with buffering on a raw byte stream (RawIOBase). Its
subclasses, BufferedWriter, BufferedReader, and BufferedRWPair buffer
streams that are readable, writable, and both respectively.
BufferedRandom provides a buffered interface to random access
streams. BytesIO is a simple stream of in-memory bytes.
Another IOBase subclass, TextIOBase, deals with the encoding and decoding
of streams into text. TextIOWrapper, which extends it, is a buffered text
interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO
is an in-memory stream for text.
Argument names are not part of the specification, and only the arguments
of open() are intended to be used as keyword arguments.
data:
DEFAULT_BUFFER_SIZE
An int containing the default buffer size used by the module's buffered
I/O classes. open() uses the file's blksize (as obtained by os.stat) if
possible.
CLASSES
_io._BufferedIOBase(_io._IOBase)
_io.BufferedRWPair
_io.BufferedRandom
_io.BufferedReader
_io.BufferedWriter
_io.BytesIO
BufferedIOBase(_io._BufferedIOBase, IOBase)
_io._IOBase(builtins.object)
IOBase
BufferedIOBase(_io._BufferedIOBase, IOBase)
RawIOBase(_io._RawIOBase, IOBase)
TextIOBase(_io._TextIOBase, IOBase)
_io._RawIOBase(_io._IOBase)
_io.FileIO
RawIOBase(_io._RawIOBase, IOBase)
_io._TextIOBase(_io._IOBase)
_io.StringIO
_io.TextIOWrapper
TextIOBase(_io._TextIOBase, IOBase)
builtins.OSError(builtins.Exception)
builtins.BlockingIOError
UnsupportedOperation(builtins.OSError, builtins.ValueError)
builtins.ValueError(builtins.Exception)
UnsupportedOperation(builtins.OSError, builtins.ValueError)
builtins.object
_io.IncrementalNewlineDecoder
class BlockingIOError(OSError)
| I/O operation would block.
|
| Method resolution order:
| BlockingIOError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class BufferedIOBase(_io._BufferedIOBase, IOBase)
| Base class for buffered IO objects.
|
| The main difference with RawIOBase is that the read() method
| supports omitting the size argument, and does not have a default
| implementation that defers to readinto().
|
| In addition, read(), readinto() and write() may raise
| BlockingIOError if the underlying raw stream is in non-blocking
| mode and not ready; unlike their raw counterparts, they will never
| return None.
|
| A typical implementation should not inherit from a RawIOBase
| implementation, but wrap one.
|
| Method resolution order:
| BufferedIOBase
| _io._BufferedIOBase
| IOBase
| _io._IOBase
| builtins.object
|
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._BufferedIOBase:
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| read(self, size=-1, /)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(self, size=-1, /)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readinto(self, buffer, /)
|
| readinto1(self, buffer, /)
|
| write(self, b, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class BufferedRWPair(_BufferedIOBase)
| BufferedRWPair(reader, writer, buffer_size=8192, /)
|
| A buffered reader and writer object together.
|
| A buffered reader object and buffered writer object put together to
| form a sequential IO object that can read and write. This is typically
| used with a socket or two-way pipe.
|
| reader and writer are RawIOBase objects that are readable and
| writeable respectively. If the buffer_size is omitted it defaults to
| DEFAULT_BUFFER_SIZE.
|
| Method resolution order:
| BufferedRWPair
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| close(...)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| flush(...)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(...)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| peek(...)
|
| read(...)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(...)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readable(...)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readinto(...)
|
| readinto1(...)
|
| writable(...)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| write(...)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| ----------------------------------------------------------------------
| Methods inherited from _BufferedIOBase:
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class BufferedRandom(_BufferedIOBase)
| BufferedRandom(raw, buffer_size=8192)
|
| A buffered interface to random access streams.
|
| The constructor creates a reader and writer for a seekable stream,
| raw, given in the first argument. If the buffer_size is omitted it
| defaults to DEFAULT_BUFFER_SIZE.
|
| Method resolution order:
| BufferedRandom
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(self, /)
| Size of object in memory, in bytes.
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| peek(self, size=0, /)
|
| read(self, size=-1, /)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(self, size=-1, /)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readinto(self, buffer, /)
|
| readinto1(self, buffer, /)
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| seek(self, target, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, pos=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| write(self, buffer, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| mode
|
| name
|
| raw
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class BufferedReader(_BufferedIOBase)
| BufferedReader(raw, buffer_size=8192)
|
| Create a new buffered reader using the given readable raw IO object.
|
| Method resolution order:
| BufferedReader
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(self, /)
| Size of object in memory, in bytes.
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| peek(self, size=0, /)
|
| read(self, size=-1, /)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(self, size=-1, /)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readinto(self, buffer, /)
|
| readinto1(self, buffer, /)
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| seek(self, target, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, pos=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| mode
|
| name
|
| raw
|
| ----------------------------------------------------------------------
| Methods inherited from _BufferedIOBase:
|
| write(self, b, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class BufferedWriter(_BufferedIOBase)
| BufferedWriter(raw, buffer_size=8192)
|
| A buffer for a writeable sequential RawIO object.
|
| The constructor creates a BufferedWriter for the given writeable raw
| stream. If the buffer_size is not given, it defaults to
| DEFAULT_BUFFER_SIZE.
|
| Method resolution order:
| BufferedWriter
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(self, /)
| Size of object in memory, in bytes.
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| seek(self, target, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, pos=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| write(self, buffer, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| mode
|
| name
|
| raw
|
| ----------------------------------------------------------------------
| Methods inherited from _BufferedIOBase:
|
| read(self, size=-1, /)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(self, size=-1, /)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readinto(self, buffer, /)
|
| readinto1(self, buffer, /)
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class BytesIO(_BufferedIOBase)
| BytesIO(initial_bytes=b'')
|
| Buffered I/O implementation using an in-memory bytes buffer.
|
| Method resolution order:
| BytesIO
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __getstate__(...)
| Helper for pickle.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __setstate__(...)
|
| __sizeof__(...)
| Size of object in memory, in bytes.
|
| close(self, /)
| Disable all I/O operations.
|
| flush(self, /)
| Does nothing.
|
| getbuffer(self, /)
| Get a read-write view over the contents of the BytesIO object.
|
| getvalue(self, /)
| Retrieve the entire contents of the BytesIO object.
|
| isatty(self, /)
| Always returns False.
|
| BytesIO objects are not connected to a TTY-like device.
|
| read(self, size=-1, /)
| Read at most size bytes, returned as a bytes object.
|
| If the size argument is negative, read until EOF is reached.
| Return an empty bytes object at EOF.
|
| read1(self, size=-1, /)
| Read at most size bytes, returned as a bytes object.
|
| If the size argument is negative or omitted, read until EOF is reached.
| Return an empty bytes object at EOF.
|
| readable(self, /)
| Returns True if the IO object can be read.
|
| readinto(self, buffer, /)
| Read bytes into buffer.
|
| Returns number of bytes read (0 for EOF), or None if the object
| is set not to block and has no data to read.
|
| readline(self, size=-1, /)
| Next line from the file, as a bytes object.
|
| Retain newline. A non-negative size argument limits the maximum
| number of bytes to return (an incomplete line may be returned then).
| Return an empty bytes object at EOF.
|
| readlines(self, size=None, /)
| List of bytes objects, each a line from the file.
|
| Call readline() repeatedly and return a list of the lines so read.
| The optional size argument, if given, is an approximate bound on the
| total number of bytes in the lines returned.
|
| seek(self, pos, whence=0, /)
| Change stream position.
|
| Seek to byte offset pos relative to position indicated by whence:
| 0 Start of stream (the default). pos should be >= 0;
| 1 Current position - pos may be negative;
| 2 End of stream - pos usually negative.
| Returns the new absolute position.
|
| seekable(self, /)
| Returns True if the IO object can be seeked.
|
| tell(self, /)
| Current file position, an integer.
|
| truncate(self, size=None, /)
| Truncate the file to at most size bytes.
|
| Size defaults to the current file position, as returned by tell().
| The current file position is unchanged. Returns the new size.
|
| writable(self, /)
| Returns True if the IO object can be written.
|
| write(self, b, /)
| Write bytes to file.
|
| Return the number of bytes written.
|
| writelines(self, lines, /)
| Write lines to the file.
|
| Note that newlines are not added. lines can be any iterable object
| producing bytes-like objects. This is equivalent to calling write() for
| each element.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
| True if the file is closed.
|
| ----------------------------------------------------------------------
| Methods inherited from _BufferedIOBase:
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| readinto1(self, buffer, /)
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class FileIO(_RawIOBase)
| FileIO(file, mode='r', closefd=True, opener=None)
|
| Open a file.
|
| The mode can be 'r' (default), 'w', 'x' or 'a' for reading,
| writing, exclusive creation or appending. The file will be created if it
| doesn't exist when opened for writing or appending; it will be truncated
| when opened for writing. A FileExistsError will be raised if it already
| exists when opened for creating. Opening a file for creating implies
| writing so this mode behaves in a similar way to 'w'.Add a '+' to the mode
| to allow simultaneous reading and writing. A custom opener can be used by
| passing a callable as *opener*. The underlying file descriptor for the file
| object is then obtained by calling opener with (*name*, *flags*).
| *opener* must return an open file descriptor (passing os.open as *opener*
| results in functionality similar to passing None).
|
| Method resolution order:
| FileIO
| _RawIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| close(self, /)
| Close the file.
|
| A closed file cannot be used for further I/O operations. close() may be
| called more than once without error.
|
| fileno(self, /)
| Return the underlying file descriptor (an integer).
|
| isatty(self, /)
| True if the file is connected to a TTY device.
|
| read(self, size=-1, /)
| Read at most size bytes, returned as bytes.
|
| Only makes one system call, so less data may be returned than requested.
| In non-blocking mode, returns None if no data is available.
| Return an empty bytes object at EOF.
|
| readable(self, /)
| True if file was opened in a read mode.
|
| readall(self, /)
| Read all data from the file, returned as bytes.
|
| In non-blocking mode, returns as much as is immediately available,
| or None if no data is available. Return an empty bytes object at EOF.
|
| readinto(self, buffer, /)
| Same as RawIOBase.readinto().
|
| seek(self, pos, whence=0, /)
| Move to new file position and return the file position.
|
| Argument offset is a byte count. Optional argument whence defaults to
| SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values
| are SEEK_CUR or 1 (move relative to current position, positive or negative),
| and SEEK_END or 2 (move relative to end of file, usually negative, although
| many platforms allow seeking beyond the end of a file).
|
| Note that not all file objects are seekable.
|
| seekable(self, /)
| True if file supports random-access.
|
| tell(self, /)
| Current file position.
|
| Can raise OSError for non seekable files.
|
| truncate(self, size=None, /)
| Truncate the file to at most size bytes and return the truncated size.
|
| Size defaults to the current file position, as returned by tell().
| The current file position is changed to the value of size.
|
| writable(self, /)
| True if file was opened in a write mode.
|
| write(self, b, /)
| Write buffer b to file, return number of bytes written.
|
| Only makes one system call, so not all of the data may be written.
| The number of bytes actually written is returned. In non-blocking mode,
| returns None if the write would block.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
| True if the file is closed
|
| closefd
| True if the file descriptor will be closed by close().
|
| mode
| String giving the file mode
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class IOBase(_io._IOBase)
| The abstract base class for all I/O classes.
|
| This class provides dummy implementations for many methods that
| derived classes can override selectively; the default implementations
| represent a file that cannot be read, written or seeked.
|
| Even though IOBase does not declare read, readinto, or write because
| their signatures will vary, implementations and clients should
| consider those methods part of the interface. Also, implementations
| may raise UnsupportedOperation when operations they do not support are
| called.
|
| The basic type used for binary data read from or written to a file is
| bytes. Other bytes-like objects are accepted as method arguments too.
| In some cases (such as readinto), a writable object is required. Text
| I/O classes work with str data.
|
| Note that calling any method (except additional calls to close(),
| which are ignored) on a closed stream should raise a ValueError.
|
| IOBase (and its subclasses) support the iterator protocol, meaning
| that an IOBase object can be iterated over yielding the lines in a
| stream.
|
| IOBase also supports the :keyword:`with` statement. In this example,
| fp is closed after the suite of the with statement is complete:
|
| with open('spam.txt', 'r') as fp:
| fp.write('Spam and eggs!')
|
| Method resolution order:
| IOBase
| _io._IOBase
| builtins.object
|
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class IncrementalNewlineDecoder(builtins.object)
| IncrementalNewlineDecoder(decoder, translate, errors='strict')
|
| Codec used when reading a file in universal newlines mode.
|
| It wraps another incremental decoder, translating \r\n and \r into \n.
| It also records the types of newlines encountered. When used with
| translate=False, it ensures that the newline sequence is returned in
| one piece. When used with decoder=None, it expects unicode strings as
| decode input and translates newlines without first invoking an external
| decoder.
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| decode(self, /, input, final=False)
|
| getstate(self, /)
|
| reset(self, /)
|
| setstate(self, state, /)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| newlines
class RawIOBase(_io._RawIOBase, IOBase)
| Base class for raw binary I/O.
|
| Method resolution order:
| RawIOBase
| _io._RawIOBase
| IOBase
| _io._IOBase
| builtins.object
|
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._RawIOBase:
|
| read(self, size=-1, /)
|
| readall(self, /)
| Read until EOF, using multiple read() call.
|
| readinto(...)
|
| write(...)
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class StringIO(_TextIOBase)
| StringIO(initial_value='', newline='\n')
|
| Text I/O implementation using an in-memory buffer.
|
| The initial_value argument sets the value of object. The newline
| argument is like the one of TextIOWrapper's constructor.
|
| Method resolution order:
| StringIO
| _TextIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __getstate__(...)
| Helper for pickle.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __next__(self, /)
| Implement next(self).
|
| __setstate__(...)
|
| close(self, /)
| Close the IO object.
|
| Attempting any further operation after the object is closed
| will raise a ValueError.
|
| This method has no effect if the file is already closed.
|
| getvalue(self, /)
| Retrieve the entire contents of the object.
|
| read(self, size=-1, /)
| Read at most size characters, returned as a string.
|
| If the argument is negative or omitted, read until EOF
| is reached. Return an empty string at EOF.
|
| readable(self, /)
| Returns True if the IO object can be read.
|
| readline(self, size=-1, /)
| Read until newline or EOF.
|
| Returns an empty string if EOF is hit immediately.
|
| seek(self, pos, whence=0, /)
| Change stream position.
|
| Seek to character offset pos relative to position indicated by whence:
| 0 Start of stream (the default). pos should be >= 0;
| 1 Current position - pos must be 0;
| 2 End of stream - pos must be 0.
| Returns the new absolute position.
|
| seekable(self, /)
| Returns True if the IO object can be seeked.
|
| tell(self, /)
| Tell the current file position.
|
| truncate(self, pos=None, /)
| Truncate size to pos.
|
| The pos argument defaults to the current file position, as
| returned by tell(). The current file position is unchanged.
| Returns the new absolute position.
|
| writable(self, /)
| Returns True if the IO object can be written.
|
| write(self, s, /)
| Write string to file.
|
| Returns the number of characters written, which is always equal to
| the length of the string.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| line_buffering
|
| newlines
| Line endings translated so far.
|
| Only line endings translated during reading are considered.
|
| Subclasses should override.
|
| ----------------------------------------------------------------------
| Methods inherited from _TextIOBase:
|
| detach(self, /)
| Separate the underlying buffer from the TextIOBase and return it.
|
| After the underlying buffer has been detached, the TextIO is in an unusable state.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _TextIOBase:
|
| encoding
| Encoding of the text stream.
|
| Subclasses should override.
|
| errors
| The error setting of the decoder or encoder.
|
| Subclasses should override.
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class TextIOBase(_io._TextIOBase, IOBase)
| Base class for text I/O.
|
| This class provides a character and line based interface to stream
| I/O. There is no readinto method because Python's character strings
| are immutable.
|
| Method resolution order:
| TextIOBase
| _io._TextIOBase
| IOBase
| _io._IOBase
| builtins.object
|
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._TextIOBase:
|
| detach(self, /)
| Separate the underlying buffer from the TextIOBase and return it.
|
| After the underlying buffer has been detached, the TextIO is in an unusable state.
|
| read(self, size=-1, /)
| Read at most size characters from stream.
|
| Read from underlying buffer until we have size characters or we hit EOF.
| If size is negative or omitted, read until EOF.
|
| readline(self, size=-1, /)
| Read until newline or EOF.
|
| Return an empty string if EOF is hit immediately.
| If size is specified, at most size characters will be read.
|
| write(self, s, /)
| Write string s to stream.
|
| Return the number of characters written
| (which is always equal to the length of the string).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._TextIOBase:
|
| encoding
| Encoding of the text stream.
|
| Subclasses should override.
|
| errors
| The error setting of the decoder or encoder.
|
| Subclasses should override.
|
| newlines
| Line endings translated so far.
|
| Only line endings translated during reading are considered.
|
| Subclasses should override.
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class TextIOWrapper(_TextIOBase)
| TextIOWrapper(buffer, encoding=None, errors=None, newline=None, line_buffering=False, write_through=False)
|
| Character and line based layer over a BufferedIOBase object, buffer.
|
| encoding gives the name of the encoding that the stream will be
| decoded or encoded with. It defaults to locale.getencoding().
|
| errors determines the strictness of encoding and decoding (see
| help(codecs.Codec) or the documentation for codecs.register) and
| defaults to "strict".
|
| newline controls how line endings are handled. It can be None, '',
| '\n', '\r', and '\r\n'. It works as follows:
|
| * On input, if newline is None, universal newlines mode is
| enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
| these are translated into '\n' before being returned to the
| caller. If it is '', universal newline mode is enabled, but line
| endings are returned to the caller untranslated. If it has any of
| the other legal values, input lines are only terminated by the given
| string, and the line ending is returned to the caller untranslated.
|
| * On output, if newline is None, any '\n' characters written are
| translated to the system default line separator, os.linesep. If
| newline is '' or '\n', no translation takes place. If newline is any
| of the other legal values, any '\n' characters written are translated
| to the given string.
|
| If line_buffering is True, a call to flush is implied when a call to
| write contains a newline character.
|
| Method resolution order:
| TextIOWrapper
| _TextIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| detach(self, /)
| Separate the underlying buffer from the TextIOBase and return it.
|
| After the underlying buffer has been detached, the TextIO is in an unusable state.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| read(self, size=-1, /)
| Read at most size characters from stream.
|
| Read from underlying buffer until we have size characters or we hit EOF.
| If size is negative or omitted, read until EOF.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read until newline or EOF.
|
| Return an empty string if EOF is hit immediately.
| If size is specified, at most size characters will be read.
|
| reconfigure(self, /, *, encoding=None, errors=None, newline=None, line_buffering=None, write_through=None)
| Reconfigure the text stream with new parameters.
|
| This also does an implicit stream flush.
|
| seek(self, cookie, whence=0, /)
| Set the stream position, and return the new stream position.
|
| cookie
| Zero or an opaque number returned by tell().
| whence
| The relative position to seek from.
|
| Four operations are supported, given by the following argument
| combinations:
|
| - seek(0, SEEK_SET): Rewind to the start of the stream.
| - seek(cookie, SEEK_SET): Restore a previous position;
| 'cookie' must be a number returned by tell().
| - seek(0, SEEK_END): Fast-forward to the end of the stream.
| - seek(0, SEEK_CUR): Leave the current stream position unchanged.
|
| Any other argument combinations are invalid,
| and may raise exceptions.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return the stream position as an opaque number.
|
| The return value of tell() can be given as input to seek(), to restore a
| previous stream position.
|
| truncate(self, pos=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| write(self, text, /)
| Write string s to stream.
|
| Return the number of characters written
| (which is always equal to the length of the string).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| buffer
|
| closed
|
| encoding
| Encoding of the text stream.
|
| Subclasses should override.
|
| errors
| The error setting of the decoder or encoder.
|
| Subclasses should override.
|
| line_buffering
|
| name
|
| newlines
| Line endings translated so far.
|
| Only line endings translated during reading are considered.
|
| Subclasses should override.
|
| write_through
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class UnsupportedOperation(builtins.OSError, builtins.ValueError)
| Method resolution order:
| UnsupportedOperation
| builtins.OSError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
Open file and return a stream. Raise OSError upon failure.
file is either a text or byte string giving the name (and the path
if the file isn't in the current working directory) of the file to
be opened or an integer file descriptor of the file to be
wrapped. (If a file descriptor is given, it is closed when the
returned I/O object is closed, unless closefd is set to False.)
mode is an optional string that specifies the mode in which the file
is opened. It defaults to 'r' which means open for reading in text
mode. Other common values are 'w' for writing (truncating the file if
it already exists), 'x' for creating and writing to a new file, and
'a' for appending (which on some Unix systems, means that all writes
append to the end of the file regardless of the current seek position).
In text mode, if encoding is not specified the encoding used is platform
dependent: locale.getencoding() is called to get the current locale encoding.
(For reading and writing raw bytes use binary mode and leave encoding
unspecified.) The available modes are:
========= ===============================================================
Character Meaning
--------- ---------------------------------------------------------------
'r' open for reading (default)
'w' open for writing, truncating the file first
'x' create a new file and open it for writing
'a' open for writing, appending to the end of the file if it exists
'b' binary mode
't' text mode (default)
'+' open a disk file for updating (reading and writing)
========= ===============================================================
The default mode is 'rt' (open for reading text). For binary random
access, the mode 'w+b' opens and truncates the file to 0 bytes, while
'r+b' opens the file without truncation. The 'x' mode implies 'w' and
raises an `FileExistsError` if the file already exists.
Python distinguishes between files opened in binary and text modes,
even when the underlying operating system doesn't. Files opened in
binary mode (appending 'b' to the mode argument) return contents as
bytes objects without any decoding. In text mode (the default, or when
't' is appended to the mode argument), the contents of the file are
returned as strings, the bytes having been first decoded using a
platform-dependent encoding or using the specified encoding if given.
buffering is an optional integer used to set the buffering policy.
Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
line buffering (only usable in text mode), and an integer > 1 to indicate
the size of a fixed-size chunk buffer. When no buffering argument is
given, the default buffering policy works as follows:
* Binary files are buffered in fixed-size chunks; the size of the buffer
is chosen using a heuristic trying to determine the underlying device's
"block size" and falling back on `io.DEFAULT_BUFFER_SIZE`.
On many systems, the buffer will typically be 4096 or 8192 bytes long.
* "Interactive" text files (files for which isatty() returns True)
use line buffering. Other text files use the policy described above
for binary files.
encoding is the name of the encoding used to decode or encode the
file. This should only be used in text mode. The default encoding is
platform dependent, but any encoding supported by Python can be
passed. See the codecs module for the list of supported encodings.
errors is an optional string that specifies how encoding errors are to
be handled---this argument should not be used in binary mode. Pass
'strict' to raise a ValueError exception if there is an encoding error
(the default of None has the same effect), or pass 'ignore' to ignore
errors. (Note that ignoring encoding errors can lead to data loss.)
See the documentation for codecs.register or run 'help(codecs.Codec)'
for a list of the permitted encoding error strings.
newline controls how universal newlines works (it only applies to text
mode). It can be None, '', '\n', '\r', and '\r\n'. It works as
follows:
* On input, if newline is None, universal newlines mode is
enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
these are translated into '\n' before being returned to the
caller. If it is '', universal newline mode is enabled, but line
endings are returned to the caller untranslated. If it has any of
the other legal values, input lines are only terminated by the given
string, and the line ending is returned to the caller untranslated.
* On output, if newline is None, any '\n' characters written are
translated to the system default line separator, os.linesep. If
newline is '' or '\n', no translation takes place. If newline is any
of the other legal values, any '\n' characters written are translated
to the given string.
If closefd is False, the underlying file descriptor will be kept open
when the file is closed. This does not work when a file name is given
and must be True in that case.
A custom opener can be used by passing a callable as *opener*. The
underlying file descriptor for the file object is then obtained by
calling *opener* with (*file*, *flags*). *opener* must return an open
file descriptor (passing os.open as *opener* results in functionality
similar to passing None).
open() returns a file object whose type depends on the mode, and
through which the standard file operations such as reading and writing
are performed. When open() is used to open a file in a text mode ('w',
'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open
a file in a binary mode, the returned class varies: in read binary
mode, it returns a BufferedReader; in write binary and append binary
modes, it returns a BufferedWriter, and in read/write mode, it returns
a BufferedRandom.
It is also possible to use a string or bytearray as a file for both
reading and writing. For strings StringIO can be used like a file
opened in a text mode, and for bytes a BytesIO can be used like a file
opened in a binary mode.
open_code(path)
Opens the provided file with the intent to import the contents.
This may perform extra validation beyond open(), but is otherwise interchangeable
with calling open(path, 'rb').
text_encoding(encoding, stacklevel=2, /)
A helper function to choose the text encoding.
When encoding is not None, this function returns it.
Otherwise, this function returns the default text encoding
(i.e. "locale" or "utf-8" depends on UTF-8 mode).
This function emits an EncodingWarning if encoding is None and
sys.flags.warn_default_encoding is true.
This can be used in APIs with an encoding=None parameter.
However, please consider using encoding="utf-8" for new APIs.
DATA
DEFAULT_BUFFER_SIZE = 8192
SEEK_CUR = 1
SEEK_END = 2
SEEK_SET = 0
__all__ = ['BlockingIOError', 'open', 'open_code', 'IOBase', 'RawIOBas...
AUTHOR
Guido van Rossum <guido@python.org>, Mike Verdone <mike.verdone@gmail.com>, Mark Russell <mark.russell@zen.co.uk>, Antoine Pitrou <solipsis@pitrou.net>, Amaury Forgeot d'Arc <amauryfa@gmail.com>, Benjamin Peterson <benjamin@python.org>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\io.py
http.client.parse_headers
Python Library Documentation: function parse_headers in module http.client
parse_headers(fp, _class=<class 'http.client.HTTPMessage'>)
Parses only RFC2822 headers from a file pointer.
http.client.re
Python Library Documentation: package re
NAME
re - Support for regular expressions (RE).
MODULE REFERENCE
https://docs.python.org/3.12/library/re.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides regular expression matching operations similar to
those found in Perl. It supports both 8-bit and Unicode strings; both
the pattern and the strings being processed can contain null bytes and
characters outside the US ASCII range.
Regular expressions can contain both special and ordinary characters.
Most ordinary characters, like "A", "a", or "0", are the simplest
regular expressions; they simply match themselves. You can
concatenate ordinary characters, so last matches the string 'last'.
The special characters are:
"." Matches any character except a newline.
"^" Matches the start of the string.
"$" Matches the end of the string or just before the newline at
the end of the string.
"*" Matches 0 or more (greedy) repetitions of the preceding RE.
Greedy means that it will match as many repetitions as possible.
"+" Matches 1 or more (greedy) repetitions of the preceding RE.
"?" Matches 0 or 1 (greedy) of the preceding RE.
*?,+?,?? Non-greedy versions of the previous three special characters.
{m,n} Matches from m to n repetitions of the preceding RE.
{m,n}? Non-greedy version of the above.
"\\" Either escapes special characters or signals a special sequence.
[] Indicates a set of characters.
A "^" as the first character indicates a complementing set.
"|" A|B, creates an RE that will match either A or B.
(...) Matches the RE inside the parentheses.
The contents can be retrieved or matched later in the string.
(?aiLmsux) The letters set the corresponding flags defined below.
(?:...) Non-grouping version of regular parentheses.
(?P<name>...) The substring matched by the group is accessible by name.
(?P=name) Matches the text matched earlier by the group named name.
(?#...) A comment; ignored.
(?=...) Matches if ... matches next, but doesn't consume the string.
(?!...) Matches if ... doesn't match next.
(?<=...) Matches if preceded by ... (must be fixed length).
(?<!...) Matches if not preceded by ... (must be fixed length).
(?(id/name)yes|no) Matches yes pattern if the group with id/name matched,
the (optional) no pattern otherwise.
The special sequences consist of "\\" and a character from the list
below. If the ordinary character is not on the list, then the
resulting RE will match the second character.
\number Matches the contents of the group of the same number.
\A Matches only at the start of the string.
\Z Matches only at the end of the string.
\b Matches the empty string, but only at the start or end of a word.
\B Matches the empty string, but not at the start or end of a word.
\d Matches any decimal digit; equivalent to the set [0-9] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode digits.
\D Matches any non-digit character; equivalent to [^\d].
\s Matches any whitespace character; equivalent to [ \t\n\r\f\v] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode whitespace characters.
\S Matches any non-whitespace character; equivalent to [^\s].
\w Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]
in bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the
range of Unicode alphanumeric characters (letters plus digits
plus underscore).
With LOCALE, it will match the set [0-9_] plus characters defined
as letters for the current locale.
\W Matches the complement of \w.
\\ Matches a literal backslash.
This module exports the following functions:
match Match a regular expression pattern to the beginning of a string.
fullmatch Match a regular expression pattern to all of a string.
search Search a string for the presence of a pattern.
sub Substitute occurrences of a pattern found in a string.
subn Same as sub, but also return the number of substitutions made.
split Split a string by the occurrences of a pattern.
findall Find all occurrences of a pattern in a string.
finditer Return an iterator yielding a Match object for each match.
compile Compile a pattern into a Pattern object.
purge Clear the regular expression cache.
escape Backslash all non-alphanumerics in a string.
Each function other than purge and escape can take an optional 'flags' argument
consisting of one or more of the following module constants, joined by "|".
A, L, and U are mutually exclusive.
A ASCII For string patterns, make \w, \W, \b, \B, \d, \D
match the corresponding ASCII character categories
(rather than the whole Unicode categories, which is the
default).
For bytes patterns, this flag is the only available
behaviour and needn't be specified.
I IGNORECASE Perform case-insensitive matching.
L LOCALE Make \w, \W, \b, \B, dependent on the current locale.
M MULTILINE "^" matches the beginning of lines (after a newline)
as well as the string.
"$" matches the end of lines (before a newline) as well
as the end of the string.
S DOTALL "." matches any character at all, including the newline.
X VERBOSE Ignore whitespace and comments for nicer looking RE's.
U UNICODE For compatibility only. Ignored for string patterns (it
is the default), and forbidden for bytes patterns.
This module also defines an exception 'error'.
PACKAGE CONTENTS
_casefix
_compiler
_constants
_parser
CLASSES
builtins.Exception(builtins.BaseException)
error
builtins.object
Match
Pattern
enum.IntFlag(builtins.int, enum.ReprEnum, enum.Flag)
RegexFlag
class Match(builtins.object)
| The result of re.match() and re.search().
| Match objects always have a boolean value of True.
|
| Methods defined here:
|
| __copy__(self, /)
|
| __deepcopy__(self, memo, /)
|
| __getitem__(self, key, /)
| Return self[key].
|
| __repr__(self, /)
| Return repr(self).
|
| end(self, group=0, /)
| Return index of the end of the substring matched by group.
|
| expand(self, /, template)
| Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.
|
| group(...)
| group([group1, ...]) -> str or tuple.
| Return subgroup(s) of the match by indices or names.
| For 0 returns the entire match.
|
| groupdict(self, /, default=None)
| Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
|
| default
| Is used for groups that did not participate in the match.
|
| groups(self, /, default=None)
| Return a tuple containing all the subgroups of the match, from 1.
|
| default
| Is used for groups that did not participate in the match.
|
| span(self, group=0, /)
| For match object m, return the 2-tuple (m.start(group), m.end(group)).
|
| start(self, group=0, /)
| Return index of the start of the substring matched by group.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| endpos
| The index into the string beyond which the RE engine will not go.
|
| lastgroup
| The name of the last matched capturing group.
|
| lastindex
| The integer index of the last matched capturing group.
|
| pos
| The index into the string at which the RE engine started looking for a match.
|
| re
| The regular expression object.
|
| regs
|
| string
| The string passed to match() or search().
class Pattern(builtins.object)
| Compiled regular expression object.
|
| Methods defined here:
|
| __copy__(self, /)
|
| __deepcopy__(self, memo, /)
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| findall(self, /, string, pos=0, endpos=9223372036854775807)
| Return a list of all non-overlapping matches of pattern in string.
|
| finditer(self, /, string, pos=0, endpos=9223372036854775807)
| Return an iterator over all non-overlapping matches for the RE pattern in string.
|
| For each match, the iterator returns a match object.
|
| fullmatch(self, /, string, pos=0, endpos=9223372036854775807)
| Matches against all of the string.
|
| match(self, /, string, pos=0, endpos=9223372036854775807)
| Matches zero or more characters at the beginning of the string.
|
| scanner(self, /, string, pos=0, endpos=9223372036854775807)
|
| search(self, /, string, pos=0, endpos=9223372036854775807)
| Scan through string looking for a match, and return a corresponding match object instance.
|
| Return None if no position in the string matches.
|
| split(self, /, string, maxsplit=0)
| Split string by the occurrences of pattern.
|
| sub(self, /, repl, string, count=0)
| Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
|
| subn(self, /, repl, string, count=0)
| Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| flags
| The regex matching flags.
|
| groupindex
| A dictionary mapping group names to group numbers.
|
| groups
| The number of capturing groups in the pattern.
|
| pattern
| The pattern string from which the RE object was compiled.
class RegexFlag(enum.IntFlag)
| RegexFlag(*values)
|
| An enumeration.
|
| Method resolution order:
| RegexFlag
| enum.IntFlag
| builtins.int
| enum.ReprEnum
| enum.Flag
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __and__(self, other) from enum.Flag
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __invert__(self) from enum.Flag
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __or__(self, other) from enum.Flag
| Return self|value.
|
| __rand__ = __and__(self, other)
|
| __repr__ = global_flag_repr(self) from enum
| use module.flag_name instead of class.flag_name
|
| the module is the last module in case of a multi-module name
|
| __ror__ = __or__(self, other)
|
| __rxor__ = __xor__(self, other)
|
| __str__(self, /) from builtins.object
| Return str(self).
|
| __xor__(self, other) from enum.Flag
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ASCII = re.ASCII
|
| DEBUG = re.DEBUG
|
| DOTALL = re.DOTALL
|
| IGNORECASE = re.IGNORECASE
|
| LOCALE = re.LOCALE
|
| MULTILINE = re.MULTILINE
|
| TEMPLATE = re.TEMPLATE
|
| UNICODE = re.UNICODE
|
| VERBOSE = re.VERBOSE
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Flag:
|
| __contains__(self, other)
| Returns True if self has at least the same flags set as other.
|
| __iter__(self)
| Returns flags in definition order.
|
| __len__(self)
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __getitem__(name)
| Return the member matching `name`.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class error(builtins.Exception)
| error(msg, pattern=None, pos=None)
|
| Exception raised for invalid regular expressions.
|
| Attributes:
|
| msg: The unformatted error message
| pattern: The regular expression pattern
| pos: The index in the pattern where compilation failed (may be None)
| lineno: The line corresponding to pos (may be None)
| colno: The column corresponding to pos (may be None)
|
| Method resolution order:
| error
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, msg, pattern=None, pos=None) from re._constants.error
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
compile(pattern, flags=0)
Compile a regular expression pattern, returning a Pattern object.
escape(pattern)
Escape special characters in a string.
findall(pattern, string, flags=0)
Return a list of all non-overlapping matches in the string.
If one or more capturing groups are present in the pattern, return
a list of groups; this will be a list of tuples if the pattern
has more than one group.
Empty matches are included in the result.
finditer(pattern, string, flags=0)
Return an iterator over all non-overlapping matches in the
string. For each match, the iterator returns a Match object.
Empty matches are included in the result.
fullmatch(pattern, string, flags=0)
Try to apply the pattern to all of the string, returning
a Match object, or None if no match was found.
match(pattern, string, flags=0)
Try to apply the pattern at the start of the string, returning
a Match object, or None if no match was found.
purge()
Clear the regular expression caches
search(pattern, string, flags=0)
Scan through string looking for a match to the pattern, returning
a Match object, or None if no match was found.
split(pattern, string, maxsplit=0, flags=0)
Split the source string by the occurrences of the pattern,
returning a list containing the resulting substrings. If
capturing parentheses are used in pattern, then the text of all
groups in the pattern are also returned as part of the resulting
list. If maxsplit is nonzero, at most maxsplit splits occur,
and the remainder of the string is returned as the final element
of the list.
sub(pattern, repl, string, count=0, flags=0)
Return the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in string by the
replacement repl. repl can be either a string or a callable;
if a string, backslash escapes in it are processed. If it is
a callable, it's passed the Match object and must return
a replacement string to be used.
subn(pattern, repl, string, count=0, flags=0)
Return a 2-tuple containing (new_string, number).
new_string is the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in the source
string by the replacement repl. number is the number of
substitutions that were made. repl can be either a string or a
callable; if a string, backslash escapes in it are processed.
If it is a callable, it's passed the Match object and must
return a replacement string to be used.
template(pattern, flags=0)
Compile a template pattern, returning a Pattern object, deprecated
DATA
A = re.ASCII
ASCII = re.ASCII
DOTALL = re.DOTALL
I = re.IGNORECASE
IGNORECASE = re.IGNORECASE
L = re.LOCALE
LOCALE = re.LOCALE
M = re.MULTILINE
MULTILINE = re.MULTILINE
NOFLAG = re.NOFLAG
S = re.DOTALL
U = re.UNICODE
UNICODE = re.UNICODE
VERBOSE = re.VERBOSE
X = re.VERBOSE
__all__ = ['match', 'fullmatch', 'search', 'sub', 'subn', 'split', 'fi...
VERSION
2.2.1
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\re\__init__.py
http.client.responses
Python Library Documentation: dict object
class dict(object)
| dict() -> new empty dictionary
| dict(mapping) -> new dictionary initialized from a mapping object's
| (key, value) pairs
| dict(iterable) -> new dictionary initialized as if via:
| d = {}
| for k, v in iterable:
| d[k] = v
| dict(**kwargs) -> new dictionary initialized with the name=value pairs
| in the keyword argument list. For example: dict(one=1, two=2)
|
| Methods defined here:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(self, /)
| Return a reverse iterator over the dict keys.
|
| __ror__(self, value, /)
| Return value|self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /)
| Remove and return a (key, value) pair as a 2-tuple.
|
| Pairs are returned in LIFO (last-in, first-out) order.
| Raises KeyError if the dict is empty.
|
| setdefault(self, key, default=None, /)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| update(...)
| D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
| If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
| If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
| In either case, this is followed by: for k in F: D[k] = F[k]
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| fromkeys(iterable, value=None, /)
| Create a new dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
http.client.socket
Python Library Documentation: module socket
NAME
socket
MODULE REFERENCE
https://docs.python.org/3.12/library/socket.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available as methods of the socket object.
Functions:
socket() -- create a new socket object
socketpair() -- create a pair of new socket objects [*]
fromfd() -- create a socket object from an open file descriptor [*]
send_fds() -- Send file descriptor to the socket.
recv_fds() -- Receive file descriptors from the socket.
fromshare() -- create a socket object from data received from socket.share() [*]
gethostname() -- return the current hostname
gethostbyname() -- map a hostname to its IP number
gethostbyaddr() -- map an IP number or hostname to DNS info
getservbyname() -- map a service name and a protocol name to a port number
getprotobyname() -- map a protocol name (e.g. 'tcp') to a number
ntohs(), ntohl() -- convert 16, 32 bit int from network to host byte order
htons(), htonl() -- convert 16, 32 bit int from host to network byte order
inet_aton() -- convert IP addr string (123.45.67.89) to 32-bit packed format
inet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89)
socket.getdefaulttimeout() -- get the default timeout value
socket.setdefaulttimeout() -- set the default timeout value
create_connection() -- connects to an address, with an optional timeout and
optional source address.
create_server() -- create a TCP socket and bind it to a specified address.
[*] not available on all platforms!
Special objects:
SocketType -- type object for socket objects
error -- exception raised for I/O errors
has_ipv6 -- boolean value indicating if IPv6 is supported
IntEnum constants:
AF_INET, AF_UNIX -- socket domains (first argument to socket() call)
SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument)
Integer constants:
Many other constants may be defined; these may be used in calls to
the setsockopt() and getsockopt() methods.
CLASSES
builtins.Exception(builtins.BaseException)
builtins.OSError
builtins.TimeoutError
gaierror
herror
builtins.object
_socket.socket
socket
enum.IntEnum(builtins.int, enum.ReprEnum)
AddressFamily
SocketKind
class AddressFamily(enum.IntEnum)
| AddressFamily(*values)
|
| An enumeration.
|
| Method resolution order:
| AddressFamily
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| AF_APPLETALK = <AddressFamily.AF_APPLETALK: 16>
|
| AF_BLUETOOTH = <AddressFamily.AF_BLUETOOTH: 32>
|
| AF_HYPERV = <AddressFamily.AF_HYPERV: 34>
|
| AF_INET = <AddressFamily.AF_INET: 2>
|
| AF_INET6 = <AddressFamily.AF_INET6: 23>
|
| AF_IPX = <AddressFamily.AF_IPX: 6>
|
| AF_IRDA = <AddressFamily.AF_IRDA: 26>
|
| AF_LINK = <AddressFamily.AF_LINK: 33>
|
| AF_SNA = <AddressFamily.AF_SNA: 11>
|
| AF_UNSPEC = <AddressFamily.AF_UNSPEC: 0>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class SocketKind(enum.IntEnum)
| SocketKind(*values)
|
| An enumeration.
|
| Method resolution order:
| SocketKind
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| SOCK_DGRAM = <SocketKind.SOCK_DGRAM: 2>
|
| SOCK_RAW = <SocketKind.SOCK_RAW: 3>
|
| SOCK_RDM = <SocketKind.SOCK_RDM: 4>
|
| SOCK_SEQPACKET = <SocketKind.SOCK_SEQPACKET: 5>
|
| SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
SocketType = class socket(builtins.object)
| socket(family=AF_INET, type=SOCK_STREAM, proto=0) -> socket object
| socket(family=-1, type=-1, proto=-1, fileno=None) -> socket object
|
| Open a socket of the given type. The family argument specifies the
| address family; it defaults to AF_INET. The type argument specifies
| whether this is a stream (SOCK_STREAM, this is the default)
| or datagram (SOCK_DGRAM) socket. The protocol argument defaults to 0,
| specifying the default protocol. Keyword arguments are accepted.
| The socket is created as non-inheritable.
|
| When a fileno is passed in, family, type and proto are auto-detected,
| unless they are explicitly set.
|
| A socket object represents one endpoint of a network connection.
|
| Methods of socket objects (keyword arguments not allowed):
|
| _accept() -- accept connection, returning new socket fd and client address
| bind(addr) -- bind the socket to a local address
| close() -- close the socket
| connect(addr) -- connect the socket to a remote address
| connect_ex(addr) -- connect, return an error code instead of an exception
| dup() -- return a new socket fd duplicated from fileno()
| fileno() -- return underlying file descriptor
| getpeername() -- return remote address [*]
| getsockname() -- return local address
| getsockopt(level, optname[, buflen]) -- get socket options
| gettimeout() -- return timeout or None
| listen([n]) -- start listening for incoming connections
| recv(buflen[, flags]) -- receive data
| recv_into(buffer[, nbytes[, flags]]) -- receive data (into a buffer)
| recvfrom(buflen[, flags]) -- receive data and sender's address
| recvfrom_into(buffer[, nbytes, [, flags])
| -- receive data and sender's address (into a buffer)
| sendall(data[, flags]) -- send all data
| send(data[, flags]) -- send data, may not send all of it
| sendto(data[, flags], addr) -- send data to a given address
| setblocking(bool) -- set or clear the blocking I/O flag
| getblocking() -- return True if socket is blocking, False if non-blocking
| setsockopt(level, optname, value[, optlen]) -- set socket options
| settimeout(None | float) -- set or clear the timeout
| shutdown(how) -- shut down traffic in one or both directions
|
| [*] not available on all platforms!
|
| Methods defined here:
|
| __del__(...)
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self, /)
| Return repr(self).
|
| bind(...)
| bind(address)
|
| Bind the socket to a local address. For IP sockets, the address is a
| pair (host, port); the host must refer to the local host. For raw packet
| sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])
|
| close(...)
| close()
|
| Close the socket. It cannot be used after this call.
|
| connect(...)
| connect(address)
|
| Connect the socket to a remote address. For IP sockets, the address
| is a pair (host, port).
|
| connect_ex(...)
| connect_ex(address) -> errno
|
| This is like connect(address), but returns an error code (the errno value)
| instead of raising an exception when an error occurs.
|
| detach(...)
| detach()
|
| Close the socket object without closing the underlying file descriptor.
| The object cannot be used after this call, but the file descriptor
| can be reused for other purposes. The file descriptor is returned.
|
| fileno(...)
| fileno() -> integer
|
| Return the integer file descriptor of the socket.
|
| getblocking(...)
| getblocking()
|
| Returns True if socket is in blocking mode, or False if it
| is in non-blocking mode.
|
| getpeername(...)
| getpeername() -> address info
|
| Return the address of the remote endpoint. For IP sockets, the address
| info is a pair (hostaddr, port).
|
| getsockname(...)
| getsockname() -> address info
|
| Return the address of the local endpoint. The format depends on the
| address family. For IPv4 sockets, the address info is a pair
| (hostaddr, port). For IPv6 sockets, the address info is a 4-tuple
| (hostaddr, port, flowinfo, scope_id).
|
| getsockopt(...)
| getsockopt(level, option[, buffersize]) -> value
|
| Get a socket option. See the Unix manual for level and option.
| If a nonzero buffersize argument is given, the return value is a
| string of that length; otherwise it is an integer.
|
| gettimeout(...)
| gettimeout() -> timeout
|
| Returns the timeout in seconds (float) associated with socket
| operations. A timeout of None indicates that timeouts on socket
| operations are disabled.
|
| ioctl(...)
| ioctl(cmd, option) -> long
|
| Control the socket with WSAIoctl syscall. Currently supported 'cmd' values are
| SIO_RCVALL: 'option' must be one of the socket.RCVALL_* constants.
| SIO_KEEPALIVE_VALS: 'option' is a tuple of (onoff, timeout, interval).
| SIO_LOOPBACK_FAST_PATH: 'option' is a boolean value, and is disabled by default
|
| listen(...)
| listen([backlog])
|
| Enable a server to accept connections. If backlog is specified, it must be
| at least 0 (if it is lower, it is set to 0); it specifies the number of
| unaccepted connections that the system will allow before refusing new
| connections. If not specified, a default reasonable value is chosen.
|
| recv(...)
| recv(buffersize[, flags]) -> data
|
| Receive up to buffersize bytes from the socket. For the optional flags
| argument, see the Unix manual. When no data is available, block until
| at least one byte is available or until the remote end is closed. When
| the remote end is closed and all data is read, return the empty string.
|
| recv_into(...)
| recv_into(buffer, [nbytes[, flags]]) -> nbytes_read
|
| A version of recv() that stores its data into a buffer rather than creating
| a new string. Receive up to buffersize bytes from the socket. If buffersize
| is not specified (or 0), receive up to the size available in the given buffer.
|
| See recv() for documentation about the flags.
|
| recvfrom(...)
| recvfrom(buffersize[, flags]) -> (data, address info)
|
| Like recv(buffersize, flags) but also return the sender's address info.
|
| recvfrom_into(...)
| recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info)
|
| Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.
|
| send(...)
| send(data[, flags]) -> count
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. Return the number of bytes
| sent; this may be less than len(data) if the network is busy.
|
| sendall(...)
| sendall(data[, flags])
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. This calls send() repeatedly
| until all data is sent. If an error occurs, it's impossible
| to tell how much data has been sent.
|
| sendto(...)
| sendto(data[, flags], address) -> count
|
| Like send(data, flags) but allows specifying the destination address.
| For IP sockets, the address is a pair (hostaddr, port).
|
| setblocking(...)
| setblocking(flag)
|
| Set the socket to blocking (flag is true) or non-blocking (false).
| setblocking(True) is equivalent to settimeout(None);
| setblocking(False) is equivalent to settimeout(0.0).
|
| setsockopt(...)
| setsockopt(level, option, value: int)
| setsockopt(level, option, value: buffer)
| setsockopt(level, option, None, optlen: int)
|
| Set a socket option. See the Unix manual for level and option.
| The value argument can either be an integer, a string buffer, or
| None, optlen.
|
| settimeout(...)
| settimeout(timeout)
|
| Set a timeout on socket operations. 'timeout' can be a float,
| giving in seconds, or None. Setting a timeout of None disables
| the timeout feature and is equivalent to setblocking(1).
| Setting a timeout of zero is the same as setblocking(0).
|
| share(...)
| share(process_id) -> bytes
|
| Share the socket with another process. The target process id
| must be provided and the resulting bytes object passed to the target
| process. There the shared socket can be instantiated by calling
| socket.fromshare().
|
| shutdown(...)
| shutdown(flag)
|
| Shut down the reading side of the socket (flag == SHUT_RD), the writing side
| of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| family
| the socket family
|
| proto
| the socket protocol
|
| timeout
| the socket timeout
|
| type
| the socket type
error = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class gaierror(builtins.OSError)
| Method resolution order:
| gaierror
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class herror(builtins.OSError)
| Method resolution order:
| herror
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class socket(_socket.socket)
| socket(family=-1, type=-1, proto=-1, fileno=None)
|
| A subclass of _socket.socket adding the makefile() method.
|
| Method resolution order:
| socket
| _socket.socket
| builtins.object
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| __getstate__(self)
| Helper for pickle.
|
| __init__(self, family=-1, type=-1, proto=-1, fileno=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Wrap __repr__() to reveal the real class name and socket
| address(es).
|
| accept(self)
| accept() -> (socket object, address info)
|
| Wait for an incoming connection. Return a new socket
| representing the connection, and the address of the client.
| For IP sockets, the address info is a pair (hostaddr, port).
|
| close(self)
| close()
|
| Close the socket. It cannot be used after this call.
|
| detach(self)
| detach() -> file descriptor
|
| Close the socket object without closing the underlying file descriptor.
| The object cannot be used after this call, but the file descriptor
| can be reused for other purposes. The file descriptor is returned.
|
| dup(self)
| dup() -> socket object
|
| Duplicate the socket. Return a new socket object connected to the same
| system resource. The new socket is non-inheritable.
|
| get_inheritable(self)
| Get the inheritable flag of the socket
|
| makefile(self, mode='r', buffering=None, *, encoding=None, errors=None, newline=None)
| makefile(...) -> an I/O stream connected to the socket
|
| The arguments are as for io.open() after the filename, except the only
| supported mode values are 'r' (default), 'w', 'b', or a combination of
| those.
|
| sendfile(self, file, offset=0, count=None)
| sendfile(file[, offset[, count]]) -> sent
|
| Send a file until EOF is reached by using high-performance
| os.sendfile() and return the total number of bytes which
| were sent.
| *file* must be a regular file object opened in binary mode.
| If os.sendfile() is not available (e.g. Windows) or file is
| not a regular file socket.send() will be used instead.
| *offset* tells from where to start reading the file.
| If specified, *count* is the total number of bytes to transmit
| as opposed to sending the file until EOF is reached.
| File position is updated on return or also in case of error in
| which case file.tell() can be used to figure out the number of
| bytes which were sent.
| The socket must be of SOCK_STREAM type.
| Non-blocking sockets are not supported.
|
| set_inheritable(self, inheritable)
| Set the inheritable flag of the socket
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| family
| Read-only access to the address family for this socket.
|
| type
| Read-only access to the socket type.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from _socket.socket:
|
| __del__(...)
|
| bind(...)
| bind(address)
|
| Bind the socket to a local address. For IP sockets, the address is a
| pair (host, port); the host must refer to the local host. For raw packet
| sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])
|
| connect(...)
| connect(address)
|
| Connect the socket to a remote address. For IP sockets, the address
| is a pair (host, port).
|
| connect_ex(...)
| connect_ex(address) -> errno
|
| This is like connect(address), but returns an error code (the errno value)
| instead of raising an exception when an error occurs.
|
| fileno(...)
| fileno() -> integer
|
| Return the integer file descriptor of the socket.
|
| getblocking(...)
| getblocking()
|
| Returns True if socket is in blocking mode, or False if it
| is in non-blocking mode.
|
| getpeername(...)
| getpeername() -> address info
|
| Return the address of the remote endpoint. For IP sockets, the address
| info is a pair (hostaddr, port).
|
| getsockname(...)
| getsockname() -> address info
|
| Return the address of the local endpoint. The format depends on the
| address family. For IPv4 sockets, the address info is a pair
| (hostaddr, port). For IPv6 sockets, the address info is a 4-tuple
| (hostaddr, port, flowinfo, scope_id).
|
| getsockopt(...)
| getsockopt(level, option[, buffersize]) -> value
|
| Get a socket option. See the Unix manual for level and option.
| If a nonzero buffersize argument is given, the return value is a
| string of that length; otherwise it is an integer.
|
| gettimeout(...)
| gettimeout() -> timeout
|
| Returns the timeout in seconds (float) associated with socket
| operations. A timeout of None indicates that timeouts on socket
| operations are disabled.
|
| ioctl(...)
| ioctl(cmd, option) -> long
|
| Control the socket with WSAIoctl syscall. Currently supported 'cmd' values are
| SIO_RCVALL: 'option' must be one of the socket.RCVALL_* constants.
| SIO_KEEPALIVE_VALS: 'option' is a tuple of (onoff, timeout, interval).
| SIO_LOOPBACK_FAST_PATH: 'option' is a boolean value, and is disabled by default
|
| listen(...)
| listen([backlog])
|
| Enable a server to accept connections. If backlog is specified, it must be
| at least 0 (if it is lower, it is set to 0); it specifies the number of
| unaccepted connections that the system will allow before refusing new
| connections. If not specified, a default reasonable value is chosen.
|
| recv(...)
| recv(buffersize[, flags]) -> data
|
| Receive up to buffersize bytes from the socket. For the optional flags
| argument, see the Unix manual. When no data is available, block until
| at least one byte is available or until the remote end is closed. When
| the remote end is closed and all data is read, return the empty string.
|
| recv_into(...)
| recv_into(buffer, [nbytes[, flags]]) -> nbytes_read
|
| A version of recv() that stores its data into a buffer rather than creating
| a new string. Receive up to buffersize bytes from the socket. If buffersize
| is not specified (or 0), receive up to the size available in the given buffer.
|
| See recv() for documentation about the flags.
|
| recvfrom(...)
| recvfrom(buffersize[, flags]) -> (data, address info)
|
| Like recv(buffersize, flags) but also return the sender's address info.
|
| recvfrom_into(...)
| recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info)
|
| Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.
|
| send(...)
| send(data[, flags]) -> count
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. Return the number of bytes
| sent; this may be less than len(data) if the network is busy.
|
| sendall(...)
| sendall(data[, flags])
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. This calls send() repeatedly
| until all data is sent. If an error occurs, it's impossible
| to tell how much data has been sent.
|
| sendto(...)
| sendto(data[, flags], address) -> count
|
| Like send(data, flags) but allows specifying the destination address.
| For IP sockets, the address is a pair (hostaddr, port).
|
| setblocking(...)
| setblocking(flag)
|
| Set the socket to blocking (flag is true) or non-blocking (false).
| setblocking(True) is equivalent to settimeout(None);
| setblocking(False) is equivalent to settimeout(0.0).
|
| setsockopt(...)
| setsockopt(level, option, value: int)
| setsockopt(level, option, value: buffer)
| setsockopt(level, option, None, optlen: int)
|
| Set a socket option. See the Unix manual for level and option.
| The value argument can either be an integer, a string buffer, or
| None, optlen.
|
| settimeout(...)
| settimeout(timeout)
|
| Set a timeout on socket operations. 'timeout' can be a float,
| giving in seconds, or None. Setting a timeout of None disables
| the timeout feature and is equivalent to setblocking(1).
| Setting a timeout of zero is the same as setblocking(0).
|
| share(...)
| share(process_id) -> bytes
|
| Share the socket with another process. The target process id
| must be provided and the resulting bytes object passed to the target
| process. There the shared socket can be instantiated by calling
| socket.fromshare().
|
| shutdown(...)
| shutdown(flag)
|
| Shut down the reading side of the socket (flag == SHUT_RD), the writing side
| of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).
|
| ----------------------------------------------------------------------
| Static methods inherited from _socket.socket:
|
| __new__(*args, **kwargs) class method of _socket.socket
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _socket.socket:
|
| proto
| the socket protocol
|
| timeout
| the socket timeout
timeout = class TimeoutError(OSError)
| Timeout expired.
|
| Method resolution order:
| TimeoutError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
close(...)
close(integer) -> None
Close an integer socket file descriptor. This is like os.close(), but for
sockets; on some platforms os.close() won't work for socket file descriptors.
create_connection(address, timeout=<object object at 0x0000017B07D78B30>, source_address=None, *, all_errors=False)
Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
A host of '' or port 0 tells the OS to use the default. When a connection
cannot be created, raises the last error if *all_errors* is False,
and an ExceptionGroup of all errors if *all_errors* is True.
create_server(address, *, family=<AddressFamily.AF_INET: 2>, backlog=None, reuse_port=False, dualstack_ipv6=False)
Convenience function which creates a SOCK_STREAM type socket
bound to *address* (a 2-tuple (host, port)) and return the socket
object.
*family* should be either AF_INET or AF_INET6.
*backlog* is the queue size passed to socket.listen().
*reuse_port* dictates whether to use the SO_REUSEPORT socket option.
*dualstack_ipv6*: if true and the platform supports it, it will
create an AF_INET6 socket able to accept both IPv4 or IPv6
connections. When false it will explicitly disable this option on
platforms that enable it by default (e.g. Linux).
>>> with create_server(('', 8000)) as server:
... while True:
... conn, addr = server.accept()
... # handle new connection
dup(...)
dup(integer) -> integer
Duplicate an integer socket file descriptor. This is like os.dup(), but for
sockets; on some platforms os.dup() won't work for socket file descriptors.
fromfd(fd, family, type, proto=0)
fromfd(fd, family, type[, proto]) -> socket object
Create a socket object from a duplicate of the given file
descriptor. The remaining arguments are the same as for socket().
fromshare(info)
fromshare(info) -> socket object
Create a socket object from the bytes object returned by
socket.share(pid).
getaddrinfo(host, port, family=0, type=0, proto=0, flags=0)
Resolve host and port into list of address info entries.
Translate the host/port argument into a sequence of 5-tuples that contain
all the necessary arguments for creating a socket connected to that service.
host is a domain name, a string representation of an IPv4/v6 address or
None. port is a string service name such as 'http', a numeric port number or
None. By passing None as the value of host and port, you can pass NULL to
the underlying C API.
The family, type and proto arguments can be optionally specified in order to
narrow the list of addresses returned. Passing zero as a value for each of
these arguments selects the full range of results.
getdefaulttimeout(...)
getdefaulttimeout() -> timeout
Returns the default timeout in seconds (float) for new socket objects.
A value of None indicates that new socket objects have no timeout.
When the socket module is first imported, the default is None.
getfqdn(name='')
Get fully qualified domain name from name.
An empty argument is interpreted as meaning the local host.
First the hostname returned by gethostbyaddr() is checked, then
possibly existing aliases. In case no FQDN is available and `name`
was given, it is returned unchanged. If `name` was empty, '0.0.0.0' or '::',
hostname from gethostname() is returned.
gethostbyaddr(...)
gethostbyaddr(host) -> (name, aliaslist, addresslist)
Return the true host name, a list of aliases, and a list of IP addresses,
for a host. The host argument is a string giving a host name or IP number.
gethostbyname(...)
gethostbyname(host) -> address
Return the IP address (a string of the form '255.255.255.255') for a host.
gethostbyname_ex(...)
gethostbyname_ex(host) -> (name, aliaslist, addresslist)
Return the true host name, a list of aliases, and a list of IP addresses,
for a host. The host argument is a string giving a host name or IP number.
gethostname(...)
gethostname() -> string
Return the current host name.
getnameinfo(...)
getnameinfo(sockaddr, flags) --> (host, port)
Get host and port for a sockaddr.
getprotobyname(...)
getprotobyname(name) -> integer
Return the protocol number for the named protocol. (Rarely used.)
getservbyname(...)
getservbyname(servicename[, protocolname]) -> integer
Return a port number from a service name and protocol name.
The optional protocol name, if given, should be 'tcp' or 'udp',
otherwise any protocol will match.
getservbyport(...)
getservbyport(port[, protocolname]) -> string
Return the service name from a port number and protocol name.
The optional protocol name, if given, should be 'tcp' or 'udp',
otherwise any protocol will match.
has_dualstack_ipv6()
Return True if the platform supports creating a SOCK_STREAM socket
which can handle both AF_INET and AF_INET6 (IPv4 / IPv6) connections.
htonl(...)
htonl(integer) -> integer
Convert a 32-bit integer from host to network byte order.
htons(...)
htons(integer) -> integer
Convert a 16-bit unsigned integer from host to network byte order.
if_indextoname(...)
if_indextoname(if_index)
Returns the interface name corresponding to the interface index if_index.
if_nameindex(...)
if_nameindex()
Returns a list of network interface information (index, name) tuples.
if_nametoindex(...)
if_nametoindex(if_name)
Returns the interface index corresponding to the interface name if_name.
inet_aton(...)
inet_aton(string) -> bytes giving packed 32-bit IP representation
Convert an IP address in string format (123.45.67.89) to the 32-bit packed
binary format used in low-level network functions.
inet_ntoa(...)
inet_ntoa(packed_ip) -> ip_address_string
Convert an IP address from 32-bit packed binary format to string format
inet_ntop(...)
inet_ntop(af, packed_ip) -> string formatted IP address
Convert a packed IP address of the given family to string format.
inet_pton(...)
inet_pton(af, ip) -> packed IP address string
Convert an IP address from string format to a packed string suitable
for use with low-level network functions.
ntohl(...)
ntohl(integer) -> integer
Convert a 32-bit integer from network to host byte order.
ntohs(...)
ntohs(integer) -> integer
Convert a 16-bit unsigned integer from network to host byte order.
setdefaulttimeout(...)
setdefaulttimeout(timeout)
Set the default timeout in seconds (float) for new socket objects.
A value of None indicates that new socket objects have no timeout.
When the socket module is first imported, the default is None.
socketpair = _fallback_socketpair(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=0)
socketpair([family[, type[, proto]]]) -> (socket object, socket object)
Create a pair of socket objects from the sockets returned by the platform
socketpair() function.
The arguments are the same as for socket() except the default family is AF_UNIX
if defined on the platform; otherwise, the default is AF_INET.
DATA
AF_APPLETALK = <AddressFamily.AF_APPLETALK: 16>
AF_BLUETOOTH = <AddressFamily.AF_BLUETOOTH: 32>
AF_DECnet = 12
AF_HYPERV = <AddressFamily.AF_HYPERV: 34>
AF_INET = <AddressFamily.AF_INET: 2>
AF_INET6 = <AddressFamily.AF_INET6: 23>
AF_IPX = <AddressFamily.AF_IPX: 6>
AF_IRDA = <AddressFamily.AF_IRDA: 26>
AF_LINK = <AddressFamily.AF_LINK: 33>
AF_SNA = <AddressFamily.AF_SNA: 11>
AF_UNSPEC = <AddressFamily.AF_UNSPEC: 0>
AI_ADDRCONFIG = <AddressInfo.AI_ADDRCONFIG: 1024>
AI_ALL = <AddressInfo.AI_ALL: 256>
AI_CANONNAME = <AddressInfo.AI_CANONNAME: 2>
AI_NUMERICHOST = <AddressInfo.AI_NUMERICHOST: 4>
AI_NUMERICSERV = <AddressInfo.AI_NUMERICSERV: 8>
AI_PASSIVE = <AddressInfo.AI_PASSIVE: 1>
AI_V4MAPPED = <AddressInfo.AI_V4MAPPED: 2048>
BDADDR_ANY = '00:00:00:00:00:00'
BDADDR_LOCAL = '00:00:00:FF:FF:FF'
BTPROTO_RFCOMM = 3
CAPI = <capsule object "_socket.CAPI">
EAI_AGAIN = 11002
EAI_BADFLAGS = 10022
EAI_FAIL = 11003
EAI_FAMILY = 10047
EAI_MEMORY = 8
EAI_NODATA = 11001
EAI_NONAME = 11001
EAI_SERVICE = 10109
EAI_SOCKTYPE = 10044
HVSOCKET_ADDRESS_FLAG_PASSTHRU = 1
HVSOCKET_CONNECTED_SUSPEND = 4
HVSOCKET_CONNECT_TIMEOUT = 1
HVSOCKET_CONNECT_TIMEOUT_MAX = 300000
HV_GUID_BROADCAST = 'FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF'
HV_GUID_CHILDREN = '90DB8B89-0D35-4F79-8CE9-49EA0AC8B7CD'
HV_GUID_LOOPBACK = 'E0E16197-DD56-4A10-9195-5EE7A155A838'
HV_GUID_PARENT = 'A42E7CDA-D03F-480C-9CC2-A4DE20ABB878'
HV_GUID_WILDCARD = '00000000-0000-0000-0000-000000000000'
HV_GUID_ZERO = '00000000-0000-0000-0000-000000000000'
HV_PROTOCOL_RAW = 1
INADDR_ALLHOSTS_GROUP = -536870911
INADDR_ANY = 0
INADDR_BROADCAST = -1
INADDR_LOOPBACK = 2130706433
INADDR_MAX_LOCAL_GROUP = -536870657
INADDR_NONE = -1
INADDR_UNSPEC_GROUP = -536870912
IPPORT_RESERVED = 1024
IPPORT_USERRESERVED = 5000
IPPROTO_AH = 51
IPPROTO_CBT = 7
IPPROTO_DSTOPTS = 60
IPPROTO_EGP = 8
IPPROTO_ESP = 50
IPPROTO_FRAGMENT = 44
IPPROTO_GGP = 3
IPPROTO_HOPOPTS = 0
IPPROTO_ICLFXBM = 78
IPPROTO_ICMP = 1
IPPROTO_ICMPV6 = 58
IPPROTO_IDP = 22
IPPROTO_IGMP = 2
IPPROTO_IGP = 9
IPPROTO_IP = 0
IPPROTO_IPV4 = 4
IPPROTO_IPV6 = 41
IPPROTO_L2TP = 115
IPPROTO_MAX = 256
IPPROTO_ND = 77
IPPROTO_NONE = 59
IPPROTO_PGM = 113
IPPROTO_PIM = 103
IPPROTO_PUP = 12
IPPROTO_RAW = 255
IPPROTO_RDP = 27
IPPROTO_ROUTING = 43
IPPROTO_SCTP = 132
IPPROTO_ST = 5
IPPROTO_TCP = 6
IPPROTO_UDP = 17
IPV6_CHECKSUM = 26
IPV6_DONTFRAG = 14
IPV6_HOPLIMIT = 21
IPV6_HOPOPTS = 1
IPV6_JOIN_GROUP = 12
IPV6_LEAVE_GROUP = 13
IPV6_MULTICAST_HOPS = 10
IPV6_MULTICAST_IF = 9
IPV6_MULTICAST_LOOP = 11
IPV6_PKTINFO = 19
IPV6_RECVRTHDR = 38
IPV6_RECVTCLASS = 40
IPV6_RTHDR = 32
IPV6_TCLASS = 39
IPV6_UNICAST_HOPS = 4
IPV6_V6ONLY = 27
IP_ADD_MEMBERSHIP = 12
IP_ADD_SOURCE_MEMBERSHIP = 15
IP_BLOCK_SOURCE = 17
IP_DROP_MEMBERSHIP = 13
IP_DROP_SOURCE_MEMBERSHIP = 16
IP_HDRINCL = 2
IP_MULTICAST_IF = 9
IP_MULTICAST_LOOP = 11
IP_MULTICAST_TTL = 10
IP_OPTIONS = 1
IP_PKTINFO = 19
IP_RECVDSTADDR = 25
IP_RECVTOS = 40
IP_TOS = 3
IP_TTL = 4
IP_UNBLOCK_SOURCE = 18
MSG_BCAST = <MsgFlag.MSG_BCAST: 1024>
MSG_CTRUNC = <MsgFlag.MSG_CTRUNC: 512>
MSG_DONTROUTE = <MsgFlag.MSG_DONTROUTE: 4>
MSG_ERRQUEUE = <MsgFlag.MSG_ERRQUEUE: 4096>
MSG_MCAST = <MsgFlag.MSG_MCAST: 2048>
MSG_OOB = <MsgFlag.MSG_OOB: 1>
MSG_PEEK = <MsgFlag.MSG_PEEK: 2>
MSG_TRUNC = <MsgFlag.MSG_TRUNC: 256>
MSG_WAITALL = <MsgFlag.MSG_WAITALL: 8>
NI_DGRAM = 16
NI_MAXHOST = 1025
NI_MAXSERV = 32
NI_NAMEREQD = 4
NI_NOFQDN = 1
NI_NUMERICHOST = 2
NI_NUMERICSERV = 8
RCVALL_MAX = 3
RCVALL_OFF = 0
RCVALL_ON = 1
RCVALL_SOCKETLEVELONLY = 2
SHUT_RD = 0
SHUT_RDWR = 2
SHUT_WR = 1
SIO_KEEPALIVE_VALS = 2550136836
SIO_LOOPBACK_FAST_PATH = 2550136848
SIO_RCVALL = 2550136833
SOCK_DGRAM = <SocketKind.SOCK_DGRAM: 2>
SOCK_RAW = <SocketKind.SOCK_RAW: 3>
SOCK_RDM = <SocketKind.SOCK_RDM: 4>
SOCK_SEQPACKET = <SocketKind.SOCK_SEQPACKET: 5>
SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
SOL_IP = 65531
SOL_SOCKET = 65535
SOL_TCP = 6
SOL_UDP = 17
SOMAXCONN = 2147483647
SO_ACCEPTCONN = 2
SO_BROADCAST = 32
SO_DEBUG = 1
SO_DONTROUTE = 16
SO_ERROR = 4103
SO_EXCLUSIVEADDRUSE = -5
SO_KEEPALIVE = 8
SO_LINGER = 128
SO_OOBINLINE = 256
SO_RCVBUF = 4098
SO_RCVLOWAT = 4100
SO_RCVTIMEO = 4102
SO_REUSEADDR = 4
SO_SNDBUF = 4097
SO_SNDLOWAT = 4099
SO_SNDTIMEO = 4101
SO_TYPE = 4104
SO_USELOOPBACK = 64
TCP_FASTOPEN = 15
TCP_KEEPCNT = 16
TCP_KEEPIDLE = 3
TCP_KEEPINTVL = 17
TCP_MAXSEG = 4
TCP_NODELAY = 1
__all__ = ['fromfd', 'getfqdn', 'create_connection', 'create_server', ...
errorTab = {6: 'Specified event object handle is invalid.', 8: 'Insuff...
has_ipv6 = True
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\socket.py
http.client.ssl
Python Library Documentation: module ssl
NAME
ssl - This module provides some more Pythonic support for SSL.
MODULE REFERENCE
https://docs.python.org/3.12/library/ssl.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
Object types:
SSLSocket -- subtype of socket.socket which does SSL over the socket
Exceptions:
SSLError -- exception raised for I/O errors
Functions:
cert_time_to_seconds -- convert time string used for certificate
notBefore and notAfter functions to integer
seconds past the Epoch (the time values
returned from time.time())
get_server_certificate (addr, ssl_version, ca_certs, timeout) -- Retrieve the
certificate from the server at the specified
address and return it as a PEM-encoded string
Integer constants:
SSL_ERROR_ZERO_RETURN
SSL_ERROR_WANT_READ
SSL_ERROR_WANT_WRITE
SSL_ERROR_WANT_X509_LOOKUP
SSL_ERROR_SYSCALL
SSL_ERROR_SSL
SSL_ERROR_WANT_CONNECT
SSL_ERROR_EOF
SSL_ERROR_INVALID_ERROR_CODE
The following group define certificate requirements that one side is
allowing/requiring from the other side:
CERT_NONE - no certificates from the other side are required (or will
be looked at if provided)
CERT_OPTIONAL - certificates are not required, but if provided will be
validated, and if validation fails, the connection will
also fail
CERT_REQUIRED - certificates are required, and will be validated, and
if validation fails, the connection will also fail
The following constants identify various SSL protocol variants:
PROTOCOL_SSLv2
PROTOCOL_SSLv3
PROTOCOL_SSLv23
PROTOCOL_TLS
PROTOCOL_TLS_CLIENT
PROTOCOL_TLS_SERVER
PROTOCOL_TLSv1
PROTOCOL_TLSv1_1
PROTOCOL_TLSv1_2
The following constants identify various SSL alert message descriptions as per
http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6
ALERT_DESCRIPTION_CLOSE_NOTIFY
ALERT_DESCRIPTION_UNEXPECTED_MESSAGE
ALERT_DESCRIPTION_BAD_RECORD_MAC
ALERT_DESCRIPTION_RECORD_OVERFLOW
ALERT_DESCRIPTION_DECOMPRESSION_FAILURE
ALERT_DESCRIPTION_HANDSHAKE_FAILURE
ALERT_DESCRIPTION_BAD_CERTIFICATE
ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE
ALERT_DESCRIPTION_CERTIFICATE_REVOKED
ALERT_DESCRIPTION_CERTIFICATE_EXPIRED
ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN
ALERT_DESCRIPTION_ILLEGAL_PARAMETER
ALERT_DESCRIPTION_UNKNOWN_CA
ALERT_DESCRIPTION_ACCESS_DENIED
ALERT_DESCRIPTION_DECODE_ERROR
ALERT_DESCRIPTION_DECRYPT_ERROR
ALERT_DESCRIPTION_PROTOCOL_VERSION
ALERT_DESCRIPTION_INSUFFICIENT_SECURITY
ALERT_DESCRIPTION_INTERNAL_ERROR
ALERT_DESCRIPTION_USER_CANCELLED
ALERT_DESCRIPTION_NO_RENEGOTIATION
ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION
ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE
ALERT_DESCRIPTION_UNRECOGNIZED_NAME
ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE
ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE
ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY
CLASSES
_ssl._SSLContext(builtins.object)
SSLContext
builtins.OSError(builtins.Exception)
SSLError
SSLCertVerificationError(SSLError, builtins.ValueError)
SSLEOFError
SSLSyscallError
SSLWantReadError
SSLWantWriteError
SSLZeroReturnError
builtins.object
SSLObject
builtins.tuple(builtins.object)
DefaultVerifyPaths
enum.Enum(builtins.object)
Purpose(_ASN1Object, enum.Enum)
enum.IntEnum(builtins.int, enum.ReprEnum)
AlertDescription
SSLErrorNumber
TLSVersion
VerifyMode
enum.IntFlag(builtins.int, enum.ReprEnum, enum.Flag)
Options
VerifyFlags
socket.socket(_socket.socket)
SSLSocket
_ASN1Object(_ASN1Object)
Purpose(_ASN1Object, enum.Enum)
class AlertDescription(enum.IntEnum)
| AlertDescription(*values)
|
| An enumeration.
|
| Method resolution order:
| AlertDescription
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ALERT_DESCRIPTION_ACCESS_DENIED = <AlertDescription.ALERT_DESCRIPTION_...
|
| ALERT_DESCRIPTION_BAD_CERTIFICATE = <AlertDescription.ALERT_DESCRIPTIO...
|
| ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE = <AlertDescription.ALERT...
|
| ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE = <AlertDescription....
|
| ALERT_DESCRIPTION_BAD_RECORD_MAC = <AlertDescription.ALERT_DESCRIPTION...
|
| ALERT_DESCRIPTION_CERTIFICATE_EXPIRED = <AlertDescription.ALERT_DESCRI...
|
| ALERT_DESCRIPTION_CERTIFICATE_REVOKED = <AlertDescription.ALERT_DESCRI...
|
| ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN = <AlertDescription.ALERT_DESCRI...
|
| ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE = <AlertDescription.ALERT_D...
|
| ALERT_DESCRIPTION_CLOSE_NOTIFY = <AlertDescription.ALERT_DESCRIPTION_C...
|
| ALERT_DESCRIPTION_DECODE_ERROR = <AlertDescription.ALERT_DESCRIPTION_D...
|
| ALERT_DESCRIPTION_DECOMPRESSION_FAILURE = <AlertDescription.ALERT_DESC...
|
| ALERT_DESCRIPTION_DECRYPT_ERROR = <AlertDescription.ALERT_DESCRIPTION_...
|
| ALERT_DESCRIPTION_HANDSHAKE_FAILURE = <AlertDescription.ALERT_DESCRIPT...
|
| ALERT_DESCRIPTION_ILLEGAL_PARAMETER = <AlertDescription.ALERT_DESCRIPT...
|
| ALERT_DESCRIPTION_INSUFFICIENT_SECURITY = <AlertDescription.ALERT_DESC...
|
| ALERT_DESCRIPTION_INTERNAL_ERROR = <AlertDescription.ALERT_DESCRIPTION...
|
| ALERT_DESCRIPTION_NO_RENEGOTIATION = <AlertDescription.ALERT_DESCRIPTI...
|
| ALERT_DESCRIPTION_PROTOCOL_VERSION = <AlertDescription.ALERT_DESCRIPTI...
|
| ALERT_DESCRIPTION_RECORD_OVERFLOW = <AlertDescription.ALERT_DESCRIPTIO...
|
| ALERT_DESCRIPTION_UNEXPECTED_MESSAGE = <AlertDescription.ALERT_DESCRIP...
|
| ALERT_DESCRIPTION_UNKNOWN_CA = <AlertDescription.ALERT_DESCRIPTION_UNK...
|
| ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY = <AlertDescription.ALERT_DESCR...
|
| ALERT_DESCRIPTION_UNRECOGNIZED_NAME = <AlertDescription.ALERT_DESCRIPT...
|
| ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE = <AlertDescription.ALERT_DE...
|
| ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION = <AlertDescription.ALERT_DESC...
|
| ALERT_DESCRIPTION_USER_CANCELLED = <AlertDescription.ALERT_DESCRIPTION...
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
CertificateError = class SSLCertVerificationError(SSLError, builtins.ValueError)
| A certificate could not be verified.
|
| Method resolution order:
| SSLCertVerificationError
| SSLError
| builtins.OSError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from SSLError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DefaultVerifyPaths(builtins.tuple)
| DefaultVerifyPaths(cafile, capath, openssl_cafile_env, openssl_cafile, openssl_capath_env, openssl_capath)
|
| DefaultVerifyPaths(cafile, capath, openssl_cafile_env, openssl_cafile, openssl_capath_env, openssl_capath)
|
| Method resolution order:
| DefaultVerifyPaths
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __getnewargs__(self) from collections.DefaultVerifyPaths
| Return self as a plain tuple. Used by copy and pickle.
|
| __repr__(self) from collections.DefaultVerifyPaths
| Return a nicely formatted representation string
|
| _asdict(self) from collections.DefaultVerifyPaths
| Return a new dict which maps field names to their values.
|
| _replace(self, /, **kwds) from collections.DefaultVerifyPaths
| Return a new DefaultVerifyPaths object replacing specified fields with new values
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| _make(iterable) from collections.DefaultVerifyPaths
| Make a new DefaultVerifyPaths object from a sequence or iterable
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(_cls, cafile, capath, openssl_cafile_env, openssl_cafile, openssl_capath_env, openssl_capath) from namedtuple_DefaultVerifyPaths.DefaultVerifyPaths
| Create new instance of DefaultVerifyPaths(cafile, capath, openssl_cafile_env, openssl_cafile, openssl_capath_env, openssl_capath)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| cafile
| Alias for field number 0
|
| capath
| Alias for field number 1
|
| openssl_cafile_env
| Alias for field number 2
|
| openssl_cafile
| Alias for field number 3
|
| openssl_capath_env
| Alias for field number 4
|
| openssl_capath
| Alias for field number 5
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('cafile', 'capath', 'openssl_cafile_env', 'openssl_c...
|
| _field_defaults = {}
|
| _fields = ('cafile', 'capath', 'openssl_cafile_env', 'openssl_cafile',...
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class Options(enum.IntFlag)
| Options(*values)
|
| An enumeration.
|
| Method resolution order:
| Options
| enum.IntFlag
| builtins.int
| enum.ReprEnum
| enum.Flag
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __and__(self, other) from enum.Flag
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __invert__(self) from enum.Flag
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __or__(self, other) from enum.Flag
| Return self|value.
|
| __rand__ = __and__(self, other)
|
| __ror__ = __or__(self, other)
|
| __rxor__ = __xor__(self, other)
|
| __xor__(self, other) from enum.Flag
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| OP_CIPHER_SERVER_PREFERENCE = <Options.OP_CIPHER_SERVER_PREFERENCE: 41...
|
| OP_ENABLE_KTLS = <Options.OP_ENABLE_KTLS: 8>
|
| OP_ENABLE_MIDDLEBOX_COMPAT = <Options.OP_ENABLE_MIDDLEBOX_COMPAT: 1048...
|
| OP_IGNORE_UNEXPECTED_EOF = <Options.OP_IGNORE_UNEXPECTED_EOF: 128>
|
| OP_LEGACY_SERVER_CONNECT = <Options.OP_LEGACY_SERVER_CONNECT: 4>
|
| OP_NO_COMPRESSION = <Options.OP_NO_COMPRESSION: 131072>
|
| OP_NO_RENEGOTIATION = <Options.OP_NO_RENEGOTIATION: 1073741824>
|
| OP_NO_SSLv3 = <Options.OP_NO_SSLv3: 33554432>
|
| OP_NO_TICKET = <Options.OP_NO_TICKET: 16384>
|
| OP_NO_TLSv1 = <Options.OP_NO_TLSv1: 67108864>
|
| OP_NO_TLSv1_1 = <Options.OP_NO_TLSv1_1: 268435456>
|
| OP_NO_TLSv1_2 = <Options.OP_NO_TLSv1_2: 134217728>
|
| OP_NO_TLSv1_3 = <Options.OP_NO_TLSv1_3: 536870912>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntFlag:
|
| __repr__(self) from enum.Flag
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Flag:
|
| __contains__(self, other)
| Returns True if self has at least the same flags set as other.
|
| __iter__(self)
| Returns flags in definition order.
|
| __len__(self)
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __getitem__(name)
| Return the member matching `name`.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class Purpose(_ASN1Object, enum.Enum)
| Purpose(*values)
|
| SSLContext purpose flags with X509v3 Extended Key Usage objects
|
| Method resolution order:
| Purpose
| _ASN1Object
| _ASN1Object
| builtins.tuple
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CLIENT_AUTH = <Purpose.CLIENT_AUTH: _ASN1Object(nid=130, short...Clien...
|
| SERVER_AUTH = <Purpose.SERVER_AUTH: _ASN1Object(nid=129, short...Serve...
|
| ----------------------------------------------------------------------
| Class methods inherited from _ASN1Object:
|
| fromname(name)
| Create _ASN1Object from short name, long name or OID
|
| fromnid(nid)
| Create _ASN1Object from OpenSSL numeric ID
|
| ----------------------------------------------------------------------
| Methods inherited from _ASN1Object:
|
| __getnewargs__(self) from collections._ASN1Object
| Return self as a plain tuple. Used by copy and pickle.
|
| _asdict(self) from collections._ASN1Object
| Return a new dict which maps field names to their values.
|
| _replace(self, /, **kwds) from collections._ASN1Object
| Return a new _ASN1Object object replacing specified fields with new values
|
| ----------------------------------------------------------------------
| Class methods inherited from _ASN1Object:
|
| _make(iterable) from collections._ASN1Object
| Make a new _ASN1Object object from a sequence or iterable
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _ASN1Object:
|
| nid
| Alias for field number 0
|
| shortname
| Alias for field number 1
|
| longname
| Alias for field number 2
|
| oid
| Alias for field number 3
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from _ASN1Object:
|
| __match_args__ = ('nid', 'shortname', 'longname', 'oid')
|
| _field_defaults = {}
|
| _fields = ('nid', 'shortname', 'longname', 'oid')
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __format__(self, format_spec)
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| __str__(self)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class SSLCertVerificationError(SSLError, builtins.ValueError)
| A certificate could not be verified.
|
| Method resolution order:
| SSLCertVerificationError
| SSLError
| builtins.OSError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from SSLError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SSLContext(_ssl._SSLContext)
| SSLContext(protocol=None, *args, **kwargs)
|
| An SSLContext holds various SSL-related configuration options and
| data, such as certificates and possibly a private key.
|
| Method resolution order:
| SSLContext
| _ssl._SSLContext
| builtins.object
|
| Methods defined here:
|
| load_default_certs(self, purpose=<Purpose.SERVER_AUTH: _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1')>)
|
| set_alpn_protocols(self, alpn_protocols)
|
| set_npn_protocols(self, npn_protocols)
|
| set_servername_callback(self, server_name_callback)
|
| wrap_bio(self, incoming, outgoing, server_side=False, server_hostname=None, session=None)
|
| wrap_socket(self, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, server_hostname=None, session=None)
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(cls, protocol=None, *args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| protocol
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| hostname_checks_common_name
|
| maximum_version
|
| minimum_version
|
| options
|
| verify_flags
|
| verify_mode
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| sslobject_class = <class 'ssl.SSLObject'>
| This class implements an interface on top of a low-level SSL object as
| implemented by OpenSSL. This object captures the state of an SSL connection
| but does not provide any network IO itself. IO needs to be performed
| through separate "BIO" objects which are OpenSSL's IO abstraction layer.
|
| This class does not have a public constructor. Instances are returned by
| ``SSLContext.wrap_bio``. This class is typically used by framework authors
| that want to implement asynchronous IO for SSL through memory buffers.
|
| When compared to ``SSLSocket``, this object lacks the following features:
|
| * Any form of network IO, including methods such as ``recv`` and ``send``.
| * The ``do_handshake_on_connect`` and ``suppress_ragged_eofs`` machinery.
|
|
| sslsocket_class = <class 'ssl.SSLSocket'>
| This class implements a subtype of socket.socket that wraps
| the underlying OS socket in an SSL context when necessary, and
| provides read and write methods over that channel.
|
|
| ----------------------------------------------------------------------
| Methods inherited from _ssl._SSLContext:
|
| cert_store_stats(self, /)
| Returns quantities of loaded X.509 certificates.
|
| X.509 certificates with a CA extension and certificate revocation lists
| inside the context's cert store.
|
| NOTE: Certificates in a capath directory aren't loaded unless they have
| been used at least once.
|
| get_ca_certs(self, /, binary_form=False)
| Returns a list of dicts with information of loaded CA certs.
|
| If the optional argument is True, returns a DER-encoded copy of the CA
| certificate.
|
| NOTE: Certificates in a capath directory aren't loaded unless they have
| been used at least once.
|
| get_ciphers(self, /)
|
| load_cert_chain(self, /, certfile, keyfile=None, password=None)
|
| load_dh_params(self, path, /)
|
| load_verify_locations(self, /, cafile=None, capath=None, cadata=None)
|
| session_stats(self, /)
|
| set_ciphers(self, cipherlist, /)
|
| set_default_verify_paths(self, /)
|
| set_ecdh_curve(self, name, /)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _ssl._SSLContext:
|
| check_hostname
|
| keylog_filename
|
| num_tickets
| Control the number of TLSv1.3 session tickets
|
| post_handshake_auth
|
| security_level
| The current security level
|
| sni_callback
| Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension.
|
| If the argument is None then the callback is disabled. The method is called
| with the SSLSocket, the server name as a string, and the SSLContext object.
| See RFC 6066 for details of the SNI extension.
class SSLEOFError(SSLError)
| SSL/TLS connection terminated abruptly.
|
| Method resolution order:
| SSLEOFError
| SSLError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from SSLError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SSLError(builtins.OSError)
| An error occurred in the SSL implementation.
|
| Method resolution order:
| SSLError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SSLErrorNumber(enum.IntEnum)
| SSLErrorNumber(*values)
|
| An enumeration.
|
| Method resolution order:
| SSLErrorNumber
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| SSL_ERROR_EOF = <SSLErrorNumber.SSL_ERROR_EOF: 8>
|
| SSL_ERROR_INVALID_ERROR_CODE = <SSLErrorNumber.SSL_ERROR_INVALID_ERROR...
|
| SSL_ERROR_SSL = <SSLErrorNumber.SSL_ERROR_SSL: 1>
|
| SSL_ERROR_SYSCALL = <SSLErrorNumber.SSL_ERROR_SYSCALL: 5>
|
| SSL_ERROR_WANT_CONNECT = <SSLErrorNumber.SSL_ERROR_WANT_CONNECT: 7>
|
| SSL_ERROR_WANT_READ = <SSLErrorNumber.SSL_ERROR_WANT_READ: 2>
|
| SSL_ERROR_WANT_WRITE = <SSLErrorNumber.SSL_ERROR_WANT_WRITE: 3>
|
| SSL_ERROR_WANT_X509_LOOKUP = <SSLErrorNumber.SSL_ERROR_WANT_X509_LOOKU...
|
| SSL_ERROR_ZERO_RETURN = <SSLErrorNumber.SSL_ERROR_ZERO_RETURN: 6>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class SSLObject(builtins.object)
| SSLObject(*args, **kwargs)
|
| This class implements an interface on top of a low-level SSL object as
| implemented by OpenSSL. This object captures the state of an SSL connection
| but does not provide any network IO itself. IO needs to be performed
| through separate "BIO" objects which are OpenSSL's IO abstraction layer.
|
| This class does not have a public constructor. Instances are returned by
| ``SSLContext.wrap_bio``. This class is typically used by framework authors
| that want to implement asynchronous IO for SSL through memory buffers.
|
| When compared to ``SSLSocket``, this object lacks the following features:
|
| * Any form of network IO, including methods such as ``recv`` and ``send``.
| * The ``do_handshake_on_connect`` and ``suppress_ragged_eofs`` machinery.
|
| Methods defined here:
|
| __init__(self, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| cipher(self)
| Return the currently selected cipher as a 3-tuple ``(name,
| ssl_version, secret_bits)``.
|
| compression(self)
| Return the current compression algorithm in use, or ``None`` if
| compression was not negotiated or not supported by one of the peers.
|
| do_handshake(self)
| Start the SSL/TLS handshake.
|
| get_channel_binding(self, cb_type='tls-unique')
| Get channel binding data for current connection. Raise ValueError
| if the requested `cb_type` is not supported. Return bytes of the data
| or None if the data is not available (e.g. before the handshake).
|
| getpeercert(self, binary_form=False)
| Returns a formatted version of the data in the certificate provided
| by the other end of the SSL channel.
|
| Return None if no certificate was provided, {} if a certificate was
| provided, but not validated.
|
| pending(self)
| Return the number of bytes that can be read immediately.
|
| read(self, len=1024, buffer=None)
| Read up to 'len' bytes from the SSL object and return them.
|
| If 'buffer' is provided, read into this buffer and return the number of
| bytes read.
|
| selected_alpn_protocol(self)
| Return the currently selected ALPN protocol as a string, or ``None``
| if a next protocol was not negotiated or if ALPN is not supported by one
| of the peers.
|
| selected_npn_protocol(self)
| Return the currently selected NPN protocol as a string, or ``None``
| if a next protocol was not negotiated or if NPN is not supported by one
| of the peers.
|
| shared_ciphers(self)
| Return a list of ciphers shared by the client during the handshake or
| None if this is not a valid server connection.
|
| unwrap(self)
| Start the SSL shutdown handshake.
|
| verify_client_post_handshake(self)
|
| version(self)
| Return a string identifying the protocol version used by the
| current SSL channel.
|
| write(self, data)
| Write 'data' to the SSL object and return the number of bytes
| written.
|
| The 'data' argument must support the buffer interface.
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| server_hostname
| The currently set server hostname (for SNI), or ``None`` if no
| server hostname is set.
|
| server_side
| Whether this is a server-side socket.
|
| session_reused
| Was the client session reused during handshake
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| context
| The SSLContext that is currently in use.
|
| session
| The SSLSession for client socket.
class SSLSocket(socket.socket)
| SSLSocket(*args, **kwargs)
|
| This class implements a subtype of socket.socket that wraps
| the underlying OS socket in an SSL context when necessary, and
| provides read and write methods over that channel.
|
| Method resolution order:
| SSLSocket
| socket.socket
| _socket.socket
| builtins.object
|
| Methods defined here:
|
| __init__(self, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| accept(self)
| Accepts a new connection from a remote client, and returns
| a tuple containing that new connection wrapped with a server-side
| SSL channel, and the address of the remote client.
|
| cipher(self)
| Return the currently selected cipher as a 3-tuple ``(name,
| ssl_version, secret_bits)``.
|
| compression(self)
| Return the current compression algorithm in use, or ``None`` if
| compression was not negotiated or not supported by one of the peers.
|
| connect(self, addr)
| Connects to remote ADDR, and then wraps the connection in
| an SSL channel.
|
| connect_ex(self, addr)
| Connects to remote ADDR, and then wraps the connection in
| an SSL channel.
|
| do_handshake(self, block=False)
| Start the SSL/TLS handshake.
|
| dup(self)
| dup() -> socket object
|
| Duplicate the socket. Return a new socket object connected to the same
| system resource. The new socket is non-inheritable.
|
| get_channel_binding(self, cb_type='tls-unique')
| Get channel binding data for current connection. Raise ValueError
| if the requested `cb_type` is not supported. Return bytes of the data
| or None if the data is not available (e.g. before the handshake).
|
| getpeercert(self, binary_form=False)
| Returns a formatted version of the data in the certificate provided
| by the other end of the SSL channel.
|
| Return None if no certificate was provided, {} if a certificate was
| provided, but not validated.
|
| pending(self)
| Return the number of bytes that can be read immediately.
|
| read(self, len=1024, buffer=None)
| Read up to LEN bytes and return them.
| Return zero-length string on EOF.
|
| recv(self, buflen=1024, flags=0)
| recv(buffersize[, flags]) -> data
|
| Receive up to buffersize bytes from the socket. For the optional flags
| argument, see the Unix manual. When no data is available, block until
| at least one byte is available or until the remote end is closed. When
| the remote end is closed and all data is read, return the empty string.
|
| recv_into(self, buffer, nbytes=None, flags=0)
| recv_into(buffer, [nbytes[, flags]]) -> nbytes_read
|
| A version of recv() that stores its data into a buffer rather than creating
| a new string. Receive up to buffersize bytes from the socket. If buffersize
| is not specified (or 0), receive up to the size available in the given buffer.
|
| See recv() for documentation about the flags.
|
| recvfrom(self, buflen=1024, flags=0)
| recvfrom(buffersize[, flags]) -> (data, address info)
|
| Like recv(buffersize, flags) but also return the sender's address info.
|
| recvfrom_into(self, buffer, nbytes=None, flags=0)
| recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info)
|
| Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.
|
| recvmsg(self, *args, **kwargs)
|
| recvmsg_into(self, *args, **kwargs)
|
| selected_alpn_protocol(self)
| Return the currently selected ALPN protocol as a string, or ``None``
| if a next protocol was not negotiated or if ALPN is not supported by one
| of the peers.
|
| selected_npn_protocol(self)
| Return the currently selected NPN protocol as a string, or ``None``
| if a next protocol was not negotiated or if NPN is not supported by one
| of the peers.
|
| send(self, data, flags=0)
| send(data[, flags]) -> count
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. Return the number of bytes
| sent; this may be less than len(data) if the network is busy.
|
| sendall(self, data, flags=0)
| sendall(data[, flags])
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. This calls send() repeatedly
| until all data is sent. If an error occurs, it's impossible
| to tell how much data has been sent.
|
| sendfile(self, file, offset=0, count=None)
| Send a file, possibly by using os.sendfile() if this is a
| clear-text socket. Return the total number of bytes sent.
|
| sendmsg(self, *args, **kwargs)
|
| sendto(self, data, flags_or_addr, addr=None)
| sendto(data[, flags], address) -> count
|
| Like send(data, flags) but allows specifying the destination address.
| For IP sockets, the address is a pair (hostaddr, port).
|
| shared_ciphers(self)
| Return a list of ciphers shared by the client during the handshake or
| None if this is not a valid server connection.
|
| shutdown(self, how)
| shutdown(flag)
|
| Shut down the reading side of the socket (flag == SHUT_RD), the writing side
| of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).
|
| unwrap(self)
| Start the SSL shutdown handshake.
|
| verify_client_post_handshake(self)
|
| version(self)
| Return a string identifying the protocol version used by the
| current SSL channel.
|
| write(self, data)
| Write DATA to the underlying SSL channel. Returns
| number of bytes of DATA actually transmitted.
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| session_reused
| Was the client session reused during handshake
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| context
| The SSLContext that is currently in use.
|
| session
| The SSLSession for client socket.
|
| ----------------------------------------------------------------------
| Methods inherited from socket.socket:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| __getstate__(self)
| Helper for pickle.
|
| __repr__(self)
| Wrap __repr__() to reveal the real class name and socket
| address(es).
|
| close(self)
| close()
|
| Close the socket. It cannot be used after this call.
|
| detach(self)
| detach() -> file descriptor
|
| Close the socket object without closing the underlying file descriptor.
| The object cannot be used after this call, but the file descriptor
| can be reused for other purposes. The file descriptor is returned.
|
| get_inheritable(self)
| Get the inheritable flag of the socket
|
| makefile(self, mode='r', buffering=None, *, encoding=None, errors=None, newline=None)
| makefile(...) -> an I/O stream connected to the socket
|
| The arguments are as for io.open() after the filename, except the only
| supported mode values are 'r' (default), 'w', 'b', or a combination of
| those.
|
| set_inheritable(self, inheritable)
| Set the inheritable flag of the socket
|
| ----------------------------------------------------------------------
| Readonly properties inherited from socket.socket:
|
| family
| Read-only access to the address family for this socket.
|
| type
| Read-only access to the socket type.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socket.socket:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from _socket.socket:
|
| __del__(...)
|
| bind(...)
| bind(address)
|
| Bind the socket to a local address. For IP sockets, the address is a
| pair (host, port); the host must refer to the local host. For raw packet
| sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])
|
| fileno(...)
| fileno() -> integer
|
| Return the integer file descriptor of the socket.
|
| getblocking(...)
| getblocking()
|
| Returns True if socket is in blocking mode, or False if it
| is in non-blocking mode.
|
| getpeername(...)
| getpeername() -> address info
|
| Return the address of the remote endpoint. For IP sockets, the address
| info is a pair (hostaddr, port).
|
| getsockname(...)
| getsockname() -> address info
|
| Return the address of the local endpoint. The format depends on the
| address family. For IPv4 sockets, the address info is a pair
| (hostaddr, port). For IPv6 sockets, the address info is a 4-tuple
| (hostaddr, port, flowinfo, scope_id).
|
| getsockopt(...)
| getsockopt(level, option[, buffersize]) -> value
|
| Get a socket option. See the Unix manual for level and option.
| If a nonzero buffersize argument is given, the return value is a
| string of that length; otherwise it is an integer.
|
| gettimeout(...)
| gettimeout() -> timeout
|
| Returns the timeout in seconds (float) associated with socket
| operations. A timeout of None indicates that timeouts on socket
| operations are disabled.
|
| ioctl(...)
| ioctl(cmd, option) -> long
|
| Control the socket with WSAIoctl syscall. Currently supported 'cmd' values are
| SIO_RCVALL: 'option' must be one of the socket.RCVALL_* constants.
| SIO_KEEPALIVE_VALS: 'option' is a tuple of (onoff, timeout, interval).
| SIO_LOOPBACK_FAST_PATH: 'option' is a boolean value, and is disabled by default
|
| listen(...)
| listen([backlog])
|
| Enable a server to accept connections. If backlog is specified, it must be
| at least 0 (if it is lower, it is set to 0); it specifies the number of
| unaccepted connections that the system will allow before refusing new
| connections. If not specified, a default reasonable value is chosen.
|
| setblocking(...)
| setblocking(flag)
|
| Set the socket to blocking (flag is true) or non-blocking (false).
| setblocking(True) is equivalent to settimeout(None);
| setblocking(False) is equivalent to settimeout(0.0).
|
| setsockopt(...)
| setsockopt(level, option, value: int)
| setsockopt(level, option, value: buffer)
| setsockopt(level, option, None, optlen: int)
|
| Set a socket option. See the Unix manual for level and option.
| The value argument can either be an integer, a string buffer, or
| None, optlen.
|
| settimeout(...)
| settimeout(timeout)
|
| Set a timeout on socket operations. 'timeout' can be a float,
| giving in seconds, or None. Setting a timeout of None disables
| the timeout feature and is equivalent to setblocking(1).
| Setting a timeout of zero is the same as setblocking(0).
|
| share(...)
| share(process_id) -> bytes
|
| Share the socket with another process. The target process id
| must be provided and the resulting bytes object passed to the target
| process. There the shared socket can be instantiated by calling
| socket.fromshare().
|
| ----------------------------------------------------------------------
| Static methods inherited from _socket.socket:
|
| __new__(*args, **kwargs) class method of _socket.socket
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _socket.socket:
|
| proto
| the socket protocol
|
| timeout
| the socket timeout
class SSLSyscallError(SSLError)
| System error when attempting SSL operation.
|
| Method resolution order:
| SSLSyscallError
| SSLError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from SSLError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SSLWantReadError(SSLError)
| Non-blocking SSL socket needs to read more data
| before the requested operation can be completed.
|
| Method resolution order:
| SSLWantReadError
| SSLError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from SSLError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SSLWantWriteError(SSLError)
| Non-blocking SSL socket needs to write more data
| before the requested operation can be completed.
|
| Method resolution order:
| SSLWantWriteError
| SSLError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from SSLError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SSLZeroReturnError(SSLError)
| SSL/TLS session closed cleanly.
|
| Method resolution order:
| SSLZeroReturnError
| SSLError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from SSLError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class TLSVersion(enum.IntEnum)
| TLSVersion(*values)
|
| An enumeration.
|
| Method resolution order:
| TLSVersion
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| MAXIMUM_SUPPORTED = <TLSVersion.MAXIMUM_SUPPORTED: -1>
|
| MINIMUM_SUPPORTED = <TLSVersion.MINIMUM_SUPPORTED: -2>
|
| SSLv3 = <TLSVersion.SSLv3: 768>
|
| TLSv1 = <TLSVersion.TLSv1: 769>
|
| TLSv1_1 = <TLSVersion.TLSv1_1: 770>
|
| TLSv1_2 = <TLSVersion.TLSv1_2: 771>
|
| TLSv1_3 = <TLSVersion.TLSv1_3: 772>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class VerifyFlags(enum.IntFlag)
| VerifyFlags(*values)
|
| An enumeration.
|
| Method resolution order:
| VerifyFlags
| enum.IntFlag
| builtins.int
| enum.ReprEnum
| enum.Flag
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __and__(self, other) from enum.Flag
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __invert__(self) from enum.Flag
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __or__(self, other) from enum.Flag
| Return self|value.
|
| __rand__ = __and__(self, other)
|
| __ror__ = __or__(self, other)
|
| __rxor__ = __xor__(self, other)
|
| __xor__(self, other) from enum.Flag
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| VERIFY_ALLOW_PROXY_CERTS = <VerifyFlags.VERIFY_ALLOW_PROXY_CERTS: 64>
|
| VERIFY_CRL_CHECK_LEAF = <VerifyFlags.VERIFY_CRL_CHECK_LEAF: 4>
|
| VERIFY_X509_PARTIAL_CHAIN = <VerifyFlags.VERIFY_X509_PARTIAL_CHAIN: 52...
|
| VERIFY_X509_STRICT = <VerifyFlags.VERIFY_X509_STRICT: 32>
|
| VERIFY_X509_TRUSTED_FIRST = <VerifyFlags.VERIFY_X509_TRUSTED_FIRST: 32...
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntFlag:
|
| __repr__(self) from enum.Flag
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Flag:
|
| __contains__(self, other)
| Returns True if self has at least the same flags set as other.
|
| __iter__(self)
| Returns flags in definition order.
|
| __len__(self)
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __getitem__(name)
| Return the member matching `name`.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class VerifyMode(enum.IntEnum)
| VerifyMode(*values)
|
| An enumeration.
|
| Method resolution order:
| VerifyMode
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CERT_NONE = <VerifyMode.CERT_NONE: 0>
|
| CERT_OPTIONAL = <VerifyMode.CERT_OPTIONAL: 1>
|
| CERT_REQUIRED = <VerifyMode.CERT_REQUIRED: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
FUNCTIONS
DER_cert_to_PEM_cert(der_cert_bytes)
Takes a certificate in binary DER format and returns the
PEM version of it as a string.
PEM_cert_to_DER_cert(pem_cert_string)
Takes a certificate in ASCII PEM format and returns the
DER-encoded version of it as a byte sequence
RAND_add(string, entropy, /)
Mix string into the OpenSSL PRNG state.
entropy (a float) is a lower bound on the entropy contained in
string. See RFC 4086.
RAND_bytes(n, /)
Generate n cryptographically strong pseudo-random bytes.
RAND_status()
Returns True if the OpenSSL PRNG has been seeded with enough data and False if not.
It is necessary to seed the PRNG with RAND_add() on some platforms before
using the ssl() function.
cert_time_to_seconds(cert_time)
Return the time in seconds since the Epoch, given the timestring
representing the "notBefore" or "notAfter" date from a certificate
in ``"%b %d %H:%M:%S %Y %Z"`` strptime format (C locale).
"notBefore" or "notAfter" dates must use UTC (RFC 5280).
Month is one of: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
UTC should be specified as GMT (see ASN1_TIME_print())
create_default_context(purpose=<Purpose.SERVER_AUTH: _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1')>, *, cafile=None, capath=None, cadata=None)
Create a SSLContext object with default settings.
NOTE: The protocol and settings may change anytime without prior
deprecation. The values represent a fair balance between maximum
compatibility and security.
enum_certificates(store_name)
Retrieve certificates from Windows' cert store.
store_name may be one of 'CA', 'ROOT' or 'MY'. The system may provide
more cert storages, too. The function returns a list of (bytes,
encoding_type, trust) tuples. The encoding_type flag can be interpreted
with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The trust setting is either
a set of OIDs or the boolean True.
enum_crls(store_name)
Retrieve CRLs from Windows' cert store.
store_name may be one of 'CA', 'ROOT' or 'MY'. The system may provide
more cert storages, too. The function returns a list of (bytes,
encoding_type) tuples. The encoding_type flag can be interpreted with
X509_ASN_ENCODING or PKCS_7_ASN_ENCODING.
get_default_verify_paths()
Return paths to default cafile and capath.
get_protocol_name(protocol_code)
get_server_certificate(addr, ssl_version=<_SSLMethod.PROTOCOL_TLS_CLIENT: 16>, ca_certs=None, timeout=<object object at 0x0000017B07D78B30>)
Retrieve the certificate from the server at the specified address,
and return it as a PEM-encoded string.
If 'ca_certs' is specified, validate the server cert against it.
If 'ssl_version' is specified, use it in the connection attempt.
If 'timeout' is specified, use it in the connection attempt.
DATA
ALERT_DESCRIPTION_ACCESS_DENIED = <AlertDescription.ALERT_DESCRIPTION_...
ALERT_DESCRIPTION_BAD_CERTIFICATE = <AlertDescription.ALERT_DESCRIPTIO...
ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE = <AlertDescription.ALERT...
ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE = <AlertDescription....
ALERT_DESCRIPTION_BAD_RECORD_MAC = <AlertDescription.ALERT_DESCRIPTION...
ALERT_DESCRIPTION_CERTIFICATE_EXPIRED = <AlertDescription.ALERT_DESCRI...
ALERT_DESCRIPTION_CERTIFICATE_REVOKED = <AlertDescription.ALERT_DESCRI...
ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN = <AlertDescription.ALERT_DESCRI...
ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE = <AlertDescription.ALERT_D...
ALERT_DESCRIPTION_CLOSE_NOTIFY = <AlertDescription.ALERT_DESCRIPTION_C...
ALERT_DESCRIPTION_DECODE_ERROR = <AlertDescription.ALERT_DESCRIPTION_D...
ALERT_DESCRIPTION_DECOMPRESSION_FAILURE = <AlertDescription.ALERT_DESC...
ALERT_DESCRIPTION_DECRYPT_ERROR = <AlertDescription.ALERT_DESCRIPTION_...
ALERT_DESCRIPTION_HANDSHAKE_FAILURE = <AlertDescription.ALERT_DESCRIPT...
ALERT_DESCRIPTION_ILLEGAL_PARAMETER = <AlertDescription.ALERT_DESCRIPT...
ALERT_DESCRIPTION_INSUFFICIENT_SECURITY = <AlertDescription.ALERT_DESC...
ALERT_DESCRIPTION_INTERNAL_ERROR = <AlertDescription.ALERT_DESCRIPTION...
ALERT_DESCRIPTION_NO_RENEGOTIATION = <AlertDescription.ALERT_DESCRIPTI...
ALERT_DESCRIPTION_PROTOCOL_VERSION = <AlertDescription.ALERT_DESCRIPTI...
ALERT_DESCRIPTION_RECORD_OVERFLOW = <AlertDescription.ALERT_DESCRIPTIO...
ALERT_DESCRIPTION_UNEXPECTED_MESSAGE = <AlertDescription.ALERT_DESCRIP...
ALERT_DESCRIPTION_UNKNOWN_CA = <AlertDescription.ALERT_DESCRIPTION_UNK...
ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY = <AlertDescription.ALERT_DESCR...
ALERT_DESCRIPTION_UNRECOGNIZED_NAME = <AlertDescription.ALERT_DESCRIPT...
ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE = <AlertDescription.ALERT_DE...
ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION = <AlertDescription.ALERT_DESC...
ALERT_DESCRIPTION_USER_CANCELLED = <AlertDescription.ALERT_DESCRIPTION...
CERT_NONE = <VerifyMode.CERT_NONE: 0>
CERT_OPTIONAL = <VerifyMode.CERT_OPTIONAL: 1>
CERT_REQUIRED = <VerifyMode.CERT_REQUIRED: 2>
CHANNEL_BINDING_TYPES = ['tls-unique']
HAS_ALPN = True
HAS_ECDH = True
HAS_NEVER_CHECK_COMMON_NAME = True
HAS_NPN = False
HAS_SNI = True
HAS_SSLv2 = False
HAS_SSLv3 = False
HAS_TLSv1 = True
HAS_TLSv1_1 = True
HAS_TLSv1_2 = True
HAS_TLSv1_3 = True
OPENSSL_VERSION = 'OpenSSL 3.0.15 3 Sep 2024'
OPENSSL_VERSION_INFO = (3, 0, 0, 15, 0)
OPENSSL_VERSION_NUMBER = 805306608
OP_ALL = <Options.OP_ALL: 2147483728>
OP_CIPHER_SERVER_PREFERENCE = <Options.OP_CIPHER_SERVER_PREFERENCE: 41...
OP_ENABLE_KTLS = <Options.OP_ENABLE_KTLS: 8>
OP_ENABLE_MIDDLEBOX_COMPAT = <Options.OP_ENABLE_MIDDLEBOX_COMPAT: 1048...
OP_IGNORE_UNEXPECTED_EOF = <Options.OP_IGNORE_UNEXPECTED_EOF: 128>
OP_LEGACY_SERVER_CONNECT = <Options.OP_LEGACY_SERVER_CONNECT: 4>
OP_NO_COMPRESSION = <Options.OP_NO_COMPRESSION: 131072>
OP_NO_RENEGOTIATION = <Options.OP_NO_RENEGOTIATION: 1073741824>
OP_NO_SSLv2 = <Options.OP_NO_SSLv2: 0>
OP_NO_SSLv3 = <Options.OP_NO_SSLv3: 33554432>
OP_NO_TICKET = <Options.OP_NO_TICKET: 16384>
OP_NO_TLSv1 = <Options.OP_NO_TLSv1: 67108864>
OP_NO_TLSv1_1 = <Options.OP_NO_TLSv1_1: 268435456>
OP_NO_TLSv1_2 = <Options.OP_NO_TLSv1_2: 134217728>
OP_NO_TLSv1_3 = <Options.OP_NO_TLSv1_3: 536870912>
OP_SINGLE_DH_USE = <Options.OP_NO_SSLv2: 0>
OP_SINGLE_ECDH_USE = <Options.OP_NO_SSLv2: 0>
PEM_FOOTER = '-----END CERTIFICATE-----'
PEM_HEADER = '-----BEGIN CERTIFICATE-----'
PROTOCOL_SSLv23 = <_SSLMethod.PROTOCOL_TLS: 2>
PROTOCOL_TLS = <_SSLMethod.PROTOCOL_TLS: 2>
PROTOCOL_TLS_CLIENT = <_SSLMethod.PROTOCOL_TLS_CLIENT: 16>
PROTOCOL_TLS_SERVER = <_SSLMethod.PROTOCOL_TLS_SERVER: 17>
PROTOCOL_TLSv1 = <_SSLMethod.PROTOCOL_TLSv1: 3>
PROTOCOL_TLSv1_1 = <_SSLMethod.PROTOCOL_TLSv1_1: 4>
PROTOCOL_TLSv1_2 = <_SSLMethod.PROTOCOL_TLSv1_2: 5>
SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
SOL_SOCKET = 65535
SO_TYPE = 4104
SSL_ERROR_EOF = <SSLErrorNumber.SSL_ERROR_EOF: 8>
SSL_ERROR_INVALID_ERROR_CODE = <SSLErrorNumber.SSL_ERROR_INVALID_ERROR...
SSL_ERROR_SSL = <SSLErrorNumber.SSL_ERROR_SSL: 1>
SSL_ERROR_SYSCALL = <SSLErrorNumber.SSL_ERROR_SYSCALL: 5>
SSL_ERROR_WANT_CONNECT = <SSLErrorNumber.SSL_ERROR_WANT_CONNECT: 7>
SSL_ERROR_WANT_READ = <SSLErrorNumber.SSL_ERROR_WANT_READ: 2>
SSL_ERROR_WANT_WRITE = <SSLErrorNumber.SSL_ERROR_WANT_WRITE: 3>
SSL_ERROR_WANT_X509_LOOKUP = <SSLErrorNumber.SSL_ERROR_WANT_X509_LOOKU...
SSL_ERROR_ZERO_RETURN = <SSLErrorNumber.SSL_ERROR_ZERO_RETURN: 6>
VERIFY_ALLOW_PROXY_CERTS = <VerifyFlags.VERIFY_ALLOW_PROXY_CERTS: 64>
VERIFY_CRL_CHECK_CHAIN = <VerifyFlags.VERIFY_CRL_CHECK_CHAIN: 12>
VERIFY_CRL_CHECK_LEAF = <VerifyFlags.VERIFY_CRL_CHECK_LEAF: 4>
VERIFY_DEFAULT = <VerifyFlags.VERIFY_DEFAULT: 0>
VERIFY_X509_PARTIAL_CHAIN = <VerifyFlags.VERIFY_X509_PARTIAL_CHAIN: 52...
VERIFY_X509_STRICT = <VerifyFlags.VERIFY_X509_STRICT: 32>
VERIFY_X509_TRUSTED_FIRST = <VerifyFlags.VERIFY_X509_TRUSTED_FIRST: 32...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\ssl.py
http.client.sys
Python Library Documentation: built-in module sys
NAME
sys
MODULE REFERENCE
https://docs.python.org/3.12/library/sys.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides access to some objects used or maintained by the
interpreter and to functions that interact strongly with the interpreter.
Dynamic objects:
argv -- command line arguments; argv[0] is the script pathname if known
path -- module search path; path[0] is the script directory, else ''
modules -- dictionary of loaded modules
displayhook -- called to show results in an interactive session
excepthook -- called to handle any uncaught exception other than SystemExit
To customize printing in an interactive session or to install a custom
top-level exception handler, assign other functions to replace these.
stdin -- standard input file object; used by input()
stdout -- standard output file object; used by print()
stderr -- standard error object; used for error messages
By assigning other file objects (or objects that behave like files)
to these, it is possible to redirect all of the interpreter's I/O.
last_exc - the last uncaught exception
Only available in an interactive session after a
traceback has been printed.
last_type -- type of last uncaught exception
last_value -- value of last uncaught exception
last_traceback -- traceback of last uncaught exception
These three are the (deprecated) legacy representation of last_exc.
Static objects:
builtin_module_names -- tuple of module names built into this interpreter
copyright -- copyright notice pertaining to this interpreter
exec_prefix -- prefix used to find the machine-specific Python library
executable -- absolute path of the executable binary of the Python interpreter
float_info -- a named tuple with information about the float implementation.
float_repr_style -- string indicating the style of repr() output for floats
hash_info -- a named tuple with information about the hash algorithm.
hexversion -- version information encoded as a single integer
implementation -- Python implementation information.
int_info -- a named tuple with information about the int implementation.
maxsize -- the largest supported length of containers.
maxunicode -- the value of the largest Unicode code point
platform -- platform identifier
prefix -- prefix used to find the Python library
thread_info -- a named tuple with information about the thread implementation.
version -- the version of this interpreter as a string
version_info -- version information as a named tuple
dllhandle -- [Windows only] integer handle of the Python DLL
winver -- [Windows only] version number of the Python DLL
_enablelegacywindowsfsencoding -- [Windows only]
__stdin__ -- the original stdin; don't touch!
__stdout__ -- the original stdout; don't touch!
__stderr__ -- the original stderr; don't touch!
__displayhook__ -- the original displayhook; don't touch!
__excepthook__ -- the original excepthook; don't touch!
Functions:
displayhook() -- print an object to the screen, and save it in builtins._
excepthook() -- print an exception and its traceback to sys.stderr
exception() -- return the current thread's active exception
exc_info() -- return information about the current thread's active exception
exit() -- exit the interpreter by raising SystemExit
getdlopenflags() -- returns flags to be used for dlopen() calls
getprofile() -- get the global profiling function
getrefcount() -- return the reference count for an object (plus one :-)
getrecursionlimit() -- return the max recursion depth for the interpreter
getsizeof() -- return the size of an object in bytes
gettrace() -- get the global debug tracing function
setdlopenflags() -- set the flags to be used for dlopen() calls
setprofile() -- set the global profiling function
setrecursionlimit() -- set the max recursion depth for the interpreter
settrace() -- set the global debug tracing function
SUBMODULES
monitoring
FUNCTIONS
__breakpointhook__ = breakpointhook(...)
breakpointhook(*args, **kws)
This hook function is called by built-in breakpoint().
__displayhook__ = displayhook(object, /)
Print an object to sys.stdout and also save it in builtins._
__excepthook__ = excepthook(exctype, value, traceback, /)
Handle an exception by displaying it with a traceback on sys.stderr.
__unraisablehook__ = unraisablehook(unraisable, /)
Handle an unraisable exception.
The unraisable argument has the following attributes:
* exc_type: Exception type.
* exc_value: Exception value, can be None.
* exc_traceback: Exception traceback, can be None.
* err_msg: Error message, can be None.
* object: Object causing the exception, can be None.
activate_stack_trampoline(backend, /)
Activate stack profiler trampoline *backend*.
addaudithook(hook)
Adds a new audit hook callback.
audit(...)
audit(event, *args)
Passes the event to any audit hooks that are attached.
breakpointhook(...)
breakpointhook(*args, **kws)
This hook function is called by built-in breakpoint().
call_tracing(func, args, /)
Call func(*args), while tracing is enabled.
The tracing state is saved, and restored afterwards. This is intended
to be called from a debugger from a checkpoint, to recursively debug
some other code.
deactivate_stack_trampoline()
Deactivate the current stack profiler trampoline backend.
If no stack profiler is activated, this function has no effect.
displayhook(object, /)
Print an object to sys.stdout and also save it in builtins._
exc_info()
Return current exception information: (type, value, traceback).
Return information about the most recent exception caught by an except
clause in the current stack frame or in an older stack frame.
excepthook(exctype, value, traceback, /)
Handle an exception by displaying it with a traceback on sys.stderr.
exception()
Return the current exception.
Return the most recent exception caught by an except clause
in the current stack frame or in an older stack frame, or None
if no such exception exists.
exit(status=None, /)
Exit the interpreter by raising SystemExit(status).
If the status is omitted or None, it defaults to zero (i.e., success).
If the status is an integer, it will be used as the system exit status.
If it is another kind of object, it will be printed and the system
exit status will be one (i.e., failure).
get_asyncgen_hooks()
Return the installed asynchronous generators hooks.
This returns a namedtuple of the form (firstiter, finalizer).
get_coroutine_origin_tracking_depth()
Check status of origin tracking for coroutine objects in this thread.
get_int_max_str_digits()
Return the maximum string digits limit for non-binary int<->str conversions.
getallocatedblocks()
Return the number of memory blocks currently allocated.
getdefaultencoding()
Return the current default encoding used by the Unicode implementation.
getfilesystemencodeerrors()
Return the error mode used Unicode to OS filename conversion.
getfilesystemencoding()
Return the encoding used to convert Unicode filenames to OS filenames.
getprofile()
Return the profiling function set with sys.setprofile.
See the profiler chapter in the library manual.
getrecursionlimit()
Return the current value of the recursion limit.
The recursion limit is the maximum depth of the Python interpreter
stack. This limit prevents infinite recursion from causing an overflow
of the C stack and crashing Python.
getrefcount(object, /)
Return the reference count of object.
The count returned is generally one higher than you might expect,
because it includes the (temporary) reference as an argument to
getrefcount().
getsizeof(...)
getsizeof(object [, default]) -> int
Return the size of object in bytes.
getswitchinterval()
Return the current thread switch interval; see sys.setswitchinterval().
gettrace()
Return the global debug tracing function set with sys.settrace.
See the debugger chapter in the library manual.
getunicodeinternedsize()
Return the number of elements of the unicode interned dictionary
getwindowsversion()
Return info about the running version of Windows as a named tuple.
The members are named: major, minor, build, platform, service_pack,
service_pack_major, service_pack_minor, suite_mask, product_type and
platform_version. For backward compatibility, only the first 5 items
are available by indexing. All elements are numbers, except
service_pack and platform_type which are strings, and platform_version
which is a 3-tuple. Platform is always 2. Product_type may be 1 for a
workstation, 2 for a domain controller, 3 for a server.
Platform_version is a 3-tuple containing a version number that is
intended for identifying the OS rather than feature detection.
intern(string, /)
``Intern'' the given string.
This enters the string in the (global) table of interned strings whose
purpose is to speed up dictionary lookups. Return the string itself or
the previously interned string object with the same value.
is_finalizing()
Return True if Python is exiting.
is_stack_trampoline_active()
Return *True* if a stack profiler trampoline is active.
set_asyncgen_hooks(...)
set_asyncgen_hooks([firstiter] [, finalizer])
Set a finalizer for async generators objects.
set_coroutine_origin_tracking_depth(depth)
Enable or disable origin tracking for coroutine objects in this thread.
Coroutine objects will track 'depth' frames of traceback information
about where they came from, available in their cr_origin attribute.
Set a depth of 0 to disable.
set_int_max_str_digits(maxdigits)
Set the maximum string digits limit for non-binary int<->str conversions.
setprofile(...)
setprofile(function)
Set the profiling function. It will be called on each function call
and return. See the profiler chapter in the library manual.
setrecursionlimit(limit, /)
Set the maximum depth of the Python interpreter stack to n.
This limit prevents infinite recursion from causing an overflow of the C
stack and crashing Python. The highest possible limit is platform-
dependent.
setswitchinterval(interval, /)
Set the ideal thread switching delay inside the Python interpreter.
The actual frequency of switching threads can be lower if the
interpreter executes long sequences of uninterruptible code
(this is implementation-specific and workload-dependent).
The parameter must represent the desired switching delay in seconds
A typical value is 0.005 (5 milliseconds).
settrace(...)
settrace(function)
Set the global debug tracing function. It will be called on each
function call. See the debugger chapter in the library manual.
unraisablehook(unraisable, /)
Handle an unraisable exception.
The unraisable argument has the following attributes:
* exc_type: Exception type.
* exc_value: Exception value, can be None.
* exc_traceback: Exception traceback, can be None.
* err_msg: Error message, can be None.
* object: Object causing the exception, can be None.
DATA
__stderr__ = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='cp1...
__stdin__ = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8...
__stdout__ = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1...
api_version = 1013
argv = [r'f:\JoeyCodes\PyDocs\py_docs.py', '--worker', 'http', r'F:\Jo...
base_exec_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Pyth...
base_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312...
builtin_module_names = ('_abc', '_ast', '_bisect', '_blake2', '_codecs...
byteorder = 'little'
copyright = 'Copyright (c) 2001-2023 Python Software Foundati...ematis...
dllhandle = 140727031824384
dont_write_bytecode = False
exec_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312...
executable = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312\...
flags = sys.flags(debug=0, inspect=0, interactive=0, opt...ding=0, saf...
float_info = sys.float_info(max=1.7976931348623157e+308, max_...epsilo...
float_repr_style = 'short'
hash_info = sys.hash_info(width=64, modulus=2305843009213693...iphash1...
hexversion = 51119856
implementation = namespace(name='cpython', cache_tag='cpython-312...as...
int_info = sys.int_info(bits_per_digit=30, sizeof_digit=4, ..._str_dig...
maxsize = 9223372036854775807
maxunicode = 1114111
meta_path = [<_distutils_hack.DistutilsMetaFinder object>, <class '_fr...
modules = {'__future__': <module '__future__' from 'C:\\Users\\Youse\\...
orig_argv = [r'C:\Users\Youse\AppData\Local\Programs\Python\Python312\...
path = [r'f:\JoeyCodes\PyDocs', r'C:\Users\Youse\AppData\Local\Program...
path_hooks = [<class 'zipimport.zipimporter'>, <function FileFinder.pa...
path_importer_cache = {r'C:\Users\Youse\AppData\Local\Programs\Python\...
platform = 'win32'
platlibdir = 'DLLs'
prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312'
pycache_prefix = None
stderr = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='cp1252'...
stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
stdlib_module_names = frozenset({'__future__', '_abc', '_aix_support',...
stdout = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'...
thread_info = sys.thread_info(name='nt', lock=None, version=None)
version = '3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v...
version_info = sys.version_info(major=3, minor=12, micro=6, releaselev...
warnoptions = []
winver = '3.12'
FILE
(built-in)
http.client.urlsplit
Python Library Documentation: _lru_cache_wrapper in module urllib.parse
urlsplit(url, scheme='', allow_fragments=True)
Parse a URL into 5 components:
<scheme>://<netloc>/<path>?<query>#<fragment>
The result is a named 5-tuple with fields corresponding to the
above. It is either a SplitResult or SplitResultBytes object,
depending on the type of the url parameter.
The username, password, hostname, and port sub-components of netloc
can also be accessed as attributes of the returned object.
The scheme argument provides the default value of the scheme
component when no scheme is found in url.
If allow_fragments is False, no attempt is made to separate the
fragment component from the previous component, which can be either
path or query.
Note that % escapes are not expanded.
http.server.BaseHTTPRequestHandler
Python Library Documentation: class BaseHTTPRequestHandler in module http.server
class BaseHTTPRequestHandler(socketserver.StreamRequestHandler)
| BaseHTTPRequestHandler(request, client_address, server)
|
| HTTP request handler base class.
|
| The following explanation of HTTP serves to guide you through the
| code as well as to expose any misunderstandings I may have about
| HTTP (so you don't need to read the code to figure out I'm wrong
| :-).
|
| HTTP (HyperText Transfer Protocol) is an extensible protocol on
| top of a reliable stream transport (e.g. TCP/IP). The protocol
| recognizes three parts to a request:
|
| 1. One line identifying the request type and path
| 2. An optional set of RFC-822-style headers
| 3. An optional data part
|
| The headers and data are separated by a blank line.
|
| The first line of the request has the form
|
| <command> <path> <version>
|
| where <command> is a (case-sensitive) keyword such as GET or POST,
| <path> is a string containing path information for the request,
| and <version> should be the string "HTTP/1.0" or "HTTP/1.1".
| <path> is encoded using the URL encoding scheme (using %xx to signify
| the ASCII character with hex code xx).
|
| The specification specifies that lines are separated by CRLF but
| for compatibility with the widest range of clients recommends
| servers also handle LF. Similarly, whitespace in the request line
| is treated sensibly (allowing multiple spaces between components
| and allowing trailing whitespace).
|
| Similarly, for output, lines ought to be separated by CRLF pairs
| but most clients grok LF characters just fine.
|
| If the first line of the request has the form
|
| <command> <path>
|
| (i.e. <version> is left out) then this is assumed to be an HTTP
| 0.9 request; this form has no optional headers and data part and
| the reply consists of just the data.
|
| The reply form of the HTTP 1.x protocol again has three parts:
|
| 1. One line giving the response code
| 2. An optional set of RFC-822-style headers
| 3. The data
|
| Again, the headers and data are separated by a blank line.
|
| The response code line has the form
|
| <version> <responsecode> <responsestring>
|
| where <version> is the protocol version ("HTTP/1.0" or "HTTP/1.1"),
| <responsecode> is a 3-digit response code indicating success or
| failure of the request, and <responsestring> is an optional
| human-readable string explaining what the response code means.
|
| This server parses the request and the headers, and then calls a
| function specific to the request type (<command>). Specifically,
| a request SPAM will be handled by a method do_SPAM(). If no
| such method exists the server sends an error response to the
| client. If it exists, it is called with no arguments:
|
| do_SPAM()
|
| Note that the request name is case sensitive (i.e. SPAM and spam
| are different requests).
|
| The various request details are stored in instance variables:
|
| - client_address is the client IP address in the form (host,
| port);
|
| - command, path and version are the broken-down request line;
|
| - headers is an instance of email.message.Message (or a derived
| class) containing the header information;
|
| - rfile is a file object open for reading positioned at the
| start of the optional input data part;
|
| - wfile is a file object open for writing.
|
| IT IS IMPORTANT TO ADHERE TO THE PROTOCOL FOR WRITING!
|
| The first thing to be written must be the response line. Then
| follow 0 or more header lines, then a blank line, and then the
| actual data (if any). The meaning of the header lines depends on
| the command executed by the server; in most cases, when data is
| returned, there should be at least one header line of the form
|
| Content-type: <type>/<subtype>
|
| where <type> and <subtype> should be registered MIME types,
| e.g. "text/html" or "text/plain".
|
| Method resolution order:
| BaseHTTPRequestHandler
| socketserver.StreamRequestHandler
| socketserver.BaseRequestHandler
| builtins.object
|
| Methods defined here:
|
| address_string(self)
| Return the client address.
|
| date_time_string(self, timestamp=None)
| Return the current date and time formatted for a message header.
|
| end_headers(self)
| Send the blank line ending the MIME headers.
|
| flush_headers(self)
|
| handle(self)
| Handle multiple requests if necessary.
|
| handle_expect_100(self)
| Decide what to do with an "Expect: 100-continue" header.
|
| If the client is expecting a 100 Continue response, we must
| respond with either a 100 Continue or a final response before
| waiting for the request body. The default is to always respond
| with a 100 Continue. You can behave differently (for example,
| reject unauthorized requests) by overriding this method.
|
| This method should either return True (possibly after sending
| a 100 Continue response) or send an error response and return
| False.
|
| handle_one_request(self)
| Handle a single HTTP request.
|
| You normally don't need to override this method; see the class
| __doc__ string for information on how to handle specific HTTP
| commands such as GET and POST.
|
| log_date_time_string(self)
| Return the current time formatted for logging.
|
| log_error(self, format, *args)
| Log an error.
|
| This is called when a request cannot be fulfilled. By
| default it passes the message on to log_message().
|
| Arguments are the same as for log_message().
|
| XXX This should go to the separate error log.
|
| log_message(self, format, *args)
| Log an arbitrary message.
|
| This is used by all other logging functions. Override
| it if you have specific logging wishes.
|
| The first argument, FORMAT, is a format string for the
| message to be logged. If the format string contains
| any % escapes requiring parameters, they should be
| specified as subsequent arguments (it's just like
| printf!).
|
| The client ip and current date/time are prefixed to
| every message.
|
| Unicode control characters are replaced with escaped hex
| before writing the output to stderr.
|
| log_request(self, code='-', size='-')
| Log an accepted request.
|
| This is called by send_response().
|
| parse_request(self)
| Parse a request (internal).
|
| The request should be stored in self.raw_requestline; the results
| are in self.command, self.path, self.request_version and
| self.headers.
|
| Return True for success, False for failure; on failure, any relevant
| error response has already been sent back.
|
| send_error(self, code, message=None, explain=None)
| Send and log an error reply.
|
| Arguments are
| * code: an HTTP error code
| 3 digits
| * message: a simple optional 1 line reason phrase.
| *( HTAB / SP / VCHAR / %x80-FF )
| defaults to short entry matching the response code
| * explain: a detailed message defaults to the long entry
| matching the response code.
|
| This sends an error response (so it must be called before any
| output has been generated), logs the error, and finally sends
| a piece of HTML explaining the error to the user.
|
| send_header(self, keyword, value)
| Send a MIME header to the headers buffer.
|
| send_response(self, code, message=None)
| Add the response header to the headers buffer and log the
| response code.
|
| Also send two standard headers with the server software
| version and the current date.
|
| send_response_only(self, code, message=None)
| Send the response header only.
|
| version_string(self)
| Return the server software version string.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| MessageClass = <class 'http.client.HTTPMessage'>
|
| default_request_version = 'HTTP/0.9'
|
| error_content_type = 'text/html;charset=utf-8'
|
| error_message_format = '<!DOCTYPE HTML>\n<html lang="en">\n <head>\...
|
| monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'A...
|
| protocol_version = 'HTTP/1.0'
|
| responses = {<HTTPStatus.CONTINUE: 100>: ('Continue', 'Request receive...
|
| server_version = 'BaseHTTP/0.6'
|
| sys_version = 'Python/3.12.6'
|
| weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.StreamRequestHandler:
|
| finish(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.StreamRequestHandler:
|
| disable_nagle_algorithm = False
|
| rbufsize = -1
|
| timeout = None
|
| wbufsize = 0
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.BaseRequestHandler:
|
| __init__(self, request, client_address, server)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socketserver.BaseRequestHandler:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
http.server.CGIHTTPRequestHandler
Python Library Documentation: class CGIHTTPRequestHandler in module http.server
class CGIHTTPRequestHandler(SimpleHTTPRequestHandler)
| CGIHTTPRequestHandler(*args, directory=None, **kwargs)
|
| Complete HTTP server with GET, HEAD and POST commands.
|
| GET and HEAD also support running CGI scripts.
|
| The POST command is *only* implemented for CGI scripts.
|
| Method resolution order:
| CGIHTTPRequestHandler
| SimpleHTTPRequestHandler
| BaseHTTPRequestHandler
| socketserver.StreamRequestHandler
| socketserver.BaseRequestHandler
| builtins.object
|
| Methods defined here:
|
| do_POST(self)
| Serve a POST request.
|
| This is only implemented for CGI scripts.
|
| is_cgi(self)
| Test whether self.path corresponds to a CGI script.
|
| Returns True and updates the cgi_info attribute to the tuple
| (dir, rest) if self.path requires running a CGI script.
| Returns False otherwise.
|
| If any exception is raised, the caller should assume that
| self.path was rejected as invalid and act accordingly.
|
| The default implementation tests whether the normalized url
| path begins with one of the strings in self.cgi_directories
| (and the next character is a '/' or the end of the string).
|
| is_executable(self, path)
| Test whether argument path is an executable file.
|
| is_python(self, path)
| Test whether argument path is a Python script.
|
| run_cgi(self)
| Execute a CGI script.
|
| send_head(self)
| Version of send_head that support CGI scripts
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| cgi_directories = ['/cgi-bin', '/htbin']
|
| have_fork = False
|
| rbufsize = 0
|
| ----------------------------------------------------------------------
| Methods inherited from SimpleHTTPRequestHandler:
|
| __init__(self, *args, directory=None, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| copyfile(self, source, outputfile)
| Copy all data between two file objects.
|
| The SOURCE argument is a file object open for reading
| (or anything with a read() method) and the DESTINATION
| argument is a file object open for writing (or
| anything with a write() method).
|
| The only reason for overriding this would be to change
| the block size or perhaps to replace newlines by CRLF
| -- note however that this the default server uses this
| to copy binary data as well.
|
| do_GET(self)
| Serve a GET request.
|
| do_HEAD(self)
| Serve a HEAD request.
|
| guess_type(self, path)
| Guess the type of a file.
|
| Argument is a PATH (a filename).
|
| Return value is a string of the form type/subtype,
| usable for a MIME Content-type header.
|
| The default implementation looks the file's extension
| up in the table self.extensions_map, using application/octet-stream
| as a default; however it would be permissible (if
| slow) to look inside the data to make a better guess.
|
| list_directory(self, path)
| Helper to produce a directory listing (absent index.html).
|
| Return value is either a file object, or None (indicating an
| error). In either case, the headers are sent, making the
| interface the same as for send_head().
|
| translate_path(self, path)
| Translate a /-separated PATH to the local filename syntax.
|
| Components that mean special things to the local file system
| (e.g. drive or directory names) are ignored. (XXX They should
| probably be diagnosed.)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from SimpleHTTPRequestHandler:
|
| extensions_map = {'.Z': 'application/octet-stream', '.bz2': 'applicati...
|
| index_pages = ('index.html', 'index.htm')
|
| server_version = 'SimpleHTTP/0.6'
|
| ----------------------------------------------------------------------
| Methods inherited from BaseHTTPRequestHandler:
|
| address_string(self)
| Return the client address.
|
| date_time_string(self, timestamp=None)
| Return the current date and time formatted for a message header.
|
| end_headers(self)
| Send the blank line ending the MIME headers.
|
| flush_headers(self)
|
| handle(self)
| Handle multiple requests if necessary.
|
| handle_expect_100(self)
| Decide what to do with an "Expect: 100-continue" header.
|
| If the client is expecting a 100 Continue response, we must
| respond with either a 100 Continue or a final response before
| waiting for the request body. The default is to always respond
| with a 100 Continue. You can behave differently (for example,
| reject unauthorized requests) by overriding this method.
|
| This method should either return True (possibly after sending
| a 100 Continue response) or send an error response and return
| False.
|
| handle_one_request(self)
| Handle a single HTTP request.
|
| You normally don't need to override this method; see the class
| __doc__ string for information on how to handle specific HTTP
| commands such as GET and POST.
|
| log_date_time_string(self)
| Return the current time formatted for logging.
|
| log_error(self, format, *args)
| Log an error.
|
| This is called when a request cannot be fulfilled. By
| default it passes the message on to log_message().
|
| Arguments are the same as for log_message().
|
| XXX This should go to the separate error log.
|
| log_message(self, format, *args)
| Log an arbitrary message.
|
| This is used by all other logging functions. Override
| it if you have specific logging wishes.
|
| The first argument, FORMAT, is a format string for the
| message to be logged. If the format string contains
| any % escapes requiring parameters, they should be
| specified as subsequent arguments (it's just like
| printf!).
|
| The client ip and current date/time are prefixed to
| every message.
|
| Unicode control characters are replaced with escaped hex
| before writing the output to stderr.
|
| log_request(self, code='-', size='-')
| Log an accepted request.
|
| This is called by send_response().
|
| parse_request(self)
| Parse a request (internal).
|
| The request should be stored in self.raw_requestline; the results
| are in self.command, self.path, self.request_version and
| self.headers.
|
| Return True for success, False for failure; on failure, any relevant
| error response has already been sent back.
|
| send_error(self, code, message=None, explain=None)
| Send and log an error reply.
|
| Arguments are
| * code: an HTTP error code
| 3 digits
| * message: a simple optional 1 line reason phrase.
| *( HTAB / SP / VCHAR / %x80-FF )
| defaults to short entry matching the response code
| * explain: a detailed message defaults to the long entry
| matching the response code.
|
| This sends an error response (so it must be called before any
| output has been generated), logs the error, and finally sends
| a piece of HTML explaining the error to the user.
|
| send_header(self, keyword, value)
| Send a MIME header to the headers buffer.
|
| send_response(self, code, message=None)
| Add the response header to the headers buffer and log the
| response code.
|
| Also send two standard headers with the server software
| version and the current date.
|
| send_response_only(self, code, message=None)
| Send the response header only.
|
| version_string(self)
| Return the server software version string.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from BaseHTTPRequestHandler:
|
| MessageClass = <class 'http.client.HTTPMessage'>
|
| default_request_version = 'HTTP/0.9'
|
| error_content_type = 'text/html;charset=utf-8'
|
| error_message_format = '<!DOCTYPE HTML>\n<html lang="en">\n <head>\...
|
| monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'A...
|
| protocol_version = 'HTTP/1.0'
|
| responses = {<HTTPStatus.CONTINUE: 100>: ('Continue', 'Request receive...
|
| sys_version = 'Python/3.12.6'
|
| weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.StreamRequestHandler:
|
| finish(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.StreamRequestHandler:
|
| disable_nagle_algorithm = False
|
| timeout = None
|
| wbufsize = 0
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socketserver.BaseRequestHandler:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
http.server.DEFAULT_ERROR_CONTENT_TYPE
Error rendering doc: No Python documentation found for 'text/html;charset=utf-8'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
http.server.DEFAULT_ERROR_MESSAGE
Error rendering doc: No Python documentation found for '<!DOCTYPE HTML>\n<html lang="en">\n <head>\n <meta charset="utf-8">\n <title>Error response</title>\n </head>\n <body>\n <h1>Error response</h1>\n <p>Error code: %(code)d</p>\n <p>Message: %(message)s.</p>\n <p>Error code explanation: %(code)s - %(explain)s.</p>\n </body>\n</html>\n'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
http.server.HTTPServer
Python Library Documentation: class HTTPServer in module http.server class HTTPServer(socketserver.TCPServer) | HTTPServer(server_address, RequestHandlerClass, bind_and_activate=True) | | Method resolution order: | HTTPServer | socketserver.TCPServer | socketserver.BaseServer | builtins.object | | Methods defined here: | | server_bind(self) | Override server_bind to store the server name. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | allow_reuse_address = 1 | | ---------------------------------------------------------------------- | Methods inherited from socketserver.TCPServer: | | __init__(self, server_address, RequestHandlerClass, bind_and_activate=True) | Constructor. May be extended, do not override. | | close_request(self, request) | Called to clean up an individual request. | | fileno(self) | Return socket file number. | | Interface required by selector. | | get_request(self) | Get the request and client address from the socket. | | May be overridden. | | server_activate(self) | Called by constructor to activate the server. | | May be overridden. | | server_close(self) | Called to clean-up the server. | | May be overridden. | | shutdown_request(self, request) | Called to shutdown and close an individual request. | | ---------------------------------------------------------------------- | Data and other attributes inherited from socketserver.TCPServer: | | address_family = <AddressFamily.AF_INET: 2> | | allow_reuse_port = False | | request_queue_size = 5 | | socket_type = <SocketKind.SOCK_STREAM: 1> | | ---------------------------------------------------------------------- | Methods inherited from socketserver.BaseServer: | | __enter__(self) | | __exit__(self, *args) | | finish_request(self, request, client_address) | Finish one request by instantiating RequestHandlerClass. | | handle_error(self, request, client_address) | Handle an error gracefully. May be overridden. | | The default is to print a traceback and continue. | | handle_request(self) | Handle one request, possibly blocking. | | Respects self.timeout. | | handle_timeout(self) | Called if no new request arrives within self.timeout. | | Overridden by ForkingMixIn. | | process_request(self, request, client_address) | Call finish_request. | | Overridden by ForkingMixIn and ThreadingMixIn. | | serve_forever(self, poll_interval=0.5) | Handle one request at a time until shutdown. | | Polls for shutdown every poll_interval seconds. Ignores | self.timeout. If you need to do periodic tasks, do them in | another thread. | | service_actions(self) | Called by the serve_forever() loop. | | May be overridden by a subclass / Mixin to implement any code that | needs to be run during the loop. | | shutdown(self) | Stops the serve_forever loop. | | Blocks until the loop has finished. This must be called while | serve_forever() is running in another thread, or it will | deadlock. | | verify_request(self, request, client_address) | Verify the request. May be overridden. | | Return True if we should proceed with this request. | | ---------------------------------------------------------------------- | Data descriptors inherited from socketserver.BaseServer: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Data and other attributes inherited from socketserver.BaseServer: | | timeout = None
http.server.HTTPStatus
Python Library Documentation: class HTTPStatus in module http class HTTPStatus(enum.IntEnum) | HTTPStatus(*values) | | HTTP status codes and reason phrases | | Status codes from the following RFCs are all observed: | | * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 | * RFC 6585: Additional HTTP Status Codes | * RFC 3229: Delta encoding in HTTP | * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 | * RFC 5842: Binding Extensions to WebDAV | * RFC 7238: Permanent Redirect | * RFC 2295: Transparent Content Negotiation in HTTP | * RFC 2774: An HTTP Extension Framework | * RFC 7725: An HTTP Status Code to Report Legal Obstacles | * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) | * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) | * RFC 8297: An HTTP Status Code for Indicating Hints | * RFC 8470: Using Early Data in HTTP | | Method resolution order: | HTTPStatus | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | ACCEPTED = <HTTPStatus.ACCEPTED: 202> | | ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208> | | BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502> | | BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400> | | CONFLICT = <HTTPStatus.CONFLICT: 409> | | CONTINUE = <HTTPStatus.CONTINUE: 100> | | CREATED = <HTTPStatus.CREATED: 201> | | EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103> | | EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417> | | FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424> | | FORBIDDEN = <HTTPStatus.FORBIDDEN: 403> | | FOUND = <HTTPStatus.FOUND: 302> | | GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504> | | GONE = <HTTPStatus.GONE: 410> | | HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5... | | IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418> | | IM_USED = <HTTPStatus.IM_USED: 226> | | INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507> | | INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500> | | LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411> | | LOCKED = <HTTPStatus.LOCKED: 423> | | LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508> | | METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405> | | MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421> | | MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301> | | MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300> | | MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207> | | NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R... | | NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT... | | NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406> | | NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510> | | NOT_FOUND = <HTTPStatus.NOT_FOUND: 404> | | NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501> | | NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304> | | NO_CONTENT = <HTTPStatus.NO_CONTENT: 204> | | OK = <HTTPStatus.OK: 200> | | PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206> | | PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402> | | PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308> | | PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412> | | PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428> | | PROCESSING = <HTTPStatus.PROCESSING: 102> | | PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI... | | REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI... | | REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413> | | REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO... | | REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408> | | REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414> | | RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205> | | SEE_OTHER = <HTTPStatus.SEE_OTHER: 303> | | SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503> | | SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101> | | TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307> | | TOO_EARLY = <HTTPStatus.TOO_EARLY: 425> | | TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429> | | UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401> | | UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS... | | UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422> | | UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415> | | UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426> | | USE_PROXY = <HTTPStatus.USE_PROXY: 305> | | VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
http.server.SimpleHTTPRequestHandler
Python Library Documentation: class SimpleHTTPRequestHandler in module http.server
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler)
| SimpleHTTPRequestHandler(*args, directory=None, **kwargs)
|
| Simple HTTP request handler with GET and HEAD commands.
|
| This serves files from the current directory and any of its
| subdirectories. The MIME type for files is determined by
| calling the .guess_type() method.
|
| The GET and HEAD requests are identical except that the HEAD
| request omits the actual contents of the file.
|
| Method resolution order:
| SimpleHTTPRequestHandler
| BaseHTTPRequestHandler
| socketserver.StreamRequestHandler
| socketserver.BaseRequestHandler
| builtins.object
|
| Methods defined here:
|
| __init__(self, *args, directory=None, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| copyfile(self, source, outputfile)
| Copy all data between two file objects.
|
| The SOURCE argument is a file object open for reading
| (or anything with a read() method) and the DESTINATION
| argument is a file object open for writing (or
| anything with a write() method).
|
| The only reason for overriding this would be to change
| the block size or perhaps to replace newlines by CRLF
| -- note however that this the default server uses this
| to copy binary data as well.
|
| do_GET(self)
| Serve a GET request.
|
| do_HEAD(self)
| Serve a HEAD request.
|
| guess_type(self, path)
| Guess the type of a file.
|
| Argument is a PATH (a filename).
|
| Return value is a string of the form type/subtype,
| usable for a MIME Content-type header.
|
| The default implementation looks the file's extension
| up in the table self.extensions_map, using application/octet-stream
| as a default; however it would be permissible (if
| slow) to look inside the data to make a better guess.
|
| list_directory(self, path)
| Helper to produce a directory listing (absent index.html).
|
| Return value is either a file object, or None (indicating an
| error). In either case, the headers are sent, making the
| interface the same as for send_head().
|
| send_head(self)
| Common code for GET and HEAD commands.
|
| This sends the response code and MIME headers.
|
| Return value is either a file object (which has to be copied
| to the outputfile by the caller unless the command was HEAD,
| and must be closed by the caller under all circumstances), or
| None, in which case the caller has nothing further to do.
|
| translate_path(self, path)
| Translate a /-separated PATH to the local filename syntax.
|
| Components that mean special things to the local file system
| (e.g. drive or directory names) are ignored. (XXX They should
| probably be diagnosed.)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| extensions_map = {'.Z': 'application/octet-stream', '.bz2': 'applicati...
|
| index_pages = ('index.html', 'index.htm')
|
| server_version = 'SimpleHTTP/0.6'
|
| ----------------------------------------------------------------------
| Methods inherited from BaseHTTPRequestHandler:
|
| address_string(self)
| Return the client address.
|
| date_time_string(self, timestamp=None)
| Return the current date and time formatted for a message header.
|
| end_headers(self)
| Send the blank line ending the MIME headers.
|
| flush_headers(self)
|
| handle(self)
| Handle multiple requests if necessary.
|
| handle_expect_100(self)
| Decide what to do with an "Expect: 100-continue" header.
|
| If the client is expecting a 100 Continue response, we must
| respond with either a 100 Continue or a final response before
| waiting for the request body. The default is to always respond
| with a 100 Continue. You can behave differently (for example,
| reject unauthorized requests) by overriding this method.
|
| This method should either return True (possibly after sending
| a 100 Continue response) or send an error response and return
| False.
|
| handle_one_request(self)
| Handle a single HTTP request.
|
| You normally don't need to override this method; see the class
| __doc__ string for information on how to handle specific HTTP
| commands such as GET and POST.
|
| log_date_time_string(self)
| Return the current time formatted for logging.
|
| log_error(self, format, *args)
| Log an error.
|
| This is called when a request cannot be fulfilled. By
| default it passes the message on to log_message().
|
| Arguments are the same as for log_message().
|
| XXX This should go to the separate error log.
|
| log_message(self, format, *args)
| Log an arbitrary message.
|
| This is used by all other logging functions. Override
| it if you have specific logging wishes.
|
| The first argument, FORMAT, is a format string for the
| message to be logged. If the format string contains
| any % escapes requiring parameters, they should be
| specified as subsequent arguments (it's just like
| printf!).
|
| The client ip and current date/time are prefixed to
| every message.
|
| Unicode control characters are replaced with escaped hex
| before writing the output to stderr.
|
| log_request(self, code='-', size='-')
| Log an accepted request.
|
| This is called by send_response().
|
| parse_request(self)
| Parse a request (internal).
|
| The request should be stored in self.raw_requestline; the results
| are in self.command, self.path, self.request_version and
| self.headers.
|
| Return True for success, False for failure; on failure, any relevant
| error response has already been sent back.
|
| send_error(self, code, message=None, explain=None)
| Send and log an error reply.
|
| Arguments are
| * code: an HTTP error code
| 3 digits
| * message: a simple optional 1 line reason phrase.
| *( HTAB / SP / VCHAR / %x80-FF )
| defaults to short entry matching the response code
| * explain: a detailed message defaults to the long entry
| matching the response code.
|
| This sends an error response (so it must be called before any
| output has been generated), logs the error, and finally sends
| a piece of HTML explaining the error to the user.
|
| send_header(self, keyword, value)
| Send a MIME header to the headers buffer.
|
| send_response(self, code, message=None)
| Add the response header to the headers buffer and log the
| response code.
|
| Also send two standard headers with the server software
| version and the current date.
|
| send_response_only(self, code, message=None)
| Send the response header only.
|
| version_string(self)
| Return the server software version string.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from BaseHTTPRequestHandler:
|
| MessageClass = <class 'http.client.HTTPMessage'>
|
| default_request_version = 'HTTP/0.9'
|
| error_content_type = 'text/html;charset=utf-8'
|
| error_message_format = '<!DOCTYPE HTML>\n<html lang="en">\n <head>\...
|
| monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'A...
|
| protocol_version = 'HTTP/1.0'
|
| responses = {<HTTPStatus.CONTINUE: 100>: ('Continue', 'Request receive...
|
| sys_version = 'Python/3.12.6'
|
| weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
| ----------------------------------------------------------------------
| Methods inherited from socketserver.StreamRequestHandler:
|
| finish(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from socketserver.StreamRequestHandler:
|
| disable_nagle_algorithm = False
|
| rbufsize = -1
|
| timeout = None
|
| wbufsize = 0
|
| ----------------------------------------------------------------------
| Data descriptors inherited from socketserver.BaseRequestHandler:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
http.server.ThreadingHTTPServer
Python Library Documentation: class ThreadingHTTPServer in module http.server class ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer) | ThreadingHTTPServer(server_address, RequestHandlerClass, bind_and_activate=True) | | Method resolution order: | ThreadingHTTPServer | socketserver.ThreadingMixIn | HTTPServer | socketserver.TCPServer | socketserver.BaseServer | builtins.object | | Data and other attributes defined here: | | daemon_threads = True | | ---------------------------------------------------------------------- | Methods inherited from socketserver.ThreadingMixIn: | | process_request(self, request, client_address) | Start a new thread to process the request. | | process_request_thread(self, request, client_address) | Same as in BaseServer but as a thread. | | In addition, exception handling is done here. | | server_close(self) | | ---------------------------------------------------------------------- | Data descriptors inherited from socketserver.ThreadingMixIn: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Data and other attributes inherited from socketserver.ThreadingMixIn: | | block_on_close = True | | ---------------------------------------------------------------------- | Methods inherited from HTTPServer: | | server_bind(self) | Override server_bind to store the server name. | | ---------------------------------------------------------------------- | Data and other attributes inherited from HTTPServer: | | allow_reuse_address = 1 | | ---------------------------------------------------------------------- | Methods inherited from socketserver.TCPServer: | | __init__(self, server_address, RequestHandlerClass, bind_and_activate=True) | Constructor. May be extended, do not override. | | close_request(self, request) | Called to clean up an individual request. | | fileno(self) | Return socket file number. | | Interface required by selector. | | get_request(self) | Get the request and client address from the socket. | | May be overridden. | | server_activate(self) | Called by constructor to activate the server. | | May be overridden. | | shutdown_request(self, request) | Called to shutdown and close an individual request. | | ---------------------------------------------------------------------- | Data and other attributes inherited from socketserver.TCPServer: | | address_family = <AddressFamily.AF_INET: 2> | | allow_reuse_port = False | | request_queue_size = 5 | | socket_type = <SocketKind.SOCK_STREAM: 1> | | ---------------------------------------------------------------------- | Methods inherited from socketserver.BaseServer: | | __enter__(self) | | __exit__(self, *args) | | finish_request(self, request, client_address) | Finish one request by instantiating RequestHandlerClass. | | handle_error(self, request, client_address) | Handle an error gracefully. May be overridden. | | The default is to print a traceback and continue. | | handle_request(self) | Handle one request, possibly blocking. | | Respects self.timeout. | | handle_timeout(self) | Called if no new request arrives within self.timeout. | | Overridden by ForkingMixIn. | | serve_forever(self, poll_interval=0.5) | Handle one request at a time until shutdown. | | Polls for shutdown every poll_interval seconds. Ignores | self.timeout. If you need to do periodic tasks, do them in | another thread. | | service_actions(self) | Called by the serve_forever() loop. | | May be overridden by a subclass / Mixin to implement any code that | needs to be run during the loop. | | shutdown(self) | Stops the serve_forever loop. | | Blocks until the loop has finished. This must be called while | serve_forever() is running in another thread, or it will | deadlock. | | verify_request(self, request, client_address) | Verify the request. May be overridden. | | Return True if we should proceed with this request. | | ---------------------------------------------------------------------- | Data and other attributes inherited from socketserver.BaseServer: | | timeout = None
http.server.copy
Python Library Documentation: module copy
NAME
copy - Generic (shallow and deep) copying operations.
MODULE REFERENCE
https://docs.python.org/3.12/library/copy.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
Interface summary:
import copy
x = copy.copy(y) # make a shallow copy of y
x = copy.deepcopy(y) # make a deep copy of y
For module specific errors, copy.Error is raised.
The difference between shallow and deep copying is only relevant for
compound objects (objects that contain other objects, like lists or
class instances).
- A shallow copy constructs a new compound object and then (to the
extent possible) inserts *the same objects* into it that the
original contains.
- A deep copy constructs a new compound object and then, recursively,
inserts *copies* into it of the objects found in the original.
Two problems often exist with deep copy operations that don't exist
with shallow copy operations:
a) recursive objects (compound objects that, directly or indirectly,
contain a reference to themselves) may cause a recursive loop
b) because deep copy copies *everything* it may copy too much, e.g.
administrative data structures that should be shared even between
copies
Python's deep copy operation avoids these problems by:
a) keeping a table of objects already copied during the current
copying pass
b) letting user-defined classes override the copying operation or the
set of components copied
This version does not copy types like module, class, function, method,
nor stack trace, stack frame, nor file, socket, window, nor any
similar types.
Classes can use the same interfaces to control copying that they use
to control pickling: they can define methods called __getinitargs__(),
__getstate__() and __setstate__(). See the documentation for module
"pickle" for information on these methods.
CLASSES
builtins.Exception(builtins.BaseException)
Error
class Error(builtins.Exception)
| Method resolution order:
| Error
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
copy(x)
Shallow copy operation on arbitrary Python objects.
See the module's __doc__ string for more info.
deepcopy(x, memo=None, _nil=[])
Deep copy operation on arbitrary Python objects.
See the module's __doc__ string for more info.
DATA
__all__ = ['Error', 'copy', 'deepcopy']
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\copy.py
http.server.datetime
Python Library Documentation: module datetime
NAME
datetime - Fast implementation of the datetime type.
MODULE REFERENCE
https://docs.python.org/3.12/library/datetime.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
CLASSES
builtins.object
date
datetime
time
timedelta
tzinfo
timezone
class date(builtins.object)
| date(year, month, day) --> date object
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(...)
| Formats self with strftime.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __radd__(self, value, /)
| Return value+self.
|
| __reduce__(...)
| __reduce__() -> (cls, state)
|
| __repr__(self, /)
| Return repr(self).
|
| __rsub__(self, value, /)
| Return value-self.
|
| __str__(self, /)
| Return str(self).
|
| __sub__(self, value, /)
| Return self-value.
|
| ctime(...)
| Return ctime() style string.
|
| isocalendar(...)
| Return a named tuple containing ISO year, week number, and weekday.
|
| isoformat(...)
| Return string in ISO 8601 format, YYYY-MM-DD.
|
| isoweekday(...)
| Return the day of the week represented by the date.
| Monday == 1 ... Sunday == 7
|
| replace(...)
| Return date with new specified fields.
|
| strftime(...)
| format -> strftime() style string.
|
| timetuple(...)
| Return time tuple, compatible with time.localtime().
|
| toordinal(...)
| Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.
|
| weekday(...)
| Return the day of the week represented by the date.
| Monday == 0 ... Sunday == 6
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromisocalendar(...)
| int, int, int -> Construct a date from the ISO year, week number and weekday.
|
| This is the inverse of the date.isocalendar() function
|
| fromisoformat(...)
| str -> Construct a date from a string in ISO 8601 format.
|
| fromordinal(...)
| int -> date corresponding to a proleptic Gregorian ordinal.
|
| fromtimestamp(timestamp, /)
| Create a date from a POSIX timestamp.
|
| The timestamp is a number, e.g. created via time.time(), that is interpreted
| as local time.
|
| today(...)
| Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| day
|
| month
|
| year
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.date(9999, 12, 31)
|
| min = datetime.date(1, 1, 1)
|
| resolution = datetime.timedelta(days=1)
class datetime(date)
| datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])
|
| The year, month and day arguments are required. tzinfo may be None, or an
| instance of a tzinfo subclass. The remaining arguments may be ints.
|
| Method resolution order:
| datetime
| date
| builtins.object
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __radd__(self, value, /)
| Return value+self.
|
| __reduce__(...)
| __reduce__() -> (cls, state)
|
| __reduce_ex__(...)
| __reduce_ex__(proto) -> (cls, state)
|
| __repr__(self, /)
| Return repr(self).
|
| __rsub__(self, value, /)
| Return value-self.
|
| __str__(self, /)
| Return str(self).
|
| __sub__(self, value, /)
| Return self-value.
|
| astimezone(...)
| tz -> convert to local time in new timezone tz
|
| ctime(...)
| Return ctime() style string.
|
| date(...)
| Return date object with same year, month and day.
|
| dst(...)
| Return self.tzinfo.dst(self).
|
| isoformat(...)
| [sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].
| sep is used to separate the year from the time, and defaults to 'T'.
| The optional argument timespec specifies the number of additional terms
| of the time to include. Valid options are 'auto', 'hours', 'minutes',
| 'seconds', 'milliseconds' and 'microseconds'.
|
| replace(...)
| Return datetime with new specified fields.
|
| time(...)
| Return time object with same time but with tzinfo=None.
|
| timestamp(...)
| Return POSIX timestamp as float.
|
| timetuple(...)
| Return time tuple, compatible with time.localtime().
|
| timetz(...)
| Return time object with same time and tzinfo.
|
| tzname(...)
| Return self.tzinfo.tzname(self).
|
| utcoffset(...)
| Return self.tzinfo.utcoffset(self).
|
| utctimetuple(...)
| Return UTC time tuple, compatible with time.localtime().
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| combine(...)
| date, time -> datetime with same date and time fields
|
| fromisoformat(...)
| string -> datetime from a string in most ISO 8601 formats
|
| fromtimestamp(...)
| timestamp[, tz] -> tz's local time from POSIX timestamp.
|
| now(tz=None)
| Returns new datetime object representing current time local to tz.
|
| tz
| Timezone object.
|
| If no tz is specified, uses local timezone.
|
| strptime(...)
| string, format -> new datetime parsed from a string (like time.strptime()).
|
| utcfromtimestamp(...)
| Construct a naive UTC datetime from a POSIX timestamp.
|
| utcnow(...)
| Return a new datetime representing UTC day and time.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| fold
|
| hour
|
| microsecond
|
| minute
|
| second
|
| tzinfo
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)
|
| min = datetime.datetime(1, 1, 1, 0, 0)
|
| resolution = datetime.timedelta(microseconds=1)
|
| ----------------------------------------------------------------------
| Methods inherited from date:
|
| __format__(...)
| Formats self with strftime.
|
| isocalendar(...)
| Return a named tuple containing ISO year, week number, and weekday.
|
| isoweekday(...)
| Return the day of the week represented by the date.
| Monday == 1 ... Sunday == 7
|
| strftime(...)
| format -> strftime() style string.
|
| toordinal(...)
| Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.
|
| weekday(...)
| Return the day of the week represented by the date.
| Monday == 0 ... Sunday == 6
|
| ----------------------------------------------------------------------
| Class methods inherited from date:
|
| fromisocalendar(...)
| int, int, int -> Construct a date from the ISO year, week number and weekday.
|
| This is the inverse of the date.isocalendar() function
|
| fromordinal(...)
| int -> date corresponding to a proleptic Gregorian ordinal.
|
| today(...)
| Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from date:
|
| day
|
| month
|
| year
class time(builtins.object)
| time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time object
|
| All arguments are optional. tzinfo may be None, or an instance of
| a tzinfo subclass. The remaining arguments may be ints.
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(...)
| Formats self with strftime.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| __reduce__() -> (cls, state)
|
| __reduce_ex__(...)
| __reduce_ex__(proto) -> (cls, state)
|
| __repr__(self, /)
| Return repr(self).
|
| __str__(self, /)
| Return str(self).
|
| dst(...)
| Return self.tzinfo.dst(self).
|
| isoformat(...)
| Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].
|
| The optional argument timespec specifies the number of additional terms
| of the time to include. Valid options are 'auto', 'hours', 'minutes',
| 'seconds', 'milliseconds' and 'microseconds'.
|
| replace(...)
| Return time with new specified fields.
|
| strftime(...)
| format -> strftime() style string.
|
| tzname(...)
| Return self.tzinfo.tzname(self).
|
| utcoffset(...)
| Return self.tzinfo.utcoffset(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromisoformat(...)
| string -> time from a string in ISO 8601 format
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| fold
|
| hour
|
| microsecond
|
| minute
|
| second
|
| tzinfo
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.time(23, 59, 59, 999999)
|
| min = datetime.time(0, 0)
|
| resolution = datetime.timedelta(microseconds=1)
class timedelta(builtins.object)
| Difference between two datetime values.
|
| timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
|
| All arguments are optional and default to 0.
| Arguments may be integers or floats, and may be positive or negative.
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __reduce__(...)
| __reduce__() -> (cls, state)
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __str__(self, /)
| Return str(self).
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| total_seconds(...)
| Total seconds in the duration.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| days
| Number of days.
|
| microseconds
| Number of microseconds (>= 0 and less than 1 second).
|
| seconds
| Number of seconds (>= 0 and less than 1 day).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.timedelta(days=999999999, seconds=86399, microseconds=9...
|
| min = datetime.timedelta(days=-999999999)
|
| resolution = datetime.timedelta(microseconds=1)
class timezone(tzinfo)
| Fixed offset from UTC implementation of tzinfo.
|
| Method resolution order:
| timezone
| tzinfo
| builtins.object
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getinitargs__(...)
| pickle support
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __str__(self, /)
| Return str(self).
|
| dst(...)
| Return None.
|
| fromutc(...)
| datetime in UTC -> datetime in local time.
|
| tzname(...)
| If name is specified when timezone is created, returns the name. Otherwise returns offset as 'UTC(+|-)HH:MM'.
|
| utcoffset(...)
| Return fixed offset.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.timezone(datetime.timedelta(seconds=86340))
|
| min = datetime.timezone(datetime.timedelta(days=-1, seconds=60))
|
| utc = datetime.timezone.utc
|
| ----------------------------------------------------------------------
| Methods inherited from tzinfo:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| -> (cls, state)
class tzinfo(builtins.object)
| Abstract base class for time zone info objects.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| -> (cls, state)
|
| dst(...)
| datetime -> DST offset as timedelta positive east of UTC.
|
| fromutc(...)
| datetime in UTC -> datetime in local time.
|
| tzname(...)
| datetime -> string name of time zone.
|
| utcoffset(...)
| datetime -> timedelta showing offset from UTC, negative values indicating West of UTC
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
DATA
MAXYEAR = 9999
MINYEAR = 1
UTC = datetime.timezone.utc
__all__ = ('date', 'datetime', 'time', 'timedelta', 'timezone', 'tzinf...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\datetime.py
http.server.email
Python Library Documentation: package email
NAME
email - A package for parsing, handling, and generating email messages.
MODULE REFERENCE
https://docs.python.org/3.12/library/email.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
PACKAGE CONTENTS
_encoded_words
_header_value_parser
_parseaddr
_policybase
base64mime
charset
contentmanager
encoders
errors
feedparser
generator
header
headerregistry
iterators
message
mime (package)
parser
policy
quoprimime
utils
FUNCTIONS
message_from_binary_file(fp, *args, **kws)
Read a binary file and parse its contents into a Message object model.
Optional _class and strict are passed to the Parser constructor.
message_from_bytes(s, *args, **kws)
Parse a bytes string into a Message object model.
Optional _class and strict are passed to the Parser constructor.
message_from_file(fp, *args, **kws)
Read a file and parse its contents into a Message object model.
Optional _class and strict are passed to the Parser constructor.
message_from_string(s, *args, **kws)
Parse a string into a Message object model.
Optional _class and strict are passed to the Parser constructor.
DATA
__all__ = ['base64mime', 'charset', 'encoders', 'errors', 'feedparser'...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\email\__init__.py
http.server.executable
Python Library Documentation: function executable in module http.server
executable(path)
Test for executable file.
http.server.html
Python Library Documentation: package html
NAME
html - General functions for HTML manipulation.
MODULE REFERENCE
https://docs.python.org/3.12/library/html.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
PACKAGE CONTENTS
entities
parser
FUNCTIONS
escape(s, quote=True)
Replace special characters "&", "<" and ">" to HTML-safe sequences.
If the optional flag quote is true (the default), the quotation mark
characters, both double quote (") and single quote (') characters are also
translated.
unescape(s)
Convert all named and numeric character references (e.g. >, >,
&x3e;) in the string s to the corresponding unicode characters.
This function uses the rules defined by the HTML 5 standard
for both valid and invalid character references, and the list of
HTML 5 named character references defined in html.entities.html5.
DATA
__all__ = ['escape', 'unescape']
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\html\__init__.py
http.server.http
Python Library Documentation: package http
NAME
http
MODULE REFERENCE
https://docs.python.org/3.12/library/http.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
PACKAGE CONTENTS
client
cookiejar
cookies
server
CLASSES
enum.IntEnum(builtins.int, enum.ReprEnum)
HTTPStatus
enum.StrEnum(builtins.str, enum.ReprEnum)
HTTPMethod
class HTTPMethod(enum.StrEnum)
| HTTPMethod(*values)
|
| HTTP methods and descriptions
|
| Methods from the following RFCs are all observed:
|
| * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
| * RFC 5789: PATCH Method for HTTP
|
| Method resolution order:
| HTTPMethod
| enum.StrEnum
| builtins.str
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.str
| Return a formatted version of the string as described by format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self, /) from builtins.str
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CONNECT = <HTTPMethod.CONNECT>
|
| DELETE = <HTTPMethod.DELETE>
|
| GET = <HTTPMethod.GET>
|
| HEAD = <HTTPMethod.HEAD>
|
| OPTIONS = <HTTPMethod.OPTIONS>
|
| PATCH = <HTTPMethod.PATCH>
|
| POST = <HTTPMethod.POST>
|
| PUT = <HTTPMethod.PUT>
|
| TRACE = <HTTPMethod.TRACE>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class HTTPStatus(enum.IntEnum)
| HTTPStatus(*values)
|
| HTTP status codes and reason phrases
|
| Status codes from the following RFCs are all observed:
|
| * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
| * RFC 6585: Additional HTTP Status Codes
| * RFC 3229: Delta encoding in HTTP
| * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518
| * RFC 5842: Binding Extensions to WebDAV
| * RFC 7238: Permanent Redirect
| * RFC 2295: Transparent Content Negotiation in HTTP
| * RFC 2774: An HTTP Extension Framework
| * RFC 7725: An HTTP Status Code to Report Legal Obstacles
| * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2)
| * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
| * RFC 8297: An HTTP Status Code for Indicating Hints
| * RFC 8470: Using Early Data in HTTP
|
| Method resolution order:
| HTTPStatus
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ACCEPTED = <HTTPStatus.ACCEPTED: 202>
|
| ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208>
|
| BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502>
|
| BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400>
|
| CONFLICT = <HTTPStatus.CONFLICT: 409>
|
| CONTINUE = <HTTPStatus.CONTINUE: 100>
|
| CREATED = <HTTPStatus.CREATED: 201>
|
| EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103>
|
| EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417>
|
| FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424>
|
| FORBIDDEN = <HTTPStatus.FORBIDDEN: 403>
|
| FOUND = <HTTPStatus.FOUND: 302>
|
| GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504>
|
| GONE = <HTTPStatus.GONE: 410>
|
| HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5...
|
| IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418>
|
| IM_USED = <HTTPStatus.IM_USED: 226>
|
| INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507>
|
| INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500>
|
| LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411>
|
| LOCKED = <HTTPStatus.LOCKED: 423>
|
| LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508>
|
| METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405>
|
| MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421>
|
| MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301>
|
| MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300>
|
| MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207>
|
| NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R...
|
| NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT...
|
| NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406>
|
| NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510>
|
| NOT_FOUND = <HTTPStatus.NOT_FOUND: 404>
|
| NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501>
|
| NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304>
|
| NO_CONTENT = <HTTPStatus.NO_CONTENT: 204>
|
| OK = <HTTPStatus.OK: 200>
|
| PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206>
|
| PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402>
|
| PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308>
|
| PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412>
|
| PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428>
|
| PROCESSING = <HTTPStatus.PROCESSING: 102>
|
| PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI...
|
| REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI...
|
| REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413>
|
| REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO...
|
| REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408>
|
| REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414>
|
| RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205>
|
| SEE_OTHER = <HTTPStatus.SEE_OTHER: 303>
|
| SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503>
|
| SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101>
|
| TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307>
|
| TOO_EARLY = <HTTPStatus.TOO_EARLY: 425>
|
| TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429>
|
| UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401>
|
| UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS...
|
| UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422>
|
| UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415>
|
| UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426>
|
| USE_PROXY = <HTTPStatus.USE_PROXY: 305>
|
| VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
DATA
__all__ = ['HTTPStatus', 'HTTPMethod']
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\http\__init__.py
http.server.io
Python Library Documentation: module io
NAME
io
MODULE REFERENCE
https://docs.python.org/3.12/library/io.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
The io module provides the Python interfaces to stream handling. The
builtin open function is defined in this module.
At the top of the I/O hierarchy is the abstract base class IOBase. It
defines the basic interface to a stream. Note, however, that there is no
separation between reading and writing to streams; implementations are
allowed to raise an OSError if they do not support a given operation.
Extending IOBase is RawIOBase which deals simply with the reading and
writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide
an interface to OS files.
BufferedIOBase deals with buffering on a raw byte stream (RawIOBase). Its
subclasses, BufferedWriter, BufferedReader, and BufferedRWPair buffer
streams that are readable, writable, and both respectively.
BufferedRandom provides a buffered interface to random access
streams. BytesIO is a simple stream of in-memory bytes.
Another IOBase subclass, TextIOBase, deals with the encoding and decoding
of streams into text. TextIOWrapper, which extends it, is a buffered text
interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO
is an in-memory stream for text.
Argument names are not part of the specification, and only the arguments
of open() are intended to be used as keyword arguments.
data:
DEFAULT_BUFFER_SIZE
An int containing the default buffer size used by the module's buffered
I/O classes. open() uses the file's blksize (as obtained by os.stat) if
possible.
CLASSES
_io._BufferedIOBase(_io._IOBase)
_io.BufferedRWPair
_io.BufferedRandom
_io.BufferedReader
_io.BufferedWriter
_io.BytesIO
BufferedIOBase(_io._BufferedIOBase, IOBase)
_io._IOBase(builtins.object)
IOBase
BufferedIOBase(_io._BufferedIOBase, IOBase)
RawIOBase(_io._RawIOBase, IOBase)
TextIOBase(_io._TextIOBase, IOBase)
_io._RawIOBase(_io._IOBase)
_io.FileIO
RawIOBase(_io._RawIOBase, IOBase)
_io._TextIOBase(_io._IOBase)
_io.StringIO
_io.TextIOWrapper
TextIOBase(_io._TextIOBase, IOBase)
builtins.OSError(builtins.Exception)
builtins.BlockingIOError
UnsupportedOperation(builtins.OSError, builtins.ValueError)
builtins.ValueError(builtins.Exception)
UnsupportedOperation(builtins.OSError, builtins.ValueError)
builtins.object
_io.IncrementalNewlineDecoder
class BlockingIOError(OSError)
| I/O operation would block.
|
| Method resolution order:
| BlockingIOError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class BufferedIOBase(_io._BufferedIOBase, IOBase)
| Base class for buffered IO objects.
|
| The main difference with RawIOBase is that the read() method
| supports omitting the size argument, and does not have a default
| implementation that defers to readinto().
|
| In addition, read(), readinto() and write() may raise
| BlockingIOError if the underlying raw stream is in non-blocking
| mode and not ready; unlike their raw counterparts, they will never
| return None.
|
| A typical implementation should not inherit from a RawIOBase
| implementation, but wrap one.
|
| Method resolution order:
| BufferedIOBase
| _io._BufferedIOBase
| IOBase
| _io._IOBase
| builtins.object
|
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._BufferedIOBase:
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| read(self, size=-1, /)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(self, size=-1, /)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readinto(self, buffer, /)
|
| readinto1(self, buffer, /)
|
| write(self, b, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class BufferedRWPair(_BufferedIOBase)
| BufferedRWPair(reader, writer, buffer_size=8192, /)
|
| A buffered reader and writer object together.
|
| A buffered reader object and buffered writer object put together to
| form a sequential IO object that can read and write. This is typically
| used with a socket or two-way pipe.
|
| reader and writer are RawIOBase objects that are readable and
| writeable respectively. If the buffer_size is omitted it defaults to
| DEFAULT_BUFFER_SIZE.
|
| Method resolution order:
| BufferedRWPair
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| close(...)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| flush(...)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(...)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| peek(...)
|
| read(...)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(...)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readable(...)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readinto(...)
|
| readinto1(...)
|
| writable(...)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| write(...)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| ----------------------------------------------------------------------
| Methods inherited from _BufferedIOBase:
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class BufferedRandom(_BufferedIOBase)
| BufferedRandom(raw, buffer_size=8192)
|
| A buffered interface to random access streams.
|
| The constructor creates a reader and writer for a seekable stream,
| raw, given in the first argument. If the buffer_size is omitted it
| defaults to DEFAULT_BUFFER_SIZE.
|
| Method resolution order:
| BufferedRandom
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(self, /)
| Size of object in memory, in bytes.
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| peek(self, size=0, /)
|
| read(self, size=-1, /)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(self, size=-1, /)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readinto(self, buffer, /)
|
| readinto1(self, buffer, /)
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| seek(self, target, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, pos=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| write(self, buffer, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| mode
|
| name
|
| raw
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class BufferedReader(_BufferedIOBase)
| BufferedReader(raw, buffer_size=8192)
|
| Create a new buffered reader using the given readable raw IO object.
|
| Method resolution order:
| BufferedReader
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(self, /)
| Size of object in memory, in bytes.
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| peek(self, size=0, /)
|
| read(self, size=-1, /)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(self, size=-1, /)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readinto(self, buffer, /)
|
| readinto1(self, buffer, /)
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| seek(self, target, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, pos=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| mode
|
| name
|
| raw
|
| ----------------------------------------------------------------------
| Methods inherited from _BufferedIOBase:
|
| write(self, b, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class BufferedWriter(_BufferedIOBase)
| BufferedWriter(raw, buffer_size=8192)
|
| A buffer for a writeable sequential RawIO object.
|
| The constructor creates a BufferedWriter for the given writeable raw
| stream. If the buffer_size is not given, it defaults to
| DEFAULT_BUFFER_SIZE.
|
| Method resolution order:
| BufferedWriter
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(self, /)
| Size of object in memory, in bytes.
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| seek(self, target, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, pos=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| write(self, buffer, /)
| Write buffer b to the IO stream.
|
| Return the number of bytes written, which is always
| the length of b in bytes.
|
| Raise BlockingIOError if the buffer is full and the
| underlying raw stream cannot accept more data at the moment.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| mode
|
| name
|
| raw
|
| ----------------------------------------------------------------------
| Methods inherited from _BufferedIOBase:
|
| read(self, size=-1, /)
| Read and return up to n bytes.
|
| If the size argument is omitted, None, or negative, read and
| return all data until EOF.
|
| If the size argument is positive, and the underlying raw stream is
| not 'interactive', multiple raw reads may be issued to satisfy
| the byte count (unless EOF is reached first).
| However, for interactive raw streams (as well as sockets and pipes),
| at most one raw read will be issued, and a short result does not
| imply that EOF is imminent.
|
| Return an empty bytes object on EOF.
|
| Return None if the underlying raw stream was open in non-blocking
| mode and no data is available at the moment.
|
| read1(self, size=-1, /)
| Read and return up to size bytes, with at most one read() call to the underlying raw stream.
|
| Return an empty bytes object on EOF.
| A short result does not imply that EOF is imminent.
|
| readinto(self, buffer, /)
|
| readinto1(self, buffer, /)
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class BytesIO(_BufferedIOBase)
| BytesIO(initial_bytes=b'')
|
| Buffered I/O implementation using an in-memory bytes buffer.
|
| Method resolution order:
| BytesIO
| _BufferedIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __getstate__(...)
| Helper for pickle.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __setstate__(...)
|
| __sizeof__(...)
| Size of object in memory, in bytes.
|
| close(self, /)
| Disable all I/O operations.
|
| flush(self, /)
| Does nothing.
|
| getbuffer(self, /)
| Get a read-write view over the contents of the BytesIO object.
|
| getvalue(self, /)
| Retrieve the entire contents of the BytesIO object.
|
| isatty(self, /)
| Always returns False.
|
| BytesIO objects are not connected to a TTY-like device.
|
| read(self, size=-1, /)
| Read at most size bytes, returned as a bytes object.
|
| If the size argument is negative, read until EOF is reached.
| Return an empty bytes object at EOF.
|
| read1(self, size=-1, /)
| Read at most size bytes, returned as a bytes object.
|
| If the size argument is negative or omitted, read until EOF is reached.
| Return an empty bytes object at EOF.
|
| readable(self, /)
| Returns True if the IO object can be read.
|
| readinto(self, buffer, /)
| Read bytes into buffer.
|
| Returns number of bytes read (0 for EOF), or None if the object
| is set not to block and has no data to read.
|
| readline(self, size=-1, /)
| Next line from the file, as a bytes object.
|
| Retain newline. A non-negative size argument limits the maximum
| number of bytes to return (an incomplete line may be returned then).
| Return an empty bytes object at EOF.
|
| readlines(self, size=None, /)
| List of bytes objects, each a line from the file.
|
| Call readline() repeatedly and return a list of the lines so read.
| The optional size argument, if given, is an approximate bound on the
| total number of bytes in the lines returned.
|
| seek(self, pos, whence=0, /)
| Change stream position.
|
| Seek to byte offset pos relative to position indicated by whence:
| 0 Start of stream (the default). pos should be >= 0;
| 1 Current position - pos may be negative;
| 2 End of stream - pos usually negative.
| Returns the new absolute position.
|
| seekable(self, /)
| Returns True if the IO object can be seeked.
|
| tell(self, /)
| Current file position, an integer.
|
| truncate(self, size=None, /)
| Truncate the file to at most size bytes.
|
| Size defaults to the current file position, as returned by tell().
| The current file position is unchanged. Returns the new size.
|
| writable(self, /)
| Returns True if the IO object can be written.
|
| write(self, b, /)
| Write bytes to file.
|
| Return the number of bytes written.
|
| writelines(self, lines, /)
| Write lines to the file.
|
| Note that newlines are not added. lines can be any iterable object
| producing bytes-like objects. This is equivalent to calling write() for
| each element.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
| True if the file is closed.
|
| ----------------------------------------------------------------------
| Methods inherited from _BufferedIOBase:
|
| detach(self, /)
| Disconnect this buffer from its underlying raw stream and return it.
|
| After the raw stream has been detached, the buffer is in an unusable
| state.
|
| readinto1(self, buffer, /)
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class FileIO(_RawIOBase)
| FileIO(file, mode='r', closefd=True, opener=None)
|
| Open a file.
|
| The mode can be 'r' (default), 'w', 'x' or 'a' for reading,
| writing, exclusive creation or appending. The file will be created if it
| doesn't exist when opened for writing or appending; it will be truncated
| when opened for writing. A FileExistsError will be raised if it already
| exists when opened for creating. Opening a file for creating implies
| writing so this mode behaves in a similar way to 'w'.Add a '+' to the mode
| to allow simultaneous reading and writing. A custom opener can be used by
| passing a callable as *opener*. The underlying file descriptor for the file
| object is then obtained by calling opener with (*name*, *flags*).
| *opener* must return an open file descriptor (passing os.open as *opener*
| results in functionality similar to passing None).
|
| Method resolution order:
| FileIO
| _RawIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| close(self, /)
| Close the file.
|
| A closed file cannot be used for further I/O operations. close() may be
| called more than once without error.
|
| fileno(self, /)
| Return the underlying file descriptor (an integer).
|
| isatty(self, /)
| True if the file is connected to a TTY device.
|
| read(self, size=-1, /)
| Read at most size bytes, returned as bytes.
|
| Only makes one system call, so less data may be returned than requested.
| In non-blocking mode, returns None if no data is available.
| Return an empty bytes object at EOF.
|
| readable(self, /)
| True if file was opened in a read mode.
|
| readall(self, /)
| Read all data from the file, returned as bytes.
|
| In non-blocking mode, returns as much as is immediately available,
| or None if no data is available. Return an empty bytes object at EOF.
|
| readinto(self, buffer, /)
| Same as RawIOBase.readinto().
|
| seek(self, pos, whence=0, /)
| Move to new file position and return the file position.
|
| Argument offset is a byte count. Optional argument whence defaults to
| SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values
| are SEEK_CUR or 1 (move relative to current position, positive or negative),
| and SEEK_END or 2 (move relative to end of file, usually negative, although
| many platforms allow seeking beyond the end of a file).
|
| Note that not all file objects are seekable.
|
| seekable(self, /)
| True if file supports random-access.
|
| tell(self, /)
| Current file position.
|
| Can raise OSError for non seekable files.
|
| truncate(self, size=None, /)
| Truncate the file to at most size bytes and return the truncated size.
|
| Size defaults to the current file position, as returned by tell().
| The current file position is changed to the value of size.
|
| writable(self, /)
| True if file was opened in a write mode.
|
| write(self, b, /)
| Write buffer b to file, return number of bytes written.
|
| Only makes one system call, so not all of the data may be written.
| The number of bytes actually written is returned. In non-blocking mode,
| returns None if the write would block.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
| True if the file is closed
|
| closefd
| True if the file descriptor will be closed by close().
|
| mode
| String giving the file mode
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class IOBase(_io._IOBase)
| The abstract base class for all I/O classes.
|
| This class provides dummy implementations for many methods that
| derived classes can override selectively; the default implementations
| represent a file that cannot be read, written or seeked.
|
| Even though IOBase does not declare read, readinto, or write because
| their signatures will vary, implementations and clients should
| consider those methods part of the interface. Also, implementations
| may raise UnsupportedOperation when operations they do not support are
| called.
|
| The basic type used for binary data read from or written to a file is
| bytes. Other bytes-like objects are accepted as method arguments too.
| In some cases (such as readinto), a writable object is required. Text
| I/O classes work with str data.
|
| Note that calling any method (except additional calls to close(),
| which are ignored) on a closed stream should raise a ValueError.
|
| IOBase (and its subclasses) support the iterator protocol, meaning
| that an IOBase object can be iterated over yielding the lines in a
| stream.
|
| IOBase also supports the :keyword:`with` statement. In this example,
| fp is closed after the suite of the with statement is complete:
|
| with open('spam.txt', 'r') as fp:
| fp.write('Spam and eggs!')
|
| Method resolution order:
| IOBase
| _io._IOBase
| builtins.object
|
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class IncrementalNewlineDecoder(builtins.object)
| IncrementalNewlineDecoder(decoder, translate, errors='strict')
|
| Codec used when reading a file in universal newlines mode.
|
| It wraps another incremental decoder, translating \r\n and \r into \n.
| It also records the types of newlines encountered. When used with
| translate=False, it ensures that the newline sequence is returned in
| one piece. When used with decoder=None, it expects unicode strings as
| decode input and translates newlines without first invoking an external
| decoder.
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| decode(self, /, input, final=False)
|
| getstate(self, /)
|
| reset(self, /)
|
| setstate(self, state, /)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| newlines
class RawIOBase(_io._RawIOBase, IOBase)
| Base class for raw binary I/O.
|
| Method resolution order:
| RawIOBase
| _io._RawIOBase
| IOBase
| _io._IOBase
| builtins.object
|
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._RawIOBase:
|
| read(self, size=-1, /)
|
| readall(self, /)
| Read until EOF, using multiple read() call.
|
| readinto(...)
|
| write(...)
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read and return a line from the stream.
|
| If size is specified, at most size bytes will be read.
|
| The line terminator is always b'\n' for binary files; for text
| files, the newlines argument to open can be used to select the line
| terminator(s) recognized.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class StringIO(_TextIOBase)
| StringIO(initial_value='', newline='\n')
|
| Text I/O implementation using an in-memory buffer.
|
| The initial_value argument sets the value of object. The newline
| argument is like the one of TextIOWrapper's constructor.
|
| Method resolution order:
| StringIO
| _TextIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __getstate__(...)
| Helper for pickle.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __next__(self, /)
| Implement next(self).
|
| __setstate__(...)
|
| close(self, /)
| Close the IO object.
|
| Attempting any further operation after the object is closed
| will raise a ValueError.
|
| This method has no effect if the file is already closed.
|
| getvalue(self, /)
| Retrieve the entire contents of the object.
|
| read(self, size=-1, /)
| Read at most size characters, returned as a string.
|
| If the argument is negative or omitted, read until EOF
| is reached. Return an empty string at EOF.
|
| readable(self, /)
| Returns True if the IO object can be read.
|
| readline(self, size=-1, /)
| Read until newline or EOF.
|
| Returns an empty string if EOF is hit immediately.
|
| seek(self, pos, whence=0, /)
| Change stream position.
|
| Seek to character offset pos relative to position indicated by whence:
| 0 Start of stream (the default). pos should be >= 0;
| 1 Current position - pos must be 0;
| 2 End of stream - pos must be 0.
| Returns the new absolute position.
|
| seekable(self, /)
| Returns True if the IO object can be seeked.
|
| tell(self, /)
| Tell the current file position.
|
| truncate(self, pos=None, /)
| Truncate size to pos.
|
| The pos argument defaults to the current file position, as
| returned by tell(). The current file position is unchanged.
| Returns the new absolute position.
|
| writable(self, /)
| Returns True if the IO object can be written.
|
| write(self, s, /)
| Write string to file.
|
| Returns the number of characters written, which is always equal to
| the length of the string.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| closed
|
| line_buffering
|
| newlines
| Line endings translated so far.
|
| Only line endings translated during reading are considered.
|
| Subclasses should override.
|
| ----------------------------------------------------------------------
| Methods inherited from _TextIOBase:
|
| detach(self, /)
| Separate the underlying buffer from the TextIOBase and return it.
|
| After the underlying buffer has been detached, the TextIO is in an unusable state.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _TextIOBase:
|
| encoding
| Encoding of the text stream.
|
| Subclasses should override.
|
| errors
| The error setting of the decoder or encoder.
|
| Subclasses should override.
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class TextIOBase(_io._TextIOBase, IOBase)
| Base class for text I/O.
|
| This class provides a character and line based interface to stream
| I/O. There is no readinto method because Python's character strings
| are immutable.
|
| Method resolution order:
| TextIOBase
| _io._TextIOBase
| IOBase
| _io._IOBase
| builtins.object
|
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from _io._TextIOBase:
|
| detach(self, /)
| Separate the underlying buffer from the TextIOBase and return it.
|
| After the underlying buffer has been detached, the TextIO is in an unusable state.
|
| read(self, size=-1, /)
| Read at most size characters from stream.
|
| Read from underlying buffer until we have size characters or we hit EOF.
| If size is negative or omitted, read until EOF.
|
| readline(self, size=-1, /)
| Read until newline or EOF.
|
| Return an empty string if EOF is hit immediately.
| If size is specified, at most size characters will be read.
|
| write(self, s, /)
| Write string s to stream.
|
| Return the number of characters written
| (which is always equal to the length of the string).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._TextIOBase:
|
| encoding
| Encoding of the text stream.
|
| Subclasses should override.
|
| errors
| The error setting of the decoder or encoder.
|
| Subclasses should override.
|
| newlines
| Line endings translated so far.
|
| Only line endings translated during reading are considered.
|
| Subclasses should override.
|
| ----------------------------------------------------------------------
| Methods inherited from _io._IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| seek(self, offset, whence=0, /)
| Change the stream position to the given byte offset.
|
| offset
| The stream position, relative to 'whence'.
| whence
| The relative position to seek from.
|
| The offset is interpreted relative to the position indicated by whence.
| Values for whence are:
|
| * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive
| * os.SEEK_CUR or 1 -- current stream position; offset may be negative
| * os.SEEK_END or 2 -- end of stream; offset is usually negative
|
| Return the new absolute position.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return current stream position.
|
| truncate(self, size=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _io._IOBase:
|
| __dict__
|
| closed
class TextIOWrapper(_TextIOBase)
| TextIOWrapper(buffer, encoding=None, errors=None, newline=None, line_buffering=False, write_through=False)
|
| Character and line based layer over a BufferedIOBase object, buffer.
|
| encoding gives the name of the encoding that the stream will be
| decoded or encoded with. It defaults to locale.getencoding().
|
| errors determines the strictness of encoding and decoding (see
| help(codecs.Codec) or the documentation for codecs.register) and
| defaults to "strict".
|
| newline controls how line endings are handled. It can be None, '',
| '\n', '\r', and '\r\n'. It works as follows:
|
| * On input, if newline is None, universal newlines mode is
| enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
| these are translated into '\n' before being returned to the
| caller. If it is '', universal newline mode is enabled, but line
| endings are returned to the caller untranslated. If it has any of
| the other legal values, input lines are only terminated by the given
| string, and the line ending is returned to the caller untranslated.
|
| * On output, if newline is None, any '\n' characters written are
| translated to the system default line separator, os.linesep. If
| newline is '' or '\n', no translation takes place. If newline is any
| of the other legal values, any '\n' characters written are translated
| to the given string.
|
| If line_buffering is True, a call to flush is implied when a call to
| write contains a newline character.
|
| Method resolution order:
| TextIOWrapper
| _TextIOBase
| _IOBase
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Helper for pickle.
|
| __reduce_ex__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| close(self, /)
| Flush and close the IO object.
|
| This method has no effect if the file is already closed.
|
| detach(self, /)
| Separate the underlying buffer from the TextIOBase and return it.
|
| After the underlying buffer has been detached, the TextIO is in an unusable state.
|
| fileno(self, /)
| Return underlying file descriptor if one exists.
|
| Raise OSError if the IO object does not use a file descriptor.
|
| flush(self, /)
| Flush write buffers, if applicable.
|
| This is not implemented for read-only and non-blocking streams.
|
| isatty(self, /)
| Return whether this is an 'interactive' stream.
|
| Return False if it can't be determined.
|
| read(self, size=-1, /)
| Read at most size characters from stream.
|
| Read from underlying buffer until we have size characters or we hit EOF.
| If size is negative or omitted, read until EOF.
|
| readable(self, /)
| Return whether object was opened for reading.
|
| If False, read() will raise OSError.
|
| readline(self, size=-1, /)
| Read until newline or EOF.
|
| Return an empty string if EOF is hit immediately.
| If size is specified, at most size characters will be read.
|
| reconfigure(self, /, *, encoding=None, errors=None, newline=None, line_buffering=None, write_through=None)
| Reconfigure the text stream with new parameters.
|
| This also does an implicit stream flush.
|
| seek(self, cookie, whence=0, /)
| Set the stream position, and return the new stream position.
|
| cookie
| Zero or an opaque number returned by tell().
| whence
| The relative position to seek from.
|
| Four operations are supported, given by the following argument
| combinations:
|
| - seek(0, SEEK_SET): Rewind to the start of the stream.
| - seek(cookie, SEEK_SET): Restore a previous position;
| 'cookie' must be a number returned by tell().
| - seek(0, SEEK_END): Fast-forward to the end of the stream.
| - seek(0, SEEK_CUR): Leave the current stream position unchanged.
|
| Any other argument combinations are invalid,
| and may raise exceptions.
|
| seekable(self, /)
| Return whether object supports random access.
|
| If False, seek(), tell() and truncate() will raise OSError.
| This method may need to do a test seek().
|
| tell(self, /)
| Return the stream position as an opaque number.
|
| The return value of tell() can be given as input to seek(), to restore a
| previous stream position.
|
| truncate(self, pos=None, /)
| Truncate file to size bytes.
|
| File pointer is left unchanged. Size defaults to the current IO position
| as reported by tell(). Return the new size.
|
| writable(self, /)
| Return whether object was opened for writing.
|
| If False, write() will raise OSError.
|
| write(self, text, /)
| Write string s to stream.
|
| Return the number of characters written
| (which is always equal to the length of the string).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| buffer
|
| closed
|
| encoding
| Encoding of the text stream.
|
| Subclasses should override.
|
| errors
| The error setting of the decoder or encoder.
|
| Subclasses should override.
|
| line_buffering
|
| name
|
| newlines
| Line endings translated so far.
|
| Only line endings translated during reading are considered.
|
| Subclasses should override.
|
| write_through
|
| ----------------------------------------------------------------------
| Methods inherited from _IOBase:
|
| __del__(...)
|
| __enter__(...)
|
| __exit__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| readlines(self, hint=-1, /)
| Return a list of lines from the stream.
|
| hint can be specified to control the number of lines read: no more
| lines will be read if the total size (in bytes/characters) of all
| lines so far exceeds hint.
|
| writelines(self, lines, /)
| Write a list of lines to stream.
|
| Line separators are not added, so it is usual for each of the
| lines provided to have a line separator at the end.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _IOBase:
|
| __dict__
class UnsupportedOperation(builtins.OSError, builtins.ValueError)
| Method resolution order:
| UnsupportedOperation
| builtins.OSError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
Open file and return a stream. Raise OSError upon failure.
file is either a text or byte string giving the name (and the path
if the file isn't in the current working directory) of the file to
be opened or an integer file descriptor of the file to be
wrapped. (If a file descriptor is given, it is closed when the
returned I/O object is closed, unless closefd is set to False.)
mode is an optional string that specifies the mode in which the file
is opened. It defaults to 'r' which means open for reading in text
mode. Other common values are 'w' for writing (truncating the file if
it already exists), 'x' for creating and writing to a new file, and
'a' for appending (which on some Unix systems, means that all writes
append to the end of the file regardless of the current seek position).
In text mode, if encoding is not specified the encoding used is platform
dependent: locale.getencoding() is called to get the current locale encoding.
(For reading and writing raw bytes use binary mode and leave encoding
unspecified.) The available modes are:
========= ===============================================================
Character Meaning
--------- ---------------------------------------------------------------
'r' open for reading (default)
'w' open for writing, truncating the file first
'x' create a new file and open it for writing
'a' open for writing, appending to the end of the file if it exists
'b' binary mode
't' text mode (default)
'+' open a disk file for updating (reading and writing)
========= ===============================================================
The default mode is 'rt' (open for reading text). For binary random
access, the mode 'w+b' opens and truncates the file to 0 bytes, while
'r+b' opens the file without truncation. The 'x' mode implies 'w' and
raises an `FileExistsError` if the file already exists.
Python distinguishes between files opened in binary and text modes,
even when the underlying operating system doesn't. Files opened in
binary mode (appending 'b' to the mode argument) return contents as
bytes objects without any decoding. In text mode (the default, or when
't' is appended to the mode argument), the contents of the file are
returned as strings, the bytes having been first decoded using a
platform-dependent encoding or using the specified encoding if given.
buffering is an optional integer used to set the buffering policy.
Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
line buffering (only usable in text mode), and an integer > 1 to indicate
the size of a fixed-size chunk buffer. When no buffering argument is
given, the default buffering policy works as follows:
* Binary files are buffered in fixed-size chunks; the size of the buffer
is chosen using a heuristic trying to determine the underlying device's
"block size" and falling back on `io.DEFAULT_BUFFER_SIZE`.
On many systems, the buffer will typically be 4096 or 8192 bytes long.
* "Interactive" text files (files for which isatty() returns True)
use line buffering. Other text files use the policy described above
for binary files.
encoding is the name of the encoding used to decode or encode the
file. This should only be used in text mode. The default encoding is
platform dependent, but any encoding supported by Python can be
passed. See the codecs module for the list of supported encodings.
errors is an optional string that specifies how encoding errors are to
be handled---this argument should not be used in binary mode. Pass
'strict' to raise a ValueError exception if there is an encoding error
(the default of None has the same effect), or pass 'ignore' to ignore
errors. (Note that ignoring encoding errors can lead to data loss.)
See the documentation for codecs.register or run 'help(codecs.Codec)'
for a list of the permitted encoding error strings.
newline controls how universal newlines works (it only applies to text
mode). It can be None, '', '\n', '\r', and '\r\n'. It works as
follows:
* On input, if newline is None, universal newlines mode is
enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
these are translated into '\n' before being returned to the
caller. If it is '', universal newline mode is enabled, but line
endings are returned to the caller untranslated. If it has any of
the other legal values, input lines are only terminated by the given
string, and the line ending is returned to the caller untranslated.
* On output, if newline is None, any '\n' characters written are
translated to the system default line separator, os.linesep. If
newline is '' or '\n', no translation takes place. If newline is any
of the other legal values, any '\n' characters written are translated
to the given string.
If closefd is False, the underlying file descriptor will be kept open
when the file is closed. This does not work when a file name is given
and must be True in that case.
A custom opener can be used by passing a callable as *opener*. The
underlying file descriptor for the file object is then obtained by
calling *opener* with (*file*, *flags*). *opener* must return an open
file descriptor (passing os.open as *opener* results in functionality
similar to passing None).
open() returns a file object whose type depends on the mode, and
through which the standard file operations such as reading and writing
are performed. When open() is used to open a file in a text mode ('w',
'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open
a file in a binary mode, the returned class varies: in read binary
mode, it returns a BufferedReader; in write binary and append binary
modes, it returns a BufferedWriter, and in read/write mode, it returns
a BufferedRandom.
It is also possible to use a string or bytearray as a file for both
reading and writing. For strings StringIO can be used like a file
opened in a text mode, and for bytes a BytesIO can be used like a file
opened in a binary mode.
open_code(path)
Opens the provided file with the intent to import the contents.
This may perform extra validation beyond open(), but is otherwise interchangeable
with calling open(path, 'rb').
text_encoding(encoding, stacklevel=2, /)
A helper function to choose the text encoding.
When encoding is not None, this function returns it.
Otherwise, this function returns the default text encoding
(i.e. "locale" or "utf-8" depends on UTF-8 mode).
This function emits an EncodingWarning if encoding is None and
sys.flags.warn_default_encoding is true.
This can be used in APIs with an encoding=None parameter.
However, please consider using encoding="utf-8" for new APIs.
DATA
DEFAULT_BUFFER_SIZE = 8192
SEEK_CUR = 1
SEEK_END = 2
SEEK_SET = 0
__all__ = ['BlockingIOError', 'open', 'open_code', 'IOBase', 'RawIOBas...
AUTHOR
Guido van Rossum <guido@python.org>, Mike Verdone <mike.verdone@gmail.com>, Mark Russell <mark.russell@zen.co.uk>, Antoine Pitrou <solipsis@pitrou.net>, Amaury Forgeot d'Arc <amauryfa@gmail.com>, Benjamin Peterson <benjamin@python.org>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\io.py
http.server.itertools
Python Library Documentation: built-in module itertools
NAME
itertools - Functional tools for creating and using iterators.
DESCRIPTION
Infinite iterators:
count(start=0, step=1) --> start, start+step, start+2*step, ...
cycle(p) --> p0, p1, ... plast, p0, p1, ...
repeat(elem [,n]) --> elem, elem, elem, ... endlessly or up to n times
Iterators terminating on the shortest input sequence:
accumulate(p[, func]) --> p0, p0+p1, p0+p1+p2
batched(p, n) --> [p0, p1, ..., p_n-1], [p_n, p_n+1, ..., p_2n-1], ...
chain(p, q, ...) --> p0, p1, ... plast, q0, q1, ...
chain.from_iterable([p, q, ...]) --> p0, p1, ... plast, q0, q1, ...
compress(data, selectors) --> (d[0] if s[0]), (d[1] if s[1]), ...
dropwhile(predicate, seq) --> seq[n], seq[n+1], starting when predicate fails
groupby(iterable[, keyfunc]) --> sub-iterators grouped by value of keyfunc(v)
filterfalse(predicate, seq) --> elements of seq where predicate(elem) is False
islice(seq, [start,] stop [, step]) --> elements from
seq[start:stop:step]
pairwise(s) --> (s[0],s[1]), (s[1],s[2]), (s[2], s[3]), ...
starmap(fun, seq) --> fun(*seq[0]), fun(*seq[1]), ...
tee(it, n=2) --> (it1, it2 , ... itn) splits one iterator into n
takewhile(predicate, seq) --> seq[0], seq[1], until predicate fails
zip_longest(p, q, ...) --> (p[0], q[0]), (p[1], q[1]), ...
Combinatoric generators:
product(p, q, ... [repeat=1]) --> cartesian product
permutations(p[, r])
combinations(p, r)
combinations_with_replacement(p, r)
CLASSES
builtins.object
accumulate
batched
chain
combinations
combinations_with_replacement
compress
count
cycle
dropwhile
filterfalse
groupby
islice
pairwise
permutations
product
repeat
starmap
takewhile
zip_longest
class accumulate(builtins.object)
| accumulate(iterable, func=None, *, initial=None)
|
| Return series of accumulated sums (or other binary function results).
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class batched(builtins.object)
| batched(iterable, n)
|
| Batch data into tuples of length n. The last batch may be shorter than n.
|
| Loops over the input iterable and accumulates data into tuples
| up to size n. The input is consumed lazily, just enough to
| fill a batch. The result is yielded as soon as a batch is full
| or when the input iterable is exhausted.
|
| >>> for batch in batched('ABCDEFG', 3):
| ... print(batch)
| ...
| ('A', 'B', 'C')
| ('D', 'E', 'F')
| ('G',)
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class chain(builtins.object)
| chain(*iterables) --> chain object
|
| Return a chain object whose .__next__() method returns elements from the
| first iterable until it is exhausted, then elements from the next
| iterable, until all of the iterables are exhausted.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| from_iterable(iterable, /)
| Alternative chain() constructor taking a single iterable argument that evaluates lazily.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class combinations(builtins.object)
| combinations(iterable, r)
|
| Return successive r-length combinations of elements in the iterable.
|
| combinations(range(4), 3) --> (0,1,2), (0,1,3), (0,2,3), (1,2,3)
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| __sizeof__(...)
| Returns size in memory, in bytes.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class combinations_with_replacement(builtins.object)
| combinations_with_replacement(iterable, r)
|
| Return successive r-length combinations of elements in the iterable allowing individual elements to have successive repeats.
|
| combinations_with_replacement('ABC', 2) --> ('A','A'), ('A','B'), ('A','C'), ('B','B'), ('B','C'), ('C','C')
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| __sizeof__(...)
| Returns size in memory, in bytes.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class compress(builtins.object)
| compress(data, selectors)
|
| Return data elements corresponding to true selector elements.
|
| Forms a shorter iterator from selected data elements using the selectors to
| choose the data elements.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class count(builtins.object)
| count(start=0, step=1)
|
| Return a count object whose .__next__() method returns consecutive values.
|
| Equivalent to:
| def count(firstval=0, step=1):
| x = firstval
| while 1:
| yield x
| x += step
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class cycle(builtins.object)
| cycle(iterable, /)
|
| Return elements from the iterable until it is exhausted. Then repeat the sequence indefinitely.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class dropwhile(builtins.object)
| dropwhile(predicate, iterable, /)
|
| Drop items from the iterable while predicate(item) is true.
|
| Afterwards, return every element until the iterable is exhausted.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class filterfalse(builtins.object)
| filterfalse(function, iterable, /)
|
| Return those items of iterable for which function(item) is false.
|
| If function is None, return the items that are false.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class groupby(builtins.object)
| groupby(iterable, key=None)
|
| make an iterator that returns consecutive keys and groups from the iterable
|
| iterable
| Elements to divide into groups according to the key function.
| key
| A function for computing the group category for each element.
| If the key function is not specified or is None, the element itself
| is used for grouping.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class islice(builtins.object)
| islice(iterable, stop) --> islice object
| islice(iterable, start, stop[, step]) --> islice object
|
| Return an iterator whose next() method returns selected values from an
| iterable. If start is specified, will skip all preceding elements;
| otherwise, start defaults to zero. Step defaults to one. If
| specified as another value, step determines how many values are
| skipped between successive calls. Works like a slice() on a list
| but returns an iterator.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class pairwise(builtins.object)
| pairwise(iterable, /)
|
| Return an iterator of overlapping pairs taken from the input iterator.
|
| s -> (s0,s1), (s1,s2), (s2, s3), ...
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class permutations(builtins.object)
| permutations(iterable, r=None)
|
| Return successive r-length permutations of elements in the iterable.
|
| permutations(range(3), 2) --> (0,1), (0,2), (1,0), (1,2), (2,0), (2,1)
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| __sizeof__(...)
| Returns size in memory, in bytes.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class product(builtins.object)
| product(*iterables, repeat=1) --> product object
|
| Cartesian product of input iterables. Equivalent to nested for-loops.
|
| For example, product(A, B) returns the same as: ((x,y) for x in A for y in B).
| The leftmost iterators are in the outermost for-loop, so the output tuples
| cycle in a manner similar to an odometer (with the rightmost element changing
| on every iteration).
|
| To compute the product of an iterable with itself, specify the number
| of repetitions with the optional repeat keyword argument. For example,
| product(A, repeat=4) means the same as product(A, A, A, A).
|
| product('ab', range(3)) --> ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)
| product((0,1), (0,1), (0,1)) --> (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| __sizeof__(...)
| Returns size in memory, in bytes.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class repeat(builtins.object)
| repeat(object [,times]) -> create an iterator which returns the object
| for the specified number of times. If not specified, returns the object
| endlessly.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __length_hint__(...)
| Private method returning an estimate of len(list(it)).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class starmap(builtins.object)
| starmap(function, iterable, /)
|
| Return an iterator whose values are returned from the function evaluated with an argument tuple taken from the given sequence.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class takewhile(builtins.object)
| takewhile(predicate, iterable, /)
|
| Return successive entries from an iterable as long as the predicate evaluates to true for each entry.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class zip_longest(builtins.object)
| zip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --> zip_longest object
|
| Return a zip_longest object whose .__next__() method returns a tuple where
| the i-th element comes from the i-th iterable argument. The .__next__()
| method continues until the longest iterable in the argument sequence
| is exhausted and then it raises StopIteration. When the shorter iterables
| are exhausted, the fillvalue is substituted in their place. The fillvalue
| defaults to None or can be specified by a keyword argument.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
FUNCTIONS
tee(iterable, n=2, /)
Returns a tuple of n independent iterators.
FILE
(built-in)
http.server.mimetypes
Python Library Documentation: module mimetypes
NAME
mimetypes - Guess the MIME type of a file.
MODULE REFERENCE
https://docs.python.org/3.12/library/mimetypes.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module defines two useful functions:
guess_type(url, strict=True) -- guess the MIME type and encoding of a URL.
guess_extension(type, strict=True) -- guess the extension for a given MIME type.
It also contains the following, for tuning the behavior:
Data:
knownfiles -- list of files to parse
inited -- flag set when init() has been called
suffix_map -- dictionary mapping suffixes to suffixes
encodings_map -- dictionary mapping suffixes to encodings
types_map -- dictionary mapping suffixes to types
Functions:
init([files]) -- parse a list of files, default knownfiles (on Windows, the
default values are taken from the registry)
read_mime_types(file) -- parse one file, return a dictionary or None
CLASSES
builtins.object
MimeTypes
class MimeTypes(builtins.object)
| MimeTypes(filenames=(), strict=True)
|
| MIME-types datastore.
|
| This datastore can handle information from mime.types-style files
| and supports basic determination of MIME type from a filename or
| URL, and can guess a reasonable extension given a MIME type.
|
| Methods defined here:
|
| __init__(self, filenames=(), strict=True)
| Initialize self. See help(type(self)) for accurate signature.
|
| add_type(self, type, ext, strict=True)
| Add a mapping between a type and an extension.
|
| When the extension is already known, the new
| type will replace the old one. When the type
| is already known the extension will be added
| to the list of known extensions.
|
| If strict is true, information will be added to
| list of standard types, else to the list of non-standard
| types.
|
| guess_all_extensions(self, type, strict=True)
| Guess the extensions for a file based on its MIME type.
|
| Return value is a list of strings giving the possible filename
| extensions, including the leading dot ('.'). The extension is not
| guaranteed to have been associated with any particular data stream,
| but would be mapped to the MIME type `type' by guess_type().
|
| Optional `strict' argument when false adds a bunch of commonly found,
| but non-standard types.
|
| guess_extension(self, type, strict=True)
| Guess the extension for a file based on its MIME type.
|
| Return value is a string giving a filename extension,
| including the leading dot ('.'). The extension is not
| guaranteed to have been associated with any particular data
| stream, but would be mapped to the MIME type `type' by
| guess_type(). If no extension can be guessed for `type', None
| is returned.
|
| Optional `strict' argument when false adds a bunch of commonly found,
| but non-standard types.
|
| guess_type(self, url, strict=True)
| Guess the type of a file which is either a URL or a path-like object.
|
| Return value is a tuple (type, encoding) where type is None if
| the type can't be guessed (no or unknown suffix) or a string
| of the form type/subtype, usable for a MIME Content-type
| header; and encoding is None for no encoding or the name of
| the program used to encode (e.g. compress or gzip). The
| mappings are table driven. Encoding suffixes are case
| sensitive; type suffixes are first tried case sensitive, then
| case insensitive.
|
| The suffixes .tgz, .taz and .tz (case sensitive!) are all
| mapped to '.tar.gz'. (This is table-driven too, using the
| dictionary suffix_map.)
|
| Optional `strict' argument when False adds a bunch of commonly found,
| but non-standard types.
|
| read(self, filename, strict=True)
| Read a single mime.types-format file, specified by pathname.
|
| If strict is true, information will be added to
| list of standard types, else to the list of non-standard
| types.
|
| read_windows_registry(self, strict=True)
| Load the MIME types database from Windows registry.
|
| If strict is true, information will be added to
| list of standard types, else to the list of non-standard
| types.
|
| readfp(self, fp, strict=True)
| Read a single mime.types-format file.
|
| If strict is true, information will be added to
| list of standard types, else to the list of non-standard
| types.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
FUNCTIONS
add_type(type, ext, strict=True)
Add a mapping between a type and an extension.
When the extension is already known, the new
type will replace the old one. When the type
is already known the extension will be added
to the list of known extensions.
If strict is true, information will be added to
list of standard types, else to the list of non-standard
types.
guess_all_extensions(type, strict=True)
Guess the extensions for a file based on its MIME type.
Return value is a list of strings giving the possible filename
extensions, including the leading dot ('.'). The extension is not
guaranteed to have been associated with any particular data
stream, but would be mapped to the MIME type `type' by
guess_type(). If no extension can be guessed for `type', None
is returned.
Optional `strict' argument when false adds a bunch of commonly found,
but non-standard types.
guess_extension(type, strict=True)
Guess the extension for a file based on its MIME type.
Return value is a string giving a filename extension, including the
leading dot ('.'). The extension is not guaranteed to have been
associated with any particular data stream, but would be mapped to the
MIME type `type' by guess_type(). If no extension can be guessed for
`type', None is returned.
Optional `strict' argument when false adds a bunch of commonly found,
but non-standard types.
guess_type(url, strict=True)
Guess the type of a file based on its URL.
Return value is a tuple (type, encoding) where type is None if the
type can't be guessed (no or unknown suffix) or a string of the
form type/subtype, usable for a MIME Content-type header; and
encoding is None for no encoding or the name of the program used
to encode (e.g. compress or gzip). The mappings are table
driven. Encoding suffixes are case sensitive; type suffixes are
first tried case sensitive, then case insensitive.
The suffixes .tgz, .taz and .tz (case sensitive!) are all mapped
to ".tar.gz". (This is table-driven too, using the dictionary
suffix_map).
Optional `strict' argument when false adds a bunch of commonly found, but
non-standard types.
init(files=None)
read_mime_types(file)
DATA
__all__ = ['knownfiles', 'inited', 'MimeTypes', 'guess_type', 'guess_a...
common_types = {'.jpg': 'image/jpg', '.mid': 'audio/midi', '.midi': 'a...
encodings_map = {'.Z': 'compress', '.br': 'br', '.bz2': 'bzip2', '.gz'...
inited = False
knownfiles = ['/etc/mime.types', '/etc/httpd/mime.types', '/etc/httpd/...
suffix_map = {'.svgz': '.svg.gz', '.taz': '.tar.gz', '.tbz2': '.tar.bz...
types_map = {'.3g2': 'audio/3gpp2', '.3gp': 'audio/3gpp', '.3gpp': 'au...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\mimetypes.py
http.server.nobody
Python Library Documentation: NoneType object class NoneType(object) | Methods defined here: | | __bool__(self, /) | True if self else False | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature.
http.server.nobody_uid
Python Library Documentation: function nobody_uid in module http.server
nobody_uid()
Internal routine to get nobody's uid
http.server.os
Python Library Documentation: module os
NAME
os - OS routines for NT or Posix depending on what system we're on.
MODULE REFERENCE
https://docs.python.org/3.12/library/os.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This exports:
- all functions from posix or nt, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix' or 'nt'
- os.curdir is a string representing the current directory (always '.')
- os.pardir is a string representing the parent directory (always '..')
- os.sep is the (or a most common) pathname separator ('/' or '\\')
- os.extsep is the extension separator (always '.')
- os.altsep is the alternate pathname separator (None or '/')
- os.pathsep is the component separator used in $PATH etc
- os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
- os.defpath is the default search path for executables
- os.devnull is the file path of the null device ('/dev/null', etc.)
Programs that import and use 'os' stand a better chance of being
portable between different platforms. Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).
CLASSES
builtins.Exception(builtins.BaseException)
builtins.OSError
builtins.object
nt.DirEntry
builtins.tuple(builtins.object)
nt.times_result
nt.uname_result
stat_result
statvfs_result
terminal_size
class DirEntry(builtins.object)
| Methods defined here:
|
| __fspath__(self, /)
| Returns the path for the entry.
|
| __repr__(self, /)
| Return repr(self).
|
| inode(self, /)
| Return inode of the entry; cached per entry.
|
| is_dir(self, /, *, follow_symlinks=True)
| Return True if the entry is a directory; cached per entry.
|
| is_file(self, /, *, follow_symlinks=True)
| Return True if the entry is a file; cached per entry.
|
| is_junction(self, /)
| Return True if the entry is a junction; cached per entry.
|
| is_symlink(self, /)
| Return True if the entry is a symbolic link; cached per entry.
|
| stat(self, /, *, follow_symlinks=True)
| Return stat_result object for the entry; cached per entry.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| name
| the entry's base filename, relative to scandir() "path" argument
|
| path
| the entry's full path name; equivalent to os.path.join(scandir_path, entry.name)
error = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class stat_result(builtins.tuple)
| stat_result(iterable=(), /)
|
| stat_result: Result from stat, fstat, or lstat.
|
| This object may be accessed either as a tuple of
| (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)
| or via the attributes st_mode, st_ino, st_dev, st_nlink, st_uid, and so on.
|
| Posix/windows: If your platform supports st_blksize, st_blocks, st_rdev,
| or st_flags, they are available as attributes only.
|
| See os.stat for more information.
|
| Method resolution order:
| stat_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| st_atime
| time of last access
|
| st_atime_ns
| time of last access in nanoseconds
|
| st_birthtime
| time of creation
|
| st_birthtime_ns
| time of creation in nanoseconds
|
| st_ctime
| time of last change
|
| st_ctime_ns
| time of last change in nanoseconds
|
| st_dev
| device
|
| st_file_attributes
| Windows file attribute bits
|
| st_gid
| group ID of owner
|
| st_ino
| inode
|
| st_mode
| protection bits
|
| st_mtime
| time of last modification
|
| st_mtime_ns
| time of last modification in nanoseconds
|
| st_nlink
| number of hard links
|
| st_reparse_tag
| Windows reparse tag
|
| st_size
| total size, in bytes
|
| st_uid
| user ID of owner
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('st_mode', 'st_ino', 'st_dev', 'st_nlink', 'st_uid',...
|
| n_fields = 20
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 3
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class statvfs_result(builtins.tuple)
| statvfs_result(iterable=(), /)
|
| statvfs_result: Result from statvfs or fstatvfs.
|
| This object may be accessed either as a tuple of
| (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax),
| or via the attributes f_bsize, f_frsize, f_blocks, f_bfree, and so on.
|
| See os.statvfs for more information.
|
| Method resolution order:
| statvfs_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| f_bavail
|
| f_bfree
|
| f_blocks
|
| f_bsize
|
| f_favail
|
| f_ffree
|
| f_files
|
| f_flag
|
| f_frsize
|
| f_fsid
|
| f_namemax
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('f_bsize', 'f_frsize', 'f_blocks', 'f_bfree', 'f_bav...
|
| n_fields = 11
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class terminal_size(builtins.tuple)
| terminal_size(iterable=(), /)
|
| A tuple of (columns, lines) for holding terminal window size
|
| Method resolution order:
| terminal_size
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| columns
| width of the terminal window in characters
|
| lines
| height of the terminal window in characters
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('columns', 'lines')
|
| n_fields = 2
|
| n_sequence_fields = 2
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class times_result(builtins.tuple)
| times_result(iterable=(), /)
|
| times_result: Result from os.times().
|
| This object may be accessed either as a tuple of
| (user, system, children_user, children_system, elapsed),
| or via the attributes user, system, children_user, children_system,
| and elapsed.
|
| See os.times for more information.
|
| Method resolution order:
| times_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| children_system
| system time of children
|
| children_user
| user time of children
|
| elapsed
| elapsed time since an arbitrary point in the past
|
| system
| system time
|
| user
| user time
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('user', 'system', 'children_user', 'children_system'...
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class uname_result(builtins.tuple)
| uname_result(iterable=(), /)
|
| uname_result: Result from os.uname().
|
| This object may be accessed either as a tuple of
| (sysname, nodename, release, version, machine),
| or via the attributes sysname, nodename, release, version, and machine.
|
| See os.uname for more information.
|
| Method resolution order:
| uname_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| machine
| hardware identifier
|
| nodename
| name of machine on network (implementation-defined)
|
| release
| operating system release
|
| sysname
| operating system name
|
| version
| operating system version
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('sysname', 'nodename', 'release', 'version', 'machin...
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
FUNCTIONS
_exit(status)
Exit to the system with specified status, without normal exit processing.
abort()
Abort the interpreter immediately.
This function 'dumps core' or otherwise fails in the hardest way possible
on the hosting operating system. This function never returns.
access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)
Use the real uid/gid to test for access to a path.
path
Path to be tested; can be string, bytes, or a path-like object.
mode
Operating-system mode bitfield. Can be F_OK to test existence,
or the inclusive-OR of R_OK, W_OK, and X_OK.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
effective_ids
If True, access will use the effective uid/gid instead of
the real uid/gid.
follow_symlinks
If False, and the last element of the path is a symbolic link,
access will examine the symbolic link itself instead of the file
the link points to.
dir_fd, effective_ids, and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.
Note that most operations will use the effective uid/gid, therefore this
routine can be used in a suid/sgid environment to test if the invoking user
has the specified access to the path.
chdir(path)
Change the current working directory to the specified path.
path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
chmod(path, mode, *, dir_fd=None, follow_symlinks=True)
Change the access permissions of a file.
path
Path to be modified. May always be specified as a str, bytes, or a path-like object.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
mode
Operating-system mode bitfield.
Be careful when using number literals for *mode*. The conventional UNIX notation for
numeric modes uses an octal base, which needs to be indicated with a ``0o`` prefix in
Python.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
chmod will modify the symbolic link itself instead of the file
the link points to.
It is an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
dir_fd and follow_symlinks may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
close(fd)
Close a file descriptor.
closerange(fd_low, fd_high, /)
Closes all file descriptors in [fd_low, fd_high), ignoring errors.
cpu_count()
Return the number of CPUs in the system; return None if indeterminable.
This number is not equivalent to the number of CPUs the current process can
use. The number of usable CPUs can be obtained with
``len(os.sched_getaffinity(0))``
device_encoding(fd)
Return a string describing the encoding of a terminal's file descriptor.
The file descriptor must be attached to a terminal.
If the device is not a terminal, return None.
dup(fd, /)
Return a duplicate of a file descriptor.
dup2(fd, fd2, inheritable=True)
Duplicate file descriptor.
execl(file, *args)
execl(file, *args)
Execute the executable file with argument list args, replacing the
current process.
execle(file, *args)
execle(file, *args, env)
Execute the executable file with argument list args and
environment env, replacing the current process.
execlp(file, *args)
execlp(file, *args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
execlpe(file, *args)
execlpe(file, *args, env)
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the current
process.
execv(path, argv, /)
Execute an executable path with arguments, replacing current process.
path
Path of executable file.
argv
Tuple or list of strings.
execve(path, argv, env)
Execute an executable path with arguments, replacing current process.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.
execvp(file, args)
execvp(file, args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
args may be a list or tuple of strings.
execvpe(file, args, env)
execvpe(file, args, env)
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the
current process.
args may be a list or tuple of strings.
fdopen(fd, mode='r', buffering=-1, encoding=None, *args, **kwargs)
fsdecode(filename)
Decode filename (an os.PathLike, bytes, or str) from the filesystem
encoding with 'surrogateescape' error handler, return str unchanged. On
Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
fsencode(filename)
Encode filename (an os.PathLike, bytes, or str) to the filesystem
encoding with 'surrogateescape' error handler, return bytes unchanged.
On Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
fspath(path)
Return the file system path representation of the object.
If the object is str or bytes, then allow it to pass through as-is. If the
object defines __fspath__(), then return the result of that method. All other
types raise a TypeError.
fstat(fd)
Perform a stat system call on the given file descriptor.
Like stat(), but for an open file descriptor.
Equivalent to os.stat(fd).
fsync(fd)
Force write of fd to disk.
ftruncate(fd, length, /)
Truncate a file, specified by file descriptor, to a specific length.
get_blocking(fd, /)
Get the blocking mode of the file descriptor.
Return False if the O_NONBLOCK flag is set, True if the flag is cleared.
get_exec_path(env=None)
Returns the sequence of directories that will be searched for the
named executable (similar to a shell) when launching a process.
*env* must be an environment variable dict or None. If *env* is None,
os.environ will be used.
get_handle_inheritable(handle, /)
Get the close-on-exe flag of the specified file descriptor.
get_inheritable(fd, /)
Get the close-on-exe flag of the specified file descriptor.
get_terminal_size(...)
Return the size of the terminal window as (columns, lines).
The optional argument fd (default standard output) specifies
which file descriptor should be queried.
If the file descriptor is not connected to a terminal, an OSError
is thrown.
This function will only be defined if an implementation is
available for this system.
shutil.get_terminal_size is the high-level function which should
normally be used, os.get_terminal_size is the low-level implementation.
getcwd()
Return a unicode string representing the current working directory.
getcwdb()
Return a bytes string representing the current working directory.
getenv(key, default=None)
Get an environment variable, return None if it doesn't exist.
The optional second argument can specify an alternate default.
key, default and the result are str.
getlogin()
Return the actual login name.
getpid()
Return the current process id.
getppid()
Return the parent's process id.
If the parent process has already exited, Windows machines will still
return its id; others systems will return the id of the 'init' process (1).
isatty(fd, /)
Return True if the fd is connected to a terminal.
Return True if the file descriptor is an open file descriptor
connected to the slave end of a terminal.
kill(pid, signal, /)
Kill a process with a signal.
link(src, dst, *, src_dir_fd=None, dst_dir_fd=None, follow_symlinks=True)
Create a hard link to a file.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
If follow_symlinks is False, and the last element of src is a symbolic
link, link will create a link to the symbolic link itself instead of the
file the link points to.
src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your
platform. If they are unavailable, using them will raise a
NotImplementedError.
listdir(path=None)
Return a list containing the names of the files in the directory.
path can be specified as either str, bytes, or a path-like object. If path is bytes,
the filenames returned will also be bytes; in all other circumstances
the filenames returned will be str.
If path is None, uses the path='.'.
On some platforms, path may also be specified as an open file descriptor;\
the file descriptor must refer to a directory.
If this functionality is unavailable, using it raises NotImplementedError.
The list is in arbitrary order. It does not include the special
entries '.' and '..' even if they are present in the directory.
listdrives()
Return a list containing the names of drives in the system.
A drive name typically looks like 'C:\\'.
listmounts(volume)
Return a list containing mount points for a particular volume.
'volume' should be a GUID path as returned from os.listvolumes.
listvolumes()
Return a list containing the volumes in the system.
Volumes are typically represented as a GUID path.
lseek(fd, position, whence, /)
Set the position of a file descriptor. Return the new position.
fd
An open file descriptor, as returned by os.open().
position
Position, interpreted relative to 'whence'.
whence
The relative position to seek from. Valid values are:
- SEEK_SET: seek from the start of the file.
- SEEK_CUR: seek from the current file position.
- SEEK_END: seek from the end of the file.
The return value is the number of bytes relative to the beginning of the file.
lstat(path, *, dir_fd=None)
Perform a stat system call on the given path, without following symbolic links.
Like stat(), but do not follow symbolic links.
Equivalent to stat(path, follow_symlinks=False).
makedirs(name, mode=511, exist_ok=False)
makedirs(name [, mode=0o777][, exist_ok=False])
Super-mkdir; create a leaf directory and all intermediate ones. Works like
mkdir, except that any intermediate path segment (not just the rightmost)
will be created if it does not exist. If the target directory already
exists, raise an OSError if exist_ok is False. Otherwise no exception is
raised. This is recursive.
mkdir(path, mode=511, *, dir_fd=None)
Create a directory.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
The mode argument is ignored on Windows. Where it is used, the current umask
value is first masked out.
open(path, flags, mode=511, *, dir_fd=None)
Open a file for low level IO. Returns a file descriptor (integer).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
pipe()
Create a pipe.
Returns a tuple of two file descriptors:
(read_fd, write_fd)
popen(cmd, mode='r', buffering=-1)
putenv(name, value, /)
Change or add an environment variable.
read(fd, length, /)
Read from a file descriptor. Returns a bytes object.
readlink(path, *, dir_fd=None)
Return a string representing the path to which the symbolic link points.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform. If it is unavailable,
using it will raise a NotImplementedError.
remove(path, *, dir_fd=None)
Remove a file (same as unlink()).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
removedirs(name)
removedirs(name)
Super-rmdir; remove a leaf directory and all empty intermediate
ones. Works like rmdir except that, if the leaf directory is
successfully removed, directories corresponding to rightmost path
segments will be pruned away until either the whole path is
consumed or an error occurs. Errors during this latter phase are
ignored -- they generally mean that a directory was not empty.
rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
renames(old, new)
renames(old, new)
Super-rename; create directories as necessary and delete any left
empty. Works like rename, except creation of any intermediate
directories needed to make the new pathname good is attempted
first. After the rename, directories corresponding to rightmost
path segments of the old name will be pruned until either the
whole path is consumed or a nonempty directory is found.
Note: this function can fail with the new directory structure made
if you lack permissions needed to unlink the leaf directory or
file.
replace(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory, overwriting the destination.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
rmdir(path, *, dir_fd=None)
Remove a directory.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
scandir(path=None)
Return an iterator of DirEntry objects for given path.
path can be specified as either str, bytes, or a path-like object. If path
is bytes, the names of yielded DirEntry objects will also be bytes; in
all other circumstances they will be str.
If path is None, uses the path='.'.
set_blocking(fd, blocking, /)
Set the blocking mode of the specified file descriptor.
Set the O_NONBLOCK flag if blocking is False,
clear the O_NONBLOCK flag otherwise.
set_handle_inheritable(handle, inheritable, /)
Set the inheritable flag of the specified handle.
set_inheritable(fd, inheritable, /)
Set the inheritable flag of the specified file descriptor.
spawnl(mode, file, *args)
spawnl(mode, file, *args) -> integer
Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.
spawnle(mode, file, *args)
spawnle(mode, file, *args, env) -> integer
Execute file with arguments from args in a subprocess with the
supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.
spawnv(mode, path, argv, /)
Execute the program specified by path in a new process.
mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
spawnve(mode, path, argv, env, /)
Execute the program specified by path in a new process.
mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.
startfile(...)
Start a file with its associated application.
When "operation" is not specified or "open", this acts like
double-clicking the file in Explorer, or giving the file name as an
argument to the DOS "start" command: the file is opened with whatever
application (if any) its extension is associated.
When another "operation" is given, it specifies what should be done with
the file. A typical operation is "print".
"arguments" is passed to the application, but should be omitted if the
file is a document.
"cwd" is the working directory for the operation. If "filepath" is
relative, it will be resolved against this directory. This argument
should usually be an absolute path.
"show_cmd" can be used to override the recommended visibility option.
See the Windows ShellExecute documentation for values.
startfile returns as soon as the associated application is launched.
There is no option to wait for the application to close, and no way
to retrieve the application's exit status.
The filepath is relative to the current directory. If you want to use
an absolute path, make sure the first character is not a slash ("/");
the underlying Win32 ShellExecute function doesn't work if it is.
stat(path, *, dir_fd=None, follow_symlinks=True)
Perform a stat system call on the given path.
path
Path to be examined; can be string, bytes, a path-like object or
open-file-descriptor int.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be a relative string; path will then be relative to
that directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
stat will examine the symbolic link itself instead of the file
the link points to.
dir_fd and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.
It's an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
strerror(code, /)
Translate an error code to a message string.
symlink(src, dst, target_is_directory=False, *, dir_fd=None)
Create a symbolic link pointing to src named dst.
target_is_directory is required on Windows if the target is to be
interpreted as a directory. (On Windows, symlink requires
Windows 6.0 or greater, and raises a NotImplementedError otherwise.)
target_is_directory is ignored on non-Windows platforms.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
system(command)
Execute the command in a subshell.
times()
Return a collection containing process timing information.
The object returned behaves like a named tuple with these fields:
(utime, stime, cutime, cstime, elapsed_time)
All fields are floating-point numbers.
truncate(path, length)
Truncate a file, specified by path, to a specific length.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
umask(mask, /)
Set the current numeric umask and return the previous umask.
unlink(path, *, dir_fd=None)
Remove a file (same as remove()).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
unsetenv(name, /)
Delete an environment variable.
urandom(size, /)
Return a bytes object containing random bytes suitable for cryptographic use.
utime(...)
Set the access and modified time of path.
path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
If times is not None, it must be a tuple (atime, mtime);
atime and mtime should be expressed as float seconds since the epoch.
If ns is specified, it must be a tuple (atime_ns, mtime_ns);
atime_ns and mtime_ns should be expressed as integer nanoseconds
since the epoch.
If times is None and ns is unspecified, utime uses the current time.
Specifying tuples for both times and ns is an error.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
If follow_symlinks is False, and the last element of the path is a symbolic
link, utime will modify the symbolic link itself instead of the file the
link points to.
It is an error to use dir_fd or follow_symlinks when specifying path
as an open file descriptor.
dir_fd and follow_symlinks may not be available on your platform.
If they are unavailable, using them will raise a NotImplementedError.
waitpid(pid, options, /)
Wait for completion of a given process.
Returns a tuple of information regarding the process:
(pid, status << 8)
The options argument is ignored on Windows.
waitstatus_to_exitcode(status)
Convert a wait status to an exit code.
On Unix:
* If WIFEXITED(status) is true, return WEXITSTATUS(status).
* If WIFSIGNALED(status) is true, return -WTERMSIG(status).
* Otherwise, raise a ValueError.
On Windows, return status shifted right by 8 bits.
On Unix, if the process is being traced or if waitpid() was called with
WUNTRACED option, the caller must first check if WIFSTOPPED(status) is true.
This function must not be called if WIFSTOPPED(status) is true.
walk(top, topdown=True, onerror=None, followlinks=False)
Directory tree generator.
For each directory in the directory tree rooted at top (including top
itself, but excluding '.' and '..'), yields a 3-tuple
dirpath, dirnames, filenames
dirpath is a string, the path to the directory. dirnames is a list of
the names of the subdirectories in dirpath (including symlinks to directories,
and excluding '.' and '..').
filenames is a list of the names of the non-directory files in dirpath.
Note that the names in the lists are just names, with no path components.
To get a full path (which begins with top) to a file or directory in
dirpath, do os.path.join(dirpath, name).
If optional arg 'topdown' is true or not specified, the triple for a
directory is generated before the triples for any of its subdirectories
(directories are generated top down). If topdown is false, the triple
for a directory is generated after the triples for all of its
subdirectories (directories are generated bottom up).
When topdown is true, the caller can modify the dirnames list in-place
(e.g., via del or slice assignment), and walk will only recurse into the
subdirectories whose names remain in dirnames; this can be used to prune the
search, or to impose a specific order of visiting. Modifying dirnames when
topdown is false has no effect on the behavior of os.walk(), since the
directories in dirnames have already been generated by the time dirnames
itself is generated. No matter the value of topdown, the list of
subdirectories is retrieved before the tuples for the directory and its
subdirectories are generated.
By default errors from the os.scandir() call are ignored. If
optional arg 'onerror' is specified, it should be a function; it
will be called with one argument, an OSError instance. It can
report the error to continue with the walk, or raise the exception
to abort the walk. Note that the filename is available as the
filename attribute of the exception object.
By default, os.walk does not follow symbolic links to subdirectories on
systems that support them. In order to get this functionality, set the
optional argument 'followlinks' to true.
Caution: if you pass a relative pathname for top, don't change the
current working directory between resumptions of walk. walk never
changes the current directory, and assumes that the client doesn't
either.
Example:
import os
from os.path import join, getsize
for root, dirs, files in os.walk('python/Lib/email'):
print(root, "consumes ")
print(sum(getsize(join(root, name)) for name in files), end=" ")
print("bytes in", len(files), "non-directory files")
if 'CVS' in dirs:
dirs.remove('CVS') # don't visit CVS directories
write(fd, data, /)
Write a bytes object to a file descriptor.
DATA
EX_OK = 0
F_OK = 0
O_APPEND = 8
O_BINARY = 32768
O_CREAT = 256
O_EXCL = 1024
O_NOINHERIT = 128
O_RANDOM = 16
O_RDONLY = 0
O_RDWR = 2
O_SEQUENTIAL = 32
O_SHORT_LIVED = 4096
O_TEMPORARY = 64
O_TEXT = 16384
O_TRUNC = 512
O_WRONLY = 1
P_DETACH = 4
P_NOWAIT = 1
P_NOWAITO = 3
P_OVERLAY = 2
P_WAIT = 0
R_OK = 4
SEEK_CUR = 1
SEEK_END = 2
SEEK_SET = 0
TMP_MAX = 2147483647
W_OK = 2
X_OK = 1
__all__ = ['altsep', 'curdir', 'pardir', 'sep', 'pathsep', 'linesep', ...
altsep = '/'
curdir = '.'
defpath = r'.;C:\bin'
devnull = 'nul'
environ = environ({'ALLUSERSPROFILE': 'C:\\ProgramData', '...undled\\l...
extsep = '.'
linesep = '\r\n'
name = 'nt'
pardir = '..'
pathsep = ';'
sep = r'\'
supports_bytes_environ = False
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\os.py
http.server.posixpath
Python Library Documentation: module posixpath
NAME
posixpath - Common operations on Posix pathnames.
MODULE REFERENCE
https://docs.python.org/3.12/library/posixpath.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
Instead of importing this module directly, import os and refer to
this module as os.path. The "os.path" name is an alias for this
module on Posix systems; on other systems (e.g. Windows),
os.path provides the same operations in a manner specific to that
platform, and is an alias to another module (e.g. ntpath).
Some of this can actually be useful on non-Posix systems too, e.g.
for manipulation of the pathname component of URLs.
FUNCTIONS
abspath(path)
Return an absolute path.
basename(p)
Returns the final component of a pathname
commonpath(paths)
Given a sequence of path names, returns the longest common sub-path.
commonprefix(m)
Given a list of pathnames, returns the longest common leading component
dirname(p)
Returns the directory component of a pathname
exists(path)
Test whether a path exists. Returns False for broken symbolic links
expanduser(path)
Expand ~ and ~user constructions. If user or $HOME is unknown,
do nothing.
expandvars(path)
Expand shell variables of form $var and ${var}. Unknown variables
are left unchanged.
getatime(filename)
Return the last access time of a file, reported by os.stat().
getctime(filename)
Return the metadata change time of a file, reported by os.stat().
getmtime(filename)
Return the last modification time of a file, reported by os.stat().
getsize(filename)
Return the size of a file, reported by os.stat().
isabs(s)
Test whether a path is absolute
isdir(s)
Return true if the pathname refers to an existing directory.
isfile(path)
Test whether a path is a regular file
isjunction(path)
Test whether a path is a junction
Junctions are not a part of posix semantics
islink(path)
Test whether a path is a symbolic link
ismount(path)
Test whether a path is a mount point
join(a, *p)
Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded. An empty last part will result in a path that
ends with a separator.
lexists(path)
Test whether a path exists. Returns True for broken symbolic links
normcase(s)
Normalize case of pathname. Has no effect under Posix
normpath(path)
Normalize path, eliminating double slashes, etc.
realpath(filename, *, strict=False)
Return the canonical path of the specified filename, eliminating any
symbolic links encountered in the path.
relpath(path, start=None)
Return a relative version of a path
samefile(f1, f2)
Test whether two pathnames reference the same actual file or directory
This is determined by the device number and i-node number and
raises an exception if an os.stat() call on either pathname fails.
sameopenfile(fp1, fp2)
Test whether two open file objects reference the same file
samestat(s1, s2)
Test whether two stat buffers reference the same file
split(p)
Split a pathname. Returns tuple "(head, tail)" where "tail" is
everything after the final slash. Either part may be empty.
splitdrive(p)
Split a pathname into drive and path. On Posix, drive is always
empty.
splitext(p)
Split the extension from a pathname.
Extension is everything from the last dot to the end, ignoring
leading dots. Returns "(root, ext)"; ext may be empty.
splitroot(p)
Split a pathname into drive, root and tail. On Posix, drive is always
empty; the root may be empty, a single slash, or two slashes. The tail
contains anything after the root. For example:
splitroot('foo/bar') == ('', '', 'foo/bar')
splitroot('/foo/bar') == ('', '/', 'foo/bar')
splitroot('//foo/bar') == ('', '//', 'foo/bar')
splitroot('///foo/bar') == ('', '/', '//foo/bar')
DATA
__all__ = ['normcase', 'isabs', 'join', 'splitdrive', 'splitroot', 'sp...
altsep = None
curdir = '.'
defpath = '/bin:/usr/bin'
devnull = '/dev/null'
extsep = '.'
pardir = '..'
pathsep = ':'
sep = '/'
supports_unicode_filenames = False
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\posixpath.py
http.server.select
Python Library Documentation: module select
NAME
select - This module supports asynchronous I/O on multiple file descriptors.
DESCRIPTION
*** IMPORTANT NOTICE ***
On Windows, only sockets are supported; on Unix, all file descriptors.
FUNCTIONS
select(rlist, wlist, xlist, timeout=None, /)
Wait until one or more file descriptors are ready for some kind of I/O.
The first three arguments are iterables of file descriptors to be waited for:
rlist -- wait until ready for reading
wlist -- wait until ready for writing
xlist -- wait for an "exceptional condition"
If only one kind of condition is required, pass [] for the other lists.
A file descriptor is either a socket or file object, or a small integer
gotten from a fileno() method call on one of those.
The optional 4th argument specifies a timeout in seconds; it may be
a floating-point number to specify fractions of seconds. If it is absent
or None, the call will never time out.
The return value is a tuple of three lists corresponding to the first three
arguments; each contains the subset of the corresponding file descriptors
that are ready.
*** IMPORTANT NOTICE ***
On Windows, only sockets are supported; on Unix, all file
descriptors can be used.
FILE
c:\users\youse\appdata\local\programs\python\python312\dlls\select.pyd
http.server.shutil
Python Library Documentation: module shutil
NAME
shutil - Utility functions for copying and archiving files and directory trees.
MODULE REFERENCE
https://docs.python.org/3.12/library/shutil.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
XXX The functions here don't copy the resource fork or other metadata on Mac.
CLASSES
builtins.OSError(builtins.Exception)
Error
SameFileError
ExecError
SpecialFileError
class Error(builtins.OSError)
| Method resolution order:
| Error
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ExecError(builtins.OSError)
| Raised when a command could not be executed
|
| Method resolution order:
| ExecError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SameFileError(Error)
| Raised when source and destination are the same file.
|
| Method resolution order:
| SameFileError
| Error
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from Error:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SpecialFileError(builtins.OSError)
| Raised when trying to do a kind of operation (e.g. copying) which is
| not supported on a special file (e.g. a named pipe)
|
| Method resolution order:
| SpecialFileError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
chown(path, user=None, group=None)
Change owner user and group of the given path.
user and group can be the uid/gid or the user/group names, and in that case,
they are converted to their respective uid/gid.
copy(src, dst, *, follow_symlinks=True)
Copy data and mode bits ("cp src dst"). Return the file's destination.
The destination may be a directory.
If follow_symlinks is false, symlinks won't be followed. This
resembles GNU's "cp -P src dst".
If source and destination are the same file, a SameFileError will be
raised.
copy2(src, dst, *, follow_symlinks=True)
Copy data and metadata. Return the file's destination.
Metadata is copied with copystat(). Please see the copystat function
for more information.
The destination may be a directory.
If follow_symlinks is false, symlinks won't be followed. This
resembles GNU's "cp -P src dst".
copyfile(src, dst, *, follow_symlinks=True)
Copy data from src to dst in the most efficient way possible.
If follow_symlinks is not set and src is a symbolic link, a new
symlink will be created instead of copying the file it points to.
copyfileobj(fsrc, fdst, length=0)
copy data from file-like object fsrc to file-like object fdst
copymode(src, dst, *, follow_symlinks=True)
Copy mode bits from src to dst.
If follow_symlinks is not set, symlinks aren't followed if and only
if both `src` and `dst` are symlinks. If `lchmod` isn't available
(e.g. Linux) this method does nothing.
copystat(src, dst, *, follow_symlinks=True)
Copy file metadata
Copy the permission bits, last access time, last modification time, and
flags from `src` to `dst`. On Linux, copystat() also copies the "extended
attributes" where possible. The file contents, owner, and group are
unaffected. `src` and `dst` are path-like objects or path names given as
strings.
If the optional flag `follow_symlinks` is not set, symlinks aren't
followed if and only if both `src` and `dst` are symlinks.
copytree(src, dst, symlinks=False, ignore=None, copy_function=<function copy2 at 0x0000017B08AE3880>, ignore_dangling_symlinks=False, dirs_exist_ok=False)
Recursively copy a directory tree and return the destination directory.
If exception(s) occur, an Error is raised with a list of reasons.
If the optional symlinks flag is true, symbolic links in the
source tree result in symbolic links in the destination tree; if
it is false, the contents of the files pointed to by symbolic
links are copied. If the file pointed to by the symlink doesn't
exist, an exception will be added in the list of errors raised in
an Error exception at the end of the copy process.
You can set the optional ignore_dangling_symlinks flag to true if you
want to silence this exception. Notice that this has no effect on
platforms that don't support os.symlink.
The optional ignore argument is a callable. If given, it
is called with the `src` parameter, which is the directory
being visited by copytree(), and `names` which is the list of
`src` contents, as returned by os.listdir():
callable(src, names) -> ignored_names
Since copytree() is called recursively, the callable will be
called once for each directory that is copied. It returns a
list of names relative to the `src` directory that should
not be copied.
The optional copy_function argument is a callable that will be used
to copy each file. It will be called with the source path and the
destination path as arguments. By default, copy2() is used, but any
function that supports the same signature (like copy()) can be used.
If dirs_exist_ok is false (the default) and `dst` already exists, a
`FileExistsError` is raised. If `dirs_exist_ok` is true, the copying
operation will continue if it encounters existing directories, and files
within the `dst` tree will be overwritten by corresponding files from the
`src` tree.
disk_usage(path)
Return disk usage statistics about the given path.
Returned values is a named tuple with attributes 'total', 'used' and
'free', which are the amount of total, used and free space, in bytes.
get_archive_formats()
Returns a list of supported formats for archiving and unarchiving.
Each element of the returned sequence is a tuple (name, description)
get_terminal_size(fallback=(80, 24))
Get the size of the terminal window.
For each of the two dimensions, the environment variable, COLUMNS
and LINES respectively, is checked. If the variable is defined and
the value is a positive integer, it is used.
When COLUMNS or LINES is not defined, which is the common case,
the terminal connected to sys.__stdout__ is queried
by invoking os.get_terminal_size.
If the terminal size cannot be successfully queried, either because
the system doesn't support querying, or because we are not
connected to a terminal, the value given in fallback parameter
is used. Fallback defaults to (80, 24) which is the default
size used by many terminal emulators.
The value returned is a named tuple of type os.terminal_size.
get_unpack_formats()
Returns a list of supported formats for unpacking.
Each element of the returned sequence is a tuple
(name, extensions, description)
ignore_patterns(*patterns)
Function that can be used as copytree() ignore parameter.
Patterns is a sequence of glob-style patterns
that are used to exclude files
make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, dry_run=0, owner=None, group=None, logger=None)
Create an archive file (eg. zip or tar).
'base_name' is the name of the file to create, minus any format-specific
extension; 'format' is the archive format: one of "zip", "tar", "gztar",
"bztar", or "xztar". Or any other registered format.
'root_dir' is a directory that will be the root directory of the
archive; ie. we typically chdir into 'root_dir' before creating the
archive. 'base_dir' is the directory where we start archiving from;
ie. 'base_dir' will be the common prefix of all files and
directories in the archive. 'root_dir' and 'base_dir' both default
to the current directory. Returns the name of the archive file.
'owner' and 'group' are used when creating a tar archive. By default,
uses the current owner and group.
move(src, dst, copy_function=<function copy2 at 0x0000017B08AE3880>)
Recursively move a file or directory to another location. This is
similar to the Unix "mv" command. Return the file or directory's
destination.
If dst is an existing directory or a symlink to a directory, then src is
moved inside that directory. The destination path in that directory must
not already exist.
If dst already exists but is not a directory, it may be overwritten
depending on os.rename() semantics.
If the destination is on our current filesystem, then rename() is used.
Otherwise, src is copied to the destination and then removed. Symlinks are
recreated under the new name if os.rename() fails because of cross
filesystem renames.
The optional `copy_function` argument is a callable that will be used
to copy the source or it will be delegated to `copytree`.
By default, copy2() is used, but any function that supports the same
signature (like copy()) can be used.
A lot more could be done here... A look at a mv.c shows a lot of
the issues this implementation glosses over.
register_archive_format(name, function, extra_args=None, description='')
Registers an archive format.
name is the name of the format. function is the callable that will be
used to create archives. If provided, extra_args is a sequence of
(name, value) tuples that will be passed as arguments to the callable.
description can be provided to describe the format, and will be returned
by the get_archive_formats() function.
register_unpack_format(name, extensions, function, extra_args=None, description='')
Registers an unpack format.
`name` is the name of the format. `extensions` is a list of extensions
corresponding to the format.
`function` is the callable that will be
used to unpack archives. The callable will receive archives to unpack.
If it's unable to handle an archive, it needs to raise a ReadError
exception.
If provided, `extra_args` is a sequence of
(name, value) tuples that will be passed as arguments to the callable.
description can be provided to describe the format, and will be returned
by the get_unpack_formats() function.
rmtree(path, ignore_errors=False, onerror=None, *, onexc=None, dir_fd=None)
Recursively delete a directory tree.
If dir_fd is not None, it should be a file descriptor open to a directory;
path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
If ignore_errors is set, errors are ignored; otherwise, if onexc or
onerror is set, it is called to handle the error with arguments (func,
path, exc_info) where func is platform and implementation dependent;
path is the argument to that function that caused it to fail; and
the value of exc_info describes the exception. For onexc it is the
exception instance, and for onerror it is a tuple as returned by
sys.exc_info(). If ignore_errors is false and both onexc and
onerror are None, the exception is reraised.
onerror is deprecated and only remains for backwards compatibility.
If both onerror and onexc are set, onerror is ignored and onexc is used.
unpack_archive(filename, extract_dir=None, format=None, *, filter=None)
Unpack an archive.
`filename` is the name of the archive.
`extract_dir` is the name of the target directory, where the archive
is unpacked. If not provided, the current working directory is used.
`format` is the archive format: one of "zip", "tar", "gztar", "bztar",
or "xztar". Or any other registered format. If not provided,
unpack_archive will use the filename extension and see if an unpacker
was registered for that extension.
In case none is found, a ValueError is raised.
If `filter` is given, it is passed to the underlying
extraction function.
unregister_archive_format(name)
unregister_unpack_format(name)
Removes the pack format from the registry.
which(cmd, mode=1, path=None)
Given a command, mode, and a PATH string, return the path which
conforms to the given mode on the PATH, or None if there is no such
file.
`mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
of os.environ.get("PATH"), or can be overridden with a custom search
path.
DATA
__all__ = ['copyfileobj', 'copyfile', 'copymode', 'copystat', 'copy', ...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\shutil.py
http.server.socket
Python Library Documentation: module socket
NAME
socket
MODULE REFERENCE
https://docs.python.org/3.12/library/socket.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available as methods of the socket object.
Functions:
socket() -- create a new socket object
socketpair() -- create a pair of new socket objects [*]
fromfd() -- create a socket object from an open file descriptor [*]
send_fds() -- Send file descriptor to the socket.
recv_fds() -- Receive file descriptors from the socket.
fromshare() -- create a socket object from data received from socket.share() [*]
gethostname() -- return the current hostname
gethostbyname() -- map a hostname to its IP number
gethostbyaddr() -- map an IP number or hostname to DNS info
getservbyname() -- map a service name and a protocol name to a port number
getprotobyname() -- map a protocol name (e.g. 'tcp') to a number
ntohs(), ntohl() -- convert 16, 32 bit int from network to host byte order
htons(), htonl() -- convert 16, 32 bit int from host to network byte order
inet_aton() -- convert IP addr string (123.45.67.89) to 32-bit packed format
inet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89)
socket.getdefaulttimeout() -- get the default timeout value
socket.setdefaulttimeout() -- set the default timeout value
create_connection() -- connects to an address, with an optional timeout and
optional source address.
create_server() -- create a TCP socket and bind it to a specified address.
[*] not available on all platforms!
Special objects:
SocketType -- type object for socket objects
error -- exception raised for I/O errors
has_ipv6 -- boolean value indicating if IPv6 is supported
IntEnum constants:
AF_INET, AF_UNIX -- socket domains (first argument to socket() call)
SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument)
Integer constants:
Many other constants may be defined; these may be used in calls to
the setsockopt() and getsockopt() methods.
CLASSES
builtins.Exception(builtins.BaseException)
builtins.OSError
builtins.TimeoutError
gaierror
herror
builtins.object
_socket.socket
socket
enum.IntEnum(builtins.int, enum.ReprEnum)
AddressFamily
SocketKind
class AddressFamily(enum.IntEnum)
| AddressFamily(*values)
|
| An enumeration.
|
| Method resolution order:
| AddressFamily
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| AF_APPLETALK = <AddressFamily.AF_APPLETALK: 16>
|
| AF_BLUETOOTH = <AddressFamily.AF_BLUETOOTH: 32>
|
| AF_HYPERV = <AddressFamily.AF_HYPERV: 34>
|
| AF_INET = <AddressFamily.AF_INET: 2>
|
| AF_INET6 = <AddressFamily.AF_INET6: 23>
|
| AF_IPX = <AddressFamily.AF_IPX: 6>
|
| AF_IRDA = <AddressFamily.AF_IRDA: 26>
|
| AF_LINK = <AddressFamily.AF_LINK: 33>
|
| AF_SNA = <AddressFamily.AF_SNA: 11>
|
| AF_UNSPEC = <AddressFamily.AF_UNSPEC: 0>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class SocketKind(enum.IntEnum)
| SocketKind(*values)
|
| An enumeration.
|
| Method resolution order:
| SocketKind
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| SOCK_DGRAM = <SocketKind.SOCK_DGRAM: 2>
|
| SOCK_RAW = <SocketKind.SOCK_RAW: 3>
|
| SOCK_RDM = <SocketKind.SOCK_RDM: 4>
|
| SOCK_SEQPACKET = <SocketKind.SOCK_SEQPACKET: 5>
|
| SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
SocketType = class socket(builtins.object)
| socket(family=AF_INET, type=SOCK_STREAM, proto=0) -> socket object
| socket(family=-1, type=-1, proto=-1, fileno=None) -> socket object
|
| Open a socket of the given type. The family argument specifies the
| address family; it defaults to AF_INET. The type argument specifies
| whether this is a stream (SOCK_STREAM, this is the default)
| or datagram (SOCK_DGRAM) socket. The protocol argument defaults to 0,
| specifying the default protocol. Keyword arguments are accepted.
| The socket is created as non-inheritable.
|
| When a fileno is passed in, family, type and proto are auto-detected,
| unless they are explicitly set.
|
| A socket object represents one endpoint of a network connection.
|
| Methods of socket objects (keyword arguments not allowed):
|
| _accept() -- accept connection, returning new socket fd and client address
| bind(addr) -- bind the socket to a local address
| close() -- close the socket
| connect(addr) -- connect the socket to a remote address
| connect_ex(addr) -- connect, return an error code instead of an exception
| dup() -- return a new socket fd duplicated from fileno()
| fileno() -- return underlying file descriptor
| getpeername() -- return remote address [*]
| getsockname() -- return local address
| getsockopt(level, optname[, buflen]) -- get socket options
| gettimeout() -- return timeout or None
| listen([n]) -- start listening for incoming connections
| recv(buflen[, flags]) -- receive data
| recv_into(buffer[, nbytes[, flags]]) -- receive data (into a buffer)
| recvfrom(buflen[, flags]) -- receive data and sender's address
| recvfrom_into(buffer[, nbytes, [, flags])
| -- receive data and sender's address (into a buffer)
| sendall(data[, flags]) -- send all data
| send(data[, flags]) -- send data, may not send all of it
| sendto(data[, flags], addr) -- send data to a given address
| setblocking(bool) -- set or clear the blocking I/O flag
| getblocking() -- return True if socket is blocking, False if non-blocking
| setsockopt(level, optname, value[, optlen]) -- set socket options
| settimeout(None | float) -- set or clear the timeout
| shutdown(how) -- shut down traffic in one or both directions
|
| [*] not available on all platforms!
|
| Methods defined here:
|
| __del__(...)
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self, /)
| Return repr(self).
|
| bind(...)
| bind(address)
|
| Bind the socket to a local address. For IP sockets, the address is a
| pair (host, port); the host must refer to the local host. For raw packet
| sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])
|
| close(...)
| close()
|
| Close the socket. It cannot be used after this call.
|
| connect(...)
| connect(address)
|
| Connect the socket to a remote address. For IP sockets, the address
| is a pair (host, port).
|
| connect_ex(...)
| connect_ex(address) -> errno
|
| This is like connect(address), but returns an error code (the errno value)
| instead of raising an exception when an error occurs.
|
| detach(...)
| detach()
|
| Close the socket object without closing the underlying file descriptor.
| The object cannot be used after this call, but the file descriptor
| can be reused for other purposes. The file descriptor is returned.
|
| fileno(...)
| fileno() -> integer
|
| Return the integer file descriptor of the socket.
|
| getblocking(...)
| getblocking()
|
| Returns True if socket is in blocking mode, or False if it
| is in non-blocking mode.
|
| getpeername(...)
| getpeername() -> address info
|
| Return the address of the remote endpoint. For IP sockets, the address
| info is a pair (hostaddr, port).
|
| getsockname(...)
| getsockname() -> address info
|
| Return the address of the local endpoint. The format depends on the
| address family. For IPv4 sockets, the address info is a pair
| (hostaddr, port). For IPv6 sockets, the address info is a 4-tuple
| (hostaddr, port, flowinfo, scope_id).
|
| getsockopt(...)
| getsockopt(level, option[, buffersize]) -> value
|
| Get a socket option. See the Unix manual for level and option.
| If a nonzero buffersize argument is given, the return value is a
| string of that length; otherwise it is an integer.
|
| gettimeout(...)
| gettimeout() -> timeout
|
| Returns the timeout in seconds (float) associated with socket
| operations. A timeout of None indicates that timeouts on socket
| operations are disabled.
|
| ioctl(...)
| ioctl(cmd, option) -> long
|
| Control the socket with WSAIoctl syscall. Currently supported 'cmd' values are
| SIO_RCVALL: 'option' must be one of the socket.RCVALL_* constants.
| SIO_KEEPALIVE_VALS: 'option' is a tuple of (onoff, timeout, interval).
| SIO_LOOPBACK_FAST_PATH: 'option' is a boolean value, and is disabled by default
|
| listen(...)
| listen([backlog])
|
| Enable a server to accept connections. If backlog is specified, it must be
| at least 0 (if it is lower, it is set to 0); it specifies the number of
| unaccepted connections that the system will allow before refusing new
| connections. If not specified, a default reasonable value is chosen.
|
| recv(...)
| recv(buffersize[, flags]) -> data
|
| Receive up to buffersize bytes from the socket. For the optional flags
| argument, see the Unix manual. When no data is available, block until
| at least one byte is available or until the remote end is closed. When
| the remote end is closed and all data is read, return the empty string.
|
| recv_into(...)
| recv_into(buffer, [nbytes[, flags]]) -> nbytes_read
|
| A version of recv() that stores its data into a buffer rather than creating
| a new string. Receive up to buffersize bytes from the socket. If buffersize
| is not specified (or 0), receive up to the size available in the given buffer.
|
| See recv() for documentation about the flags.
|
| recvfrom(...)
| recvfrom(buffersize[, flags]) -> (data, address info)
|
| Like recv(buffersize, flags) but also return the sender's address info.
|
| recvfrom_into(...)
| recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info)
|
| Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.
|
| send(...)
| send(data[, flags]) -> count
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. Return the number of bytes
| sent; this may be less than len(data) if the network is busy.
|
| sendall(...)
| sendall(data[, flags])
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. This calls send() repeatedly
| until all data is sent. If an error occurs, it's impossible
| to tell how much data has been sent.
|
| sendto(...)
| sendto(data[, flags], address) -> count
|
| Like send(data, flags) but allows specifying the destination address.
| For IP sockets, the address is a pair (hostaddr, port).
|
| setblocking(...)
| setblocking(flag)
|
| Set the socket to blocking (flag is true) or non-blocking (false).
| setblocking(True) is equivalent to settimeout(None);
| setblocking(False) is equivalent to settimeout(0.0).
|
| setsockopt(...)
| setsockopt(level, option, value: int)
| setsockopt(level, option, value: buffer)
| setsockopt(level, option, None, optlen: int)
|
| Set a socket option. See the Unix manual for level and option.
| The value argument can either be an integer, a string buffer, or
| None, optlen.
|
| settimeout(...)
| settimeout(timeout)
|
| Set a timeout on socket operations. 'timeout' can be a float,
| giving in seconds, or None. Setting a timeout of None disables
| the timeout feature and is equivalent to setblocking(1).
| Setting a timeout of zero is the same as setblocking(0).
|
| share(...)
| share(process_id) -> bytes
|
| Share the socket with another process. The target process id
| must be provided and the resulting bytes object passed to the target
| process. There the shared socket can be instantiated by calling
| socket.fromshare().
|
| shutdown(...)
| shutdown(flag)
|
| Shut down the reading side of the socket (flag == SHUT_RD), the writing side
| of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| family
| the socket family
|
| proto
| the socket protocol
|
| timeout
| the socket timeout
|
| type
| the socket type
error = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class gaierror(builtins.OSError)
| Method resolution order:
| gaierror
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class herror(builtins.OSError)
| Method resolution order:
| herror
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class socket(_socket.socket)
| socket(family=-1, type=-1, proto=-1, fileno=None)
|
| A subclass of _socket.socket adding the makefile() method.
|
| Method resolution order:
| socket
| _socket.socket
| builtins.object
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| __getstate__(self)
| Helper for pickle.
|
| __init__(self, family=-1, type=-1, proto=-1, fileno=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Wrap __repr__() to reveal the real class name and socket
| address(es).
|
| accept(self)
| accept() -> (socket object, address info)
|
| Wait for an incoming connection. Return a new socket
| representing the connection, and the address of the client.
| For IP sockets, the address info is a pair (hostaddr, port).
|
| close(self)
| close()
|
| Close the socket. It cannot be used after this call.
|
| detach(self)
| detach() -> file descriptor
|
| Close the socket object without closing the underlying file descriptor.
| The object cannot be used after this call, but the file descriptor
| can be reused for other purposes. The file descriptor is returned.
|
| dup(self)
| dup() -> socket object
|
| Duplicate the socket. Return a new socket object connected to the same
| system resource. The new socket is non-inheritable.
|
| get_inheritable(self)
| Get the inheritable flag of the socket
|
| makefile(self, mode='r', buffering=None, *, encoding=None, errors=None, newline=None)
| makefile(...) -> an I/O stream connected to the socket
|
| The arguments are as for io.open() after the filename, except the only
| supported mode values are 'r' (default), 'w', 'b', or a combination of
| those.
|
| sendfile(self, file, offset=0, count=None)
| sendfile(file[, offset[, count]]) -> sent
|
| Send a file until EOF is reached by using high-performance
| os.sendfile() and return the total number of bytes which
| were sent.
| *file* must be a regular file object opened in binary mode.
| If os.sendfile() is not available (e.g. Windows) or file is
| not a regular file socket.send() will be used instead.
| *offset* tells from where to start reading the file.
| If specified, *count* is the total number of bytes to transmit
| as opposed to sending the file until EOF is reached.
| File position is updated on return or also in case of error in
| which case file.tell() can be used to figure out the number of
| bytes which were sent.
| The socket must be of SOCK_STREAM type.
| Non-blocking sockets are not supported.
|
| set_inheritable(self, inheritable)
| Set the inheritable flag of the socket
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| family
| Read-only access to the address family for this socket.
|
| type
| Read-only access to the socket type.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from _socket.socket:
|
| __del__(...)
|
| bind(...)
| bind(address)
|
| Bind the socket to a local address. For IP sockets, the address is a
| pair (host, port); the host must refer to the local host. For raw packet
| sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])
|
| connect(...)
| connect(address)
|
| Connect the socket to a remote address. For IP sockets, the address
| is a pair (host, port).
|
| connect_ex(...)
| connect_ex(address) -> errno
|
| This is like connect(address), but returns an error code (the errno value)
| instead of raising an exception when an error occurs.
|
| fileno(...)
| fileno() -> integer
|
| Return the integer file descriptor of the socket.
|
| getblocking(...)
| getblocking()
|
| Returns True if socket is in blocking mode, or False if it
| is in non-blocking mode.
|
| getpeername(...)
| getpeername() -> address info
|
| Return the address of the remote endpoint. For IP sockets, the address
| info is a pair (hostaddr, port).
|
| getsockname(...)
| getsockname() -> address info
|
| Return the address of the local endpoint. The format depends on the
| address family. For IPv4 sockets, the address info is a pair
| (hostaddr, port). For IPv6 sockets, the address info is a 4-tuple
| (hostaddr, port, flowinfo, scope_id).
|
| getsockopt(...)
| getsockopt(level, option[, buffersize]) -> value
|
| Get a socket option. See the Unix manual for level and option.
| If a nonzero buffersize argument is given, the return value is a
| string of that length; otherwise it is an integer.
|
| gettimeout(...)
| gettimeout() -> timeout
|
| Returns the timeout in seconds (float) associated with socket
| operations. A timeout of None indicates that timeouts on socket
| operations are disabled.
|
| ioctl(...)
| ioctl(cmd, option) -> long
|
| Control the socket with WSAIoctl syscall. Currently supported 'cmd' values are
| SIO_RCVALL: 'option' must be one of the socket.RCVALL_* constants.
| SIO_KEEPALIVE_VALS: 'option' is a tuple of (onoff, timeout, interval).
| SIO_LOOPBACK_FAST_PATH: 'option' is a boolean value, and is disabled by default
|
| listen(...)
| listen([backlog])
|
| Enable a server to accept connections. If backlog is specified, it must be
| at least 0 (if it is lower, it is set to 0); it specifies the number of
| unaccepted connections that the system will allow before refusing new
| connections. If not specified, a default reasonable value is chosen.
|
| recv(...)
| recv(buffersize[, flags]) -> data
|
| Receive up to buffersize bytes from the socket. For the optional flags
| argument, see the Unix manual. When no data is available, block until
| at least one byte is available or until the remote end is closed. When
| the remote end is closed and all data is read, return the empty string.
|
| recv_into(...)
| recv_into(buffer, [nbytes[, flags]]) -> nbytes_read
|
| A version of recv() that stores its data into a buffer rather than creating
| a new string. Receive up to buffersize bytes from the socket. If buffersize
| is not specified (or 0), receive up to the size available in the given buffer.
|
| See recv() for documentation about the flags.
|
| recvfrom(...)
| recvfrom(buffersize[, flags]) -> (data, address info)
|
| Like recv(buffersize, flags) but also return the sender's address info.
|
| recvfrom_into(...)
| recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info)
|
| Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.
|
| send(...)
| send(data[, flags]) -> count
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. Return the number of bytes
| sent; this may be less than len(data) if the network is busy.
|
| sendall(...)
| sendall(data[, flags])
|
| Send a data string to the socket. For the optional flags
| argument, see the Unix manual. This calls send() repeatedly
| until all data is sent. If an error occurs, it's impossible
| to tell how much data has been sent.
|
| sendto(...)
| sendto(data[, flags], address) -> count
|
| Like send(data, flags) but allows specifying the destination address.
| For IP sockets, the address is a pair (hostaddr, port).
|
| setblocking(...)
| setblocking(flag)
|
| Set the socket to blocking (flag is true) or non-blocking (false).
| setblocking(True) is equivalent to settimeout(None);
| setblocking(False) is equivalent to settimeout(0.0).
|
| setsockopt(...)
| setsockopt(level, option, value: int)
| setsockopt(level, option, value: buffer)
| setsockopt(level, option, None, optlen: int)
|
| Set a socket option. See the Unix manual for level and option.
| The value argument can either be an integer, a string buffer, or
| None, optlen.
|
| settimeout(...)
| settimeout(timeout)
|
| Set a timeout on socket operations. 'timeout' can be a float,
| giving in seconds, or None. Setting a timeout of None disables
| the timeout feature and is equivalent to setblocking(1).
| Setting a timeout of zero is the same as setblocking(0).
|
| share(...)
| share(process_id) -> bytes
|
| Share the socket with another process. The target process id
| must be provided and the resulting bytes object passed to the target
| process. There the shared socket can be instantiated by calling
| socket.fromshare().
|
| shutdown(...)
| shutdown(flag)
|
| Shut down the reading side of the socket (flag == SHUT_RD), the writing side
| of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).
|
| ----------------------------------------------------------------------
| Static methods inherited from _socket.socket:
|
| __new__(*args, **kwargs) class method of _socket.socket
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from _socket.socket:
|
| proto
| the socket protocol
|
| timeout
| the socket timeout
timeout = class TimeoutError(OSError)
| Timeout expired.
|
| Method resolution order:
| TimeoutError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of builtins.OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
close(...)
close(integer) -> None
Close an integer socket file descriptor. This is like os.close(), but for
sockets; on some platforms os.close() won't work for socket file descriptors.
create_connection(address, timeout=<object object at 0x0000017B07D78B30>, source_address=None, *, all_errors=False)
Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
A host of '' or port 0 tells the OS to use the default. When a connection
cannot be created, raises the last error if *all_errors* is False,
and an ExceptionGroup of all errors if *all_errors* is True.
create_server(address, *, family=<AddressFamily.AF_INET: 2>, backlog=None, reuse_port=False, dualstack_ipv6=False)
Convenience function which creates a SOCK_STREAM type socket
bound to *address* (a 2-tuple (host, port)) and return the socket
object.
*family* should be either AF_INET or AF_INET6.
*backlog* is the queue size passed to socket.listen().
*reuse_port* dictates whether to use the SO_REUSEPORT socket option.
*dualstack_ipv6*: if true and the platform supports it, it will
create an AF_INET6 socket able to accept both IPv4 or IPv6
connections. When false it will explicitly disable this option on
platforms that enable it by default (e.g. Linux).
>>> with create_server(('', 8000)) as server:
... while True:
... conn, addr = server.accept()
... # handle new connection
dup(...)
dup(integer) -> integer
Duplicate an integer socket file descriptor. This is like os.dup(), but for
sockets; on some platforms os.dup() won't work for socket file descriptors.
fromfd(fd, family, type, proto=0)
fromfd(fd, family, type[, proto]) -> socket object
Create a socket object from a duplicate of the given file
descriptor. The remaining arguments are the same as for socket().
fromshare(info)
fromshare(info) -> socket object
Create a socket object from the bytes object returned by
socket.share(pid).
getaddrinfo(host, port, family=0, type=0, proto=0, flags=0)
Resolve host and port into list of address info entries.
Translate the host/port argument into a sequence of 5-tuples that contain
all the necessary arguments for creating a socket connected to that service.
host is a domain name, a string representation of an IPv4/v6 address or
None. port is a string service name such as 'http', a numeric port number or
None. By passing None as the value of host and port, you can pass NULL to
the underlying C API.
The family, type and proto arguments can be optionally specified in order to
narrow the list of addresses returned. Passing zero as a value for each of
these arguments selects the full range of results.
getdefaulttimeout(...)
getdefaulttimeout() -> timeout
Returns the default timeout in seconds (float) for new socket objects.
A value of None indicates that new socket objects have no timeout.
When the socket module is first imported, the default is None.
getfqdn(name='')
Get fully qualified domain name from name.
An empty argument is interpreted as meaning the local host.
First the hostname returned by gethostbyaddr() is checked, then
possibly existing aliases. In case no FQDN is available and `name`
was given, it is returned unchanged. If `name` was empty, '0.0.0.0' or '::',
hostname from gethostname() is returned.
gethostbyaddr(...)
gethostbyaddr(host) -> (name, aliaslist, addresslist)
Return the true host name, a list of aliases, and a list of IP addresses,
for a host. The host argument is a string giving a host name or IP number.
gethostbyname(...)
gethostbyname(host) -> address
Return the IP address (a string of the form '255.255.255.255') for a host.
gethostbyname_ex(...)
gethostbyname_ex(host) -> (name, aliaslist, addresslist)
Return the true host name, a list of aliases, and a list of IP addresses,
for a host. The host argument is a string giving a host name or IP number.
gethostname(...)
gethostname() -> string
Return the current host name.
getnameinfo(...)
getnameinfo(sockaddr, flags) --> (host, port)
Get host and port for a sockaddr.
getprotobyname(...)
getprotobyname(name) -> integer
Return the protocol number for the named protocol. (Rarely used.)
getservbyname(...)
getservbyname(servicename[, protocolname]) -> integer
Return a port number from a service name and protocol name.
The optional protocol name, if given, should be 'tcp' or 'udp',
otherwise any protocol will match.
getservbyport(...)
getservbyport(port[, protocolname]) -> string
Return the service name from a port number and protocol name.
The optional protocol name, if given, should be 'tcp' or 'udp',
otherwise any protocol will match.
has_dualstack_ipv6()
Return True if the platform supports creating a SOCK_STREAM socket
which can handle both AF_INET and AF_INET6 (IPv4 / IPv6) connections.
htonl(...)
htonl(integer) -> integer
Convert a 32-bit integer from host to network byte order.
htons(...)
htons(integer) -> integer
Convert a 16-bit unsigned integer from host to network byte order.
if_indextoname(...)
if_indextoname(if_index)
Returns the interface name corresponding to the interface index if_index.
if_nameindex(...)
if_nameindex()
Returns a list of network interface information (index, name) tuples.
if_nametoindex(...)
if_nametoindex(if_name)
Returns the interface index corresponding to the interface name if_name.
inet_aton(...)
inet_aton(string) -> bytes giving packed 32-bit IP representation
Convert an IP address in string format (123.45.67.89) to the 32-bit packed
binary format used in low-level network functions.
inet_ntoa(...)
inet_ntoa(packed_ip) -> ip_address_string
Convert an IP address from 32-bit packed binary format to string format
inet_ntop(...)
inet_ntop(af, packed_ip) -> string formatted IP address
Convert a packed IP address of the given family to string format.
inet_pton(...)
inet_pton(af, ip) -> packed IP address string
Convert an IP address from string format to a packed string suitable
for use with low-level network functions.
ntohl(...)
ntohl(integer) -> integer
Convert a 32-bit integer from network to host byte order.
ntohs(...)
ntohs(integer) -> integer
Convert a 16-bit unsigned integer from network to host byte order.
setdefaulttimeout(...)
setdefaulttimeout(timeout)
Set the default timeout in seconds (float) for new socket objects.
A value of None indicates that new socket objects have no timeout.
When the socket module is first imported, the default is None.
socketpair = _fallback_socketpair(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=0)
socketpair([family[, type[, proto]]]) -> (socket object, socket object)
Create a pair of socket objects from the sockets returned by the platform
socketpair() function.
The arguments are the same as for socket() except the default family is AF_UNIX
if defined on the platform; otherwise, the default is AF_INET.
DATA
AF_APPLETALK = <AddressFamily.AF_APPLETALK: 16>
AF_BLUETOOTH = <AddressFamily.AF_BLUETOOTH: 32>
AF_DECnet = 12
AF_HYPERV = <AddressFamily.AF_HYPERV: 34>
AF_INET = <AddressFamily.AF_INET: 2>
AF_INET6 = <AddressFamily.AF_INET6: 23>
AF_IPX = <AddressFamily.AF_IPX: 6>
AF_IRDA = <AddressFamily.AF_IRDA: 26>
AF_LINK = <AddressFamily.AF_LINK: 33>
AF_SNA = <AddressFamily.AF_SNA: 11>
AF_UNSPEC = <AddressFamily.AF_UNSPEC: 0>
AI_ADDRCONFIG = <AddressInfo.AI_ADDRCONFIG: 1024>
AI_ALL = <AddressInfo.AI_ALL: 256>
AI_CANONNAME = <AddressInfo.AI_CANONNAME: 2>
AI_NUMERICHOST = <AddressInfo.AI_NUMERICHOST: 4>
AI_NUMERICSERV = <AddressInfo.AI_NUMERICSERV: 8>
AI_PASSIVE = <AddressInfo.AI_PASSIVE: 1>
AI_V4MAPPED = <AddressInfo.AI_V4MAPPED: 2048>
BDADDR_ANY = '00:00:00:00:00:00'
BDADDR_LOCAL = '00:00:00:FF:FF:FF'
BTPROTO_RFCOMM = 3
CAPI = <capsule object "_socket.CAPI">
EAI_AGAIN = 11002
EAI_BADFLAGS = 10022
EAI_FAIL = 11003
EAI_FAMILY = 10047
EAI_MEMORY = 8
EAI_NODATA = 11001
EAI_NONAME = 11001
EAI_SERVICE = 10109
EAI_SOCKTYPE = 10044
HVSOCKET_ADDRESS_FLAG_PASSTHRU = 1
HVSOCKET_CONNECTED_SUSPEND = 4
HVSOCKET_CONNECT_TIMEOUT = 1
HVSOCKET_CONNECT_TIMEOUT_MAX = 300000
HV_GUID_BROADCAST = 'FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF'
HV_GUID_CHILDREN = '90DB8B89-0D35-4F79-8CE9-49EA0AC8B7CD'
HV_GUID_LOOPBACK = 'E0E16197-DD56-4A10-9195-5EE7A155A838'
HV_GUID_PARENT = 'A42E7CDA-D03F-480C-9CC2-A4DE20ABB878'
HV_GUID_WILDCARD = '00000000-0000-0000-0000-000000000000'
HV_GUID_ZERO = '00000000-0000-0000-0000-000000000000'
HV_PROTOCOL_RAW = 1
INADDR_ALLHOSTS_GROUP = -536870911
INADDR_ANY = 0
INADDR_BROADCAST = -1
INADDR_LOOPBACK = 2130706433
INADDR_MAX_LOCAL_GROUP = -536870657
INADDR_NONE = -1
INADDR_UNSPEC_GROUP = -536870912
IPPORT_RESERVED = 1024
IPPORT_USERRESERVED = 5000
IPPROTO_AH = 51
IPPROTO_CBT = 7
IPPROTO_DSTOPTS = 60
IPPROTO_EGP = 8
IPPROTO_ESP = 50
IPPROTO_FRAGMENT = 44
IPPROTO_GGP = 3
IPPROTO_HOPOPTS = 0
IPPROTO_ICLFXBM = 78
IPPROTO_ICMP = 1
IPPROTO_ICMPV6 = 58
IPPROTO_IDP = 22
IPPROTO_IGMP = 2
IPPROTO_IGP = 9
IPPROTO_IP = 0
IPPROTO_IPV4 = 4
IPPROTO_IPV6 = 41
IPPROTO_L2TP = 115
IPPROTO_MAX = 256
IPPROTO_ND = 77
IPPROTO_NONE = 59
IPPROTO_PGM = 113
IPPROTO_PIM = 103
IPPROTO_PUP = 12
IPPROTO_RAW = 255
IPPROTO_RDP = 27
IPPROTO_ROUTING = 43
IPPROTO_SCTP = 132
IPPROTO_ST = 5
IPPROTO_TCP = 6
IPPROTO_UDP = 17
IPV6_CHECKSUM = 26
IPV6_DONTFRAG = 14
IPV6_HOPLIMIT = 21
IPV6_HOPOPTS = 1
IPV6_JOIN_GROUP = 12
IPV6_LEAVE_GROUP = 13
IPV6_MULTICAST_HOPS = 10
IPV6_MULTICAST_IF = 9
IPV6_MULTICAST_LOOP = 11
IPV6_PKTINFO = 19
IPV6_RECVRTHDR = 38
IPV6_RECVTCLASS = 40
IPV6_RTHDR = 32
IPV6_TCLASS = 39
IPV6_UNICAST_HOPS = 4
IPV6_V6ONLY = 27
IP_ADD_MEMBERSHIP = 12
IP_ADD_SOURCE_MEMBERSHIP = 15
IP_BLOCK_SOURCE = 17
IP_DROP_MEMBERSHIP = 13
IP_DROP_SOURCE_MEMBERSHIP = 16
IP_HDRINCL = 2
IP_MULTICAST_IF = 9
IP_MULTICAST_LOOP = 11
IP_MULTICAST_TTL = 10
IP_OPTIONS = 1
IP_PKTINFO = 19
IP_RECVDSTADDR = 25
IP_RECVTOS = 40
IP_TOS = 3
IP_TTL = 4
IP_UNBLOCK_SOURCE = 18
MSG_BCAST = <MsgFlag.MSG_BCAST: 1024>
MSG_CTRUNC = <MsgFlag.MSG_CTRUNC: 512>
MSG_DONTROUTE = <MsgFlag.MSG_DONTROUTE: 4>
MSG_ERRQUEUE = <MsgFlag.MSG_ERRQUEUE: 4096>
MSG_MCAST = <MsgFlag.MSG_MCAST: 2048>
MSG_OOB = <MsgFlag.MSG_OOB: 1>
MSG_PEEK = <MsgFlag.MSG_PEEK: 2>
MSG_TRUNC = <MsgFlag.MSG_TRUNC: 256>
MSG_WAITALL = <MsgFlag.MSG_WAITALL: 8>
NI_DGRAM = 16
NI_MAXHOST = 1025
NI_MAXSERV = 32
NI_NAMEREQD = 4
NI_NOFQDN = 1
NI_NUMERICHOST = 2
NI_NUMERICSERV = 8
RCVALL_MAX = 3
RCVALL_OFF = 0
RCVALL_ON = 1
RCVALL_SOCKETLEVELONLY = 2
SHUT_RD = 0
SHUT_RDWR = 2
SHUT_WR = 1
SIO_KEEPALIVE_VALS = 2550136836
SIO_LOOPBACK_FAST_PATH = 2550136848
SIO_RCVALL = 2550136833
SOCK_DGRAM = <SocketKind.SOCK_DGRAM: 2>
SOCK_RAW = <SocketKind.SOCK_RAW: 3>
SOCK_RDM = <SocketKind.SOCK_RDM: 4>
SOCK_SEQPACKET = <SocketKind.SOCK_SEQPACKET: 5>
SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
SOL_IP = 65531
SOL_SOCKET = 65535
SOL_TCP = 6
SOL_UDP = 17
SOMAXCONN = 2147483647
SO_ACCEPTCONN = 2
SO_BROADCAST = 32
SO_DEBUG = 1
SO_DONTROUTE = 16
SO_ERROR = 4103
SO_EXCLUSIVEADDRUSE = -5
SO_KEEPALIVE = 8
SO_LINGER = 128
SO_OOBINLINE = 256
SO_RCVBUF = 4098
SO_RCVLOWAT = 4100
SO_RCVTIMEO = 4102
SO_REUSEADDR = 4
SO_SNDBUF = 4097
SO_SNDLOWAT = 4099
SO_SNDTIMEO = 4101
SO_TYPE = 4104
SO_USELOOPBACK = 64
TCP_FASTOPEN = 15
TCP_KEEPCNT = 16
TCP_KEEPIDLE = 3
TCP_KEEPINTVL = 17
TCP_MAXSEG = 4
TCP_NODELAY = 1
__all__ = ['fromfd', 'getfqdn', 'create_connection', 'create_server', ...
errorTab = {6: 'Specified event object handle is invalid.', 8: 'Insuff...
has_ipv6 = True
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\socket.py
http.server.socketserver
Python Library Documentation: module socketserver
NAME
socketserver - Generic socket server classes.
MODULE REFERENCE
https://docs.python.org/3.12/library/socketserver.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module tries to capture the various aspects of defining a server:
For socket-based servers:
- address family:
- AF_INET{,6}: IP (Internet Protocol) sockets (default)
- AF_UNIX: Unix domain sockets
- others, e.g. AF_DECNET are conceivable (see <socket.h>
- socket type:
- SOCK_STREAM (reliable stream, e.g. TCP)
- SOCK_DGRAM (datagrams, e.g. UDP)
For request-based servers (including socket-based):
- client address verification before further looking at the request
(This is actually a hook for any processing that needs to look
at the request before anything else, e.g. logging)
- how to handle multiple requests:
- synchronous (one request is handled at a time)
- forking (each request is handled by a new process)
- threading (each request is handled by a new thread)
The classes in this module favor the server type that is simplest to
write: a synchronous TCP/IP server. This is bad class design, but
saves some typing. (There's also the issue that a deep class hierarchy
slows down method lookups.)
There are five classes in an inheritance diagram, four of which represent
synchronous servers of four types:
+------------+
| BaseServer |
+------------+
|
v
+-----------+ +------------------+
| TCPServer |------->| UnixStreamServer |
+-----------+ +------------------+
|
v
+-----------+ +--------------------+
| UDPServer |------->| UnixDatagramServer |
+-----------+ +--------------------+
Note that UnixDatagramServer derives from UDPServer, not from
UnixStreamServer -- the only difference between an IP and a Unix
stream server is the address family, which is simply repeated in both
unix server classes.
Forking and threading versions of each type of server can be created
using the ForkingMixIn and ThreadingMixIn mix-in classes. For
instance, a threading UDP server class is created as follows:
class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass
The Mix-in class must come first, since it overrides a method defined
in UDPServer! Setting the various member variables also changes
the behavior of the underlying server mechanism.
To implement a service, you must derive a class from
BaseRequestHandler and redefine its handle() method. You can then run
various versions of the service by combining one of the server classes
with your request handler class.
The request handler class must be different for datagram or stream
services. This can be hidden by using the request handler
subclasses StreamRequestHandler or DatagramRequestHandler.
Of course, you still have to use your head!
For instance, it makes no sense to use a forking server if the service
contains state in memory that can be modified by requests (since the
modifications in the child process would never reach the initial state
kept in the parent process and passed to each child). In this case,
you can use a threading server, but you will probably have to use
locks to avoid two requests that come in nearly simultaneous to apply
conflicting changes to the server state.
On the other hand, if you are building e.g. an HTTP server, where all
data is stored externally (e.g. in the file system), a synchronous
class will essentially render the service "deaf" while one request is
being handled -- which may be for a very long time if a client is slow
to read all the data it has requested. Here a threading or forking
server is appropriate.
In some cases, it may be appropriate to process part of a request
synchronously, but to finish processing in a forked child depending on
the request data. This can be implemented by using a synchronous
server and doing an explicit fork in the request handler class
handle() method.
Another approach to handling multiple simultaneous requests in an
environment that supports neither threads nor fork (or where these are
too expensive or inappropriate for the service) is to maintain an
explicit table of partially finished requests and to use a selector to
decide which request to work on next (or whether to handle a new
incoming request). This is particularly important for stream services
where each client can potentially be connected for a long time (if
threads or subprocesses cannot be used).
Future work:
- Standard classes for Sun RPC (which uses either UDP or TCP)
- Standard mix-in classes to implement various authentication
and encryption schemes
XXX Open problems:
- What to do with out-of-band data?
BaseServer:
- split generic "request" functionality out into BaseServer class.
Copyright (C) 2000 Luke Kenneth Casson Leighton <lkcl@samba.org>
example: read entries from a SQL database (requires overriding
get_request() to return a table entry from the database).
entry is processed by a RequestHandlerClass.
CLASSES
builtins.object
BaseRequestHandler
DatagramRequestHandler
StreamRequestHandler
BaseServer
TCPServer
UDPServer
ThreadingMixIn
ThreadingTCPServer(ThreadingMixIn, TCPServer)
ThreadingUDPServer(ThreadingMixIn, UDPServer)
class BaseRequestHandler(builtins.object)
| BaseRequestHandler(request, client_address, server)
|
| Base class for request handler classes.
|
| This class is instantiated for each request to be handled. The
| constructor sets the instance variables request, client_address
| and server, and then calls the handle() method. To implement a
| specific service, all you need to do is to derive a class which
| defines a handle() method.
|
| The handle() method can find the request as self.request, the
| client address as self.client_address, and the server (in case it
| needs access to per-server information) as self.server. Since a
| separate instance is created for each request, the handle() method
| can define other arbitrary instance variables.
|
| Methods defined here:
|
| __init__(self, request, client_address, server)
| Initialize self. See help(type(self)) for accurate signature.
|
| finish(self)
|
| handle(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class BaseServer(builtins.object)
| BaseServer(server_address, RequestHandlerClass)
|
| Base class for server classes.
|
| Methods for the caller:
|
| - __init__(server_address, RequestHandlerClass)
| - serve_forever(poll_interval=0.5)
| - shutdown()
| - handle_request() # if you do not use serve_forever()
| - fileno() -> int # for selector
|
| Methods that may be overridden:
|
| - server_bind()
| - server_activate()
| - get_request() -> request, client_address
| - handle_timeout()
| - verify_request(request, client_address)
| - server_close()
| - process_request(request, client_address)
| - shutdown_request(request)
| - close_request(request)
| - service_actions()
| - handle_error()
|
| Methods for derived classes:
|
| - finish_request(request, client_address)
|
| Class variables that may be overridden by derived classes or
| instances:
|
| - timeout
| - address_family
| - socket_type
| - allow_reuse_address
| - allow_reuse_port
|
| Instance variables:
|
| - RequestHandlerClass
| - socket
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| __init__(self, server_address, RequestHandlerClass)
| Constructor. May be extended, do not override.
|
| close_request(self, request)
| Called to clean up an individual request.
|
| finish_request(self, request, client_address)
| Finish one request by instantiating RequestHandlerClass.
|
| handle_error(self, request, client_address)
| Handle an error gracefully. May be overridden.
|
| The default is to print a traceback and continue.
|
| handle_request(self)
| Handle one request, possibly blocking.
|
| Respects self.timeout.
|
| handle_timeout(self)
| Called if no new request arrives within self.timeout.
|
| Overridden by ForkingMixIn.
|
| process_request(self, request, client_address)
| Call finish_request.
|
| Overridden by ForkingMixIn and ThreadingMixIn.
|
| serve_forever(self, poll_interval=0.5)
| Handle one request at a time until shutdown.
|
| Polls for shutdown every poll_interval seconds. Ignores
| self.timeout. If you need to do periodic tasks, do them in
| another thread.
|
| server_activate(self)
| Called by constructor to activate the server.
|
| May be overridden.
|
| server_close(self)
| Called to clean-up the server.
|
| May be overridden.
|
| service_actions(self)
| Called by the serve_forever() loop.
|
| May be overridden by a subclass / Mixin to implement any code that
| needs to be run during the loop.
|
| shutdown(self)
| Stops the serve_forever loop.
|
| Blocks until the loop has finished. This must be called while
| serve_forever() is running in another thread, or it will
| deadlock.
|
| shutdown_request(self, request)
| Called to shutdown and close an individual request.
|
| verify_request(self, request, client_address)
| Verify the request. May be overridden.
|
| Return True if we should proceed with this request.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| timeout = None
class DatagramRequestHandler(BaseRequestHandler)
| DatagramRequestHandler(request, client_address, server)
|
| Define self.rfile and self.wfile for datagram sockets.
|
| Method resolution order:
| DatagramRequestHandler
| BaseRequestHandler
| builtins.object
|
| Methods defined here:
|
| finish(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Methods inherited from BaseRequestHandler:
|
| __init__(self, request, client_address, server)
| Initialize self. See help(type(self)) for accurate signature.
|
| handle(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseRequestHandler:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class StreamRequestHandler(BaseRequestHandler)
| StreamRequestHandler(request, client_address, server)
|
| Define self.rfile and self.wfile for stream sockets.
|
| Method resolution order:
| StreamRequestHandler
| BaseRequestHandler
| builtins.object
|
| Methods defined here:
|
| finish(self)
|
| setup(self)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| disable_nagle_algorithm = False
|
| rbufsize = -1
|
| timeout = None
|
| wbufsize = 0
|
| ----------------------------------------------------------------------
| Methods inherited from BaseRequestHandler:
|
| __init__(self, request, client_address, server)
| Initialize self. See help(type(self)) for accurate signature.
|
| handle(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseRequestHandler:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class TCPServer(BaseServer)
| TCPServer(server_address, RequestHandlerClass, bind_and_activate=True)
|
| Base class for various socket-based server classes.
|
| Defaults to synchronous IP stream (i.e., TCP).
|
| Methods for the caller:
|
| - __init__(server_address, RequestHandlerClass, bind_and_activate=True)
| - serve_forever(poll_interval=0.5)
| - shutdown()
| - handle_request() # if you don't use serve_forever()
| - fileno() -> int # for selector
|
| Methods that may be overridden:
|
| - server_bind()
| - server_activate()
| - get_request() -> request, client_address
| - handle_timeout()
| - verify_request(request, client_address)
| - process_request(request, client_address)
| - shutdown_request(request)
| - close_request(request)
| - handle_error()
|
| Methods for derived classes:
|
| - finish_request(request, client_address)
|
| Class variables that may be overridden by derived classes or
| instances:
|
| - timeout
| - address_family
| - socket_type
| - request_queue_size (only for stream sockets)
| - allow_reuse_address
| - allow_reuse_port
|
| Instance variables:
|
| - server_address
| - RequestHandlerClass
| - socket
|
| Method resolution order:
| TCPServer
| BaseServer
| builtins.object
|
| Methods defined here:
|
| __init__(self, server_address, RequestHandlerClass, bind_and_activate=True)
| Constructor. May be extended, do not override.
|
| close_request(self, request)
| Called to clean up an individual request.
|
| fileno(self)
| Return socket file number.
|
| Interface required by selector.
|
| get_request(self)
| Get the request and client address from the socket.
|
| May be overridden.
|
| server_activate(self)
| Called by constructor to activate the server.
|
| May be overridden.
|
| server_bind(self)
| Called by constructor to bind the socket.
|
| May be overridden.
|
| server_close(self)
| Called to clean-up the server.
|
| May be overridden.
|
| shutdown_request(self, request)
| Called to shutdown and close an individual request.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| address_family = <AddressFamily.AF_INET: 2>
|
| allow_reuse_address = False
|
| allow_reuse_port = False
|
| request_queue_size = 5
|
| socket_type = <SocketKind.SOCK_STREAM: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from BaseServer:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| finish_request(self, request, client_address)
| Finish one request by instantiating RequestHandlerClass.
|
| handle_error(self, request, client_address)
| Handle an error gracefully. May be overridden.
|
| The default is to print a traceback and continue.
|
| handle_request(self)
| Handle one request, possibly blocking.
|
| Respects self.timeout.
|
| handle_timeout(self)
| Called if no new request arrives within self.timeout.
|
| Overridden by ForkingMixIn.
|
| process_request(self, request, client_address)
| Call finish_request.
|
| Overridden by ForkingMixIn and ThreadingMixIn.
|
| serve_forever(self, poll_interval=0.5)
| Handle one request at a time until shutdown.
|
| Polls for shutdown every poll_interval seconds. Ignores
| self.timeout. If you need to do periodic tasks, do them in
| another thread.
|
| service_actions(self)
| Called by the serve_forever() loop.
|
| May be overridden by a subclass / Mixin to implement any code that
| needs to be run during the loop.
|
| shutdown(self)
| Stops the serve_forever loop.
|
| Blocks until the loop has finished. This must be called while
| serve_forever() is running in another thread, or it will
| deadlock.
|
| verify_request(self, request, client_address)
| Verify the request. May be overridden.
|
| Return True if we should proceed with this request.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseServer:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from BaseServer:
|
| timeout = None
class ThreadingMixIn(builtins.object)
| Mix-in class to handle each request in a new thread.
|
| Methods defined here:
|
| process_request(self, request, client_address)
| Start a new thread to process the request.
|
| process_request_thread(self, request, client_address)
| Same as in BaseServer but as a thread.
|
| In addition, exception handling is done here.
|
| server_close(self)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| block_on_close = True
|
| daemon_threads = False
class ThreadingTCPServer(ThreadingMixIn, TCPServer)
| ThreadingTCPServer(server_address, RequestHandlerClass, bind_and_activate=True)
|
| Method resolution order:
| ThreadingTCPServer
| ThreadingMixIn
| TCPServer
| BaseServer
| builtins.object
|
| Methods inherited from ThreadingMixIn:
|
| process_request(self, request, client_address)
| Start a new thread to process the request.
|
| process_request_thread(self, request, client_address)
| Same as in BaseServer but as a thread.
|
| In addition, exception handling is done here.
|
| server_close(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from ThreadingMixIn:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from ThreadingMixIn:
|
| block_on_close = True
|
| daemon_threads = False
|
| ----------------------------------------------------------------------
| Methods inherited from TCPServer:
|
| __init__(self, server_address, RequestHandlerClass, bind_and_activate=True)
| Constructor. May be extended, do not override.
|
| close_request(self, request)
| Called to clean up an individual request.
|
| fileno(self)
| Return socket file number.
|
| Interface required by selector.
|
| get_request(self)
| Get the request and client address from the socket.
|
| May be overridden.
|
| server_activate(self)
| Called by constructor to activate the server.
|
| May be overridden.
|
| server_bind(self)
| Called by constructor to bind the socket.
|
| May be overridden.
|
| shutdown_request(self, request)
| Called to shutdown and close an individual request.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from TCPServer:
|
| address_family = <AddressFamily.AF_INET: 2>
|
| allow_reuse_address = False
|
| allow_reuse_port = False
|
| request_queue_size = 5
|
| socket_type = <SocketKind.SOCK_STREAM: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from BaseServer:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| finish_request(self, request, client_address)
| Finish one request by instantiating RequestHandlerClass.
|
| handle_error(self, request, client_address)
| Handle an error gracefully. May be overridden.
|
| The default is to print a traceback and continue.
|
| handle_request(self)
| Handle one request, possibly blocking.
|
| Respects self.timeout.
|
| handle_timeout(self)
| Called if no new request arrives within self.timeout.
|
| Overridden by ForkingMixIn.
|
| serve_forever(self, poll_interval=0.5)
| Handle one request at a time until shutdown.
|
| Polls for shutdown every poll_interval seconds. Ignores
| self.timeout. If you need to do periodic tasks, do them in
| another thread.
|
| service_actions(self)
| Called by the serve_forever() loop.
|
| May be overridden by a subclass / Mixin to implement any code that
| needs to be run during the loop.
|
| shutdown(self)
| Stops the serve_forever loop.
|
| Blocks until the loop has finished. This must be called while
| serve_forever() is running in another thread, or it will
| deadlock.
|
| verify_request(self, request, client_address)
| Verify the request. May be overridden.
|
| Return True if we should proceed with this request.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from BaseServer:
|
| timeout = None
class ThreadingUDPServer(ThreadingMixIn, UDPServer)
| ThreadingUDPServer(server_address, RequestHandlerClass, bind_and_activate=True)
|
| Method resolution order:
| ThreadingUDPServer
| ThreadingMixIn
| UDPServer
| TCPServer
| BaseServer
| builtins.object
|
| Methods inherited from ThreadingMixIn:
|
| process_request(self, request, client_address)
| Start a new thread to process the request.
|
| process_request_thread(self, request, client_address)
| Same as in BaseServer but as a thread.
|
| In addition, exception handling is done here.
|
| server_close(self)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from ThreadingMixIn:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from ThreadingMixIn:
|
| block_on_close = True
|
| daemon_threads = False
|
| ----------------------------------------------------------------------
| Methods inherited from UDPServer:
|
| close_request(self, request)
| Called to clean up an individual request.
|
| get_request(self)
| Get the request and client address from the socket.
|
| May be overridden.
|
| server_activate(self)
| Called by constructor to activate the server.
|
| May be overridden.
|
| shutdown_request(self, request)
| Called to shutdown and close an individual request.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from UDPServer:
|
| allow_reuse_address = False
|
| allow_reuse_port = False
|
| max_packet_size = 8192
|
| socket_type = <SocketKind.SOCK_DGRAM: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from TCPServer:
|
| __init__(self, server_address, RequestHandlerClass, bind_and_activate=True)
| Constructor. May be extended, do not override.
|
| fileno(self)
| Return socket file number.
|
| Interface required by selector.
|
| server_bind(self)
| Called by constructor to bind the socket.
|
| May be overridden.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from TCPServer:
|
| address_family = <AddressFamily.AF_INET: 2>
|
| request_queue_size = 5
|
| ----------------------------------------------------------------------
| Methods inherited from BaseServer:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| finish_request(self, request, client_address)
| Finish one request by instantiating RequestHandlerClass.
|
| handle_error(self, request, client_address)
| Handle an error gracefully. May be overridden.
|
| The default is to print a traceback and continue.
|
| handle_request(self)
| Handle one request, possibly blocking.
|
| Respects self.timeout.
|
| handle_timeout(self)
| Called if no new request arrives within self.timeout.
|
| Overridden by ForkingMixIn.
|
| serve_forever(self, poll_interval=0.5)
| Handle one request at a time until shutdown.
|
| Polls for shutdown every poll_interval seconds. Ignores
| self.timeout. If you need to do periodic tasks, do them in
| another thread.
|
| service_actions(self)
| Called by the serve_forever() loop.
|
| May be overridden by a subclass / Mixin to implement any code that
| needs to be run during the loop.
|
| shutdown(self)
| Stops the serve_forever loop.
|
| Blocks until the loop has finished. This must be called while
| serve_forever() is running in another thread, or it will
| deadlock.
|
| verify_request(self, request, client_address)
| Verify the request. May be overridden.
|
| Return True if we should proceed with this request.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from BaseServer:
|
| timeout = None
class UDPServer(TCPServer)
| UDPServer(server_address, RequestHandlerClass, bind_and_activate=True)
|
| UDP server class.
|
| Method resolution order:
| UDPServer
| TCPServer
| BaseServer
| builtins.object
|
| Methods defined here:
|
| close_request(self, request)
| Called to clean up an individual request.
|
| get_request(self)
| Get the request and client address from the socket.
|
| May be overridden.
|
| server_activate(self)
| Called by constructor to activate the server.
|
| May be overridden.
|
| shutdown_request(self, request)
| Called to shutdown and close an individual request.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| allow_reuse_address = False
|
| allow_reuse_port = False
|
| max_packet_size = 8192
|
| socket_type = <SocketKind.SOCK_DGRAM: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from TCPServer:
|
| __init__(self, server_address, RequestHandlerClass, bind_and_activate=True)
| Constructor. May be extended, do not override.
|
| fileno(self)
| Return socket file number.
|
| Interface required by selector.
|
| server_bind(self)
| Called by constructor to bind the socket.
|
| May be overridden.
|
| server_close(self)
| Called to clean-up the server.
|
| May be overridden.
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from TCPServer:
|
| address_family = <AddressFamily.AF_INET: 2>
|
| request_queue_size = 5
|
| ----------------------------------------------------------------------
| Methods inherited from BaseServer:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| finish_request(self, request, client_address)
| Finish one request by instantiating RequestHandlerClass.
|
| handle_error(self, request, client_address)
| Handle an error gracefully. May be overridden.
|
| The default is to print a traceback and continue.
|
| handle_request(self)
| Handle one request, possibly blocking.
|
| Respects self.timeout.
|
| handle_timeout(self)
| Called if no new request arrives within self.timeout.
|
| Overridden by ForkingMixIn.
|
| process_request(self, request, client_address)
| Call finish_request.
|
| Overridden by ForkingMixIn and ThreadingMixIn.
|
| serve_forever(self, poll_interval=0.5)
| Handle one request at a time until shutdown.
|
| Polls for shutdown every poll_interval seconds. Ignores
| self.timeout. If you need to do periodic tasks, do them in
| another thread.
|
| service_actions(self)
| Called by the serve_forever() loop.
|
| May be overridden by a subclass / Mixin to implement any code that
| needs to be run during the loop.
|
| shutdown(self)
| Stops the serve_forever loop.
|
| Blocks until the loop has finished. This must be called while
| serve_forever() is running in another thread, or it will
| deadlock.
|
| verify_request(self, request, client_address)
| Verify the request. May be overridden.
|
| Return True if we should proceed with this request.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseServer:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from BaseServer:
|
| timeout = None
DATA
__all__ = ['BaseServer', 'TCPServer', 'UDPServer', 'ThreadingUDPServer...
VERSION
0.4
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\socketserver.py
http.server.sys
Python Library Documentation: built-in module sys
NAME
sys
MODULE REFERENCE
https://docs.python.org/3.12/library/sys.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides access to some objects used or maintained by the
interpreter and to functions that interact strongly with the interpreter.
Dynamic objects:
argv -- command line arguments; argv[0] is the script pathname if known
path -- module search path; path[0] is the script directory, else ''
modules -- dictionary of loaded modules
displayhook -- called to show results in an interactive session
excepthook -- called to handle any uncaught exception other than SystemExit
To customize printing in an interactive session or to install a custom
top-level exception handler, assign other functions to replace these.
stdin -- standard input file object; used by input()
stdout -- standard output file object; used by print()
stderr -- standard error object; used for error messages
By assigning other file objects (or objects that behave like files)
to these, it is possible to redirect all of the interpreter's I/O.
last_exc - the last uncaught exception
Only available in an interactive session after a
traceback has been printed.
last_type -- type of last uncaught exception
last_value -- value of last uncaught exception
last_traceback -- traceback of last uncaught exception
These three are the (deprecated) legacy representation of last_exc.
Static objects:
builtin_module_names -- tuple of module names built into this interpreter
copyright -- copyright notice pertaining to this interpreter
exec_prefix -- prefix used to find the machine-specific Python library
executable -- absolute path of the executable binary of the Python interpreter
float_info -- a named tuple with information about the float implementation.
float_repr_style -- string indicating the style of repr() output for floats
hash_info -- a named tuple with information about the hash algorithm.
hexversion -- version information encoded as a single integer
implementation -- Python implementation information.
int_info -- a named tuple with information about the int implementation.
maxsize -- the largest supported length of containers.
maxunicode -- the value of the largest Unicode code point
platform -- platform identifier
prefix -- prefix used to find the Python library
thread_info -- a named tuple with information about the thread implementation.
version -- the version of this interpreter as a string
version_info -- version information as a named tuple
dllhandle -- [Windows only] integer handle of the Python DLL
winver -- [Windows only] version number of the Python DLL
_enablelegacywindowsfsencoding -- [Windows only]
__stdin__ -- the original stdin; don't touch!
__stdout__ -- the original stdout; don't touch!
__stderr__ -- the original stderr; don't touch!
__displayhook__ -- the original displayhook; don't touch!
__excepthook__ -- the original excepthook; don't touch!
Functions:
displayhook() -- print an object to the screen, and save it in builtins._
excepthook() -- print an exception and its traceback to sys.stderr
exception() -- return the current thread's active exception
exc_info() -- return information about the current thread's active exception
exit() -- exit the interpreter by raising SystemExit
getdlopenflags() -- returns flags to be used for dlopen() calls
getprofile() -- get the global profiling function
getrefcount() -- return the reference count for an object (plus one :-)
getrecursionlimit() -- return the max recursion depth for the interpreter
getsizeof() -- return the size of an object in bytes
gettrace() -- get the global debug tracing function
setdlopenflags() -- set the flags to be used for dlopen() calls
setprofile() -- set the global profiling function
setrecursionlimit() -- set the max recursion depth for the interpreter
settrace() -- set the global debug tracing function
SUBMODULES
monitoring
FUNCTIONS
__breakpointhook__ = breakpointhook(...)
breakpointhook(*args, **kws)
This hook function is called by built-in breakpoint().
__displayhook__ = displayhook(object, /)
Print an object to sys.stdout and also save it in builtins._
__excepthook__ = excepthook(exctype, value, traceback, /)
Handle an exception by displaying it with a traceback on sys.stderr.
__unraisablehook__ = unraisablehook(unraisable, /)
Handle an unraisable exception.
The unraisable argument has the following attributes:
* exc_type: Exception type.
* exc_value: Exception value, can be None.
* exc_traceback: Exception traceback, can be None.
* err_msg: Error message, can be None.
* object: Object causing the exception, can be None.
activate_stack_trampoline(backend, /)
Activate stack profiler trampoline *backend*.
addaudithook(hook)
Adds a new audit hook callback.
audit(...)
audit(event, *args)
Passes the event to any audit hooks that are attached.
breakpointhook(...)
breakpointhook(*args, **kws)
This hook function is called by built-in breakpoint().
call_tracing(func, args, /)
Call func(*args), while tracing is enabled.
The tracing state is saved, and restored afterwards. This is intended
to be called from a debugger from a checkpoint, to recursively debug
some other code.
deactivate_stack_trampoline()
Deactivate the current stack profiler trampoline backend.
If no stack profiler is activated, this function has no effect.
displayhook(object, /)
Print an object to sys.stdout and also save it in builtins._
exc_info()
Return current exception information: (type, value, traceback).
Return information about the most recent exception caught by an except
clause in the current stack frame or in an older stack frame.
excepthook(exctype, value, traceback, /)
Handle an exception by displaying it with a traceback on sys.stderr.
exception()
Return the current exception.
Return the most recent exception caught by an except clause
in the current stack frame or in an older stack frame, or None
if no such exception exists.
exit(status=None, /)
Exit the interpreter by raising SystemExit(status).
If the status is omitted or None, it defaults to zero (i.e., success).
If the status is an integer, it will be used as the system exit status.
If it is another kind of object, it will be printed and the system
exit status will be one (i.e., failure).
get_asyncgen_hooks()
Return the installed asynchronous generators hooks.
This returns a namedtuple of the form (firstiter, finalizer).
get_coroutine_origin_tracking_depth()
Check status of origin tracking for coroutine objects in this thread.
get_int_max_str_digits()
Return the maximum string digits limit for non-binary int<->str conversions.
getallocatedblocks()
Return the number of memory blocks currently allocated.
getdefaultencoding()
Return the current default encoding used by the Unicode implementation.
getfilesystemencodeerrors()
Return the error mode used Unicode to OS filename conversion.
getfilesystemencoding()
Return the encoding used to convert Unicode filenames to OS filenames.
getprofile()
Return the profiling function set with sys.setprofile.
See the profiler chapter in the library manual.
getrecursionlimit()
Return the current value of the recursion limit.
The recursion limit is the maximum depth of the Python interpreter
stack. This limit prevents infinite recursion from causing an overflow
of the C stack and crashing Python.
getrefcount(object, /)
Return the reference count of object.
The count returned is generally one higher than you might expect,
because it includes the (temporary) reference as an argument to
getrefcount().
getsizeof(...)
getsizeof(object [, default]) -> int
Return the size of object in bytes.
getswitchinterval()
Return the current thread switch interval; see sys.setswitchinterval().
gettrace()
Return the global debug tracing function set with sys.settrace.
See the debugger chapter in the library manual.
getunicodeinternedsize()
Return the number of elements of the unicode interned dictionary
getwindowsversion()
Return info about the running version of Windows as a named tuple.
The members are named: major, minor, build, platform, service_pack,
service_pack_major, service_pack_minor, suite_mask, product_type and
platform_version. For backward compatibility, only the first 5 items
are available by indexing. All elements are numbers, except
service_pack and platform_type which are strings, and platform_version
which is a 3-tuple. Platform is always 2. Product_type may be 1 for a
workstation, 2 for a domain controller, 3 for a server.
Platform_version is a 3-tuple containing a version number that is
intended for identifying the OS rather than feature detection.
intern(string, /)
``Intern'' the given string.
This enters the string in the (global) table of interned strings whose
purpose is to speed up dictionary lookups. Return the string itself or
the previously interned string object with the same value.
is_finalizing()
Return True if Python is exiting.
is_stack_trampoline_active()
Return *True* if a stack profiler trampoline is active.
set_asyncgen_hooks(...)
set_asyncgen_hooks([firstiter] [, finalizer])
Set a finalizer for async generators objects.
set_coroutine_origin_tracking_depth(depth)
Enable or disable origin tracking for coroutine objects in this thread.
Coroutine objects will track 'depth' frames of traceback information
about where they came from, available in their cr_origin attribute.
Set a depth of 0 to disable.
set_int_max_str_digits(maxdigits)
Set the maximum string digits limit for non-binary int<->str conversions.
setprofile(...)
setprofile(function)
Set the profiling function. It will be called on each function call
and return. See the profiler chapter in the library manual.
setrecursionlimit(limit, /)
Set the maximum depth of the Python interpreter stack to n.
This limit prevents infinite recursion from causing an overflow of the C
stack and crashing Python. The highest possible limit is platform-
dependent.
setswitchinterval(interval, /)
Set the ideal thread switching delay inside the Python interpreter.
The actual frequency of switching threads can be lower if the
interpreter executes long sequences of uninterruptible code
(this is implementation-specific and workload-dependent).
The parameter must represent the desired switching delay in seconds
A typical value is 0.005 (5 milliseconds).
settrace(...)
settrace(function)
Set the global debug tracing function. It will be called on each
function call. See the debugger chapter in the library manual.
unraisablehook(unraisable, /)
Handle an unraisable exception.
The unraisable argument has the following attributes:
* exc_type: Exception type.
* exc_value: Exception value, can be None.
* exc_traceback: Exception traceback, can be None.
* err_msg: Error message, can be None.
* object: Object causing the exception, can be None.
DATA
__stderr__ = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='cp1...
__stdin__ = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8...
__stdout__ = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1...
api_version = 1013
argv = [r'f:\JoeyCodes\PyDocs\py_docs.py', '--worker', 'http', r'F:\Jo...
base_exec_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Pyth...
base_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312...
builtin_module_names = ('_abc', '_ast', '_bisect', '_blake2', '_codecs...
byteorder = 'little'
copyright = 'Copyright (c) 2001-2023 Python Software Foundati...ematis...
dllhandle = 140727031824384
dont_write_bytecode = False
exec_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312...
executable = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312\...
flags = sys.flags(debug=0, inspect=0, interactive=0, opt...ding=0, saf...
float_info = sys.float_info(max=1.7976931348623157e+308, max_...epsilo...
float_repr_style = 'short'
hash_info = sys.hash_info(width=64, modulus=2305843009213693...iphash1...
hexversion = 51119856
implementation = namespace(name='cpython', cache_tag='cpython-312...as...
int_info = sys.int_info(bits_per_digit=30, sizeof_digit=4, ..._str_dig...
maxsize = 9223372036854775807
maxunicode = 1114111
meta_path = [<_distutils_hack.DistutilsMetaFinder object>, <class '_fr...
modules = {'__future__': <module '__future__' from 'C:\\Users\\Youse\\...
orig_argv = [r'C:\Users\Youse\AppData\Local\Programs\Python\Python312\...
path = [r'f:\JoeyCodes\PyDocs', r'C:\Users\Youse\AppData\Local\Program...
path_hooks = [<class 'zipimport.zipimporter'>, <function FileFinder.pa...
path_importer_cache = {r'C:\Users\Youse\AppData\Local\Programs\Python\...
platform = 'win32'
platlibdir = 'DLLs'
prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312'
pycache_prefix = None
stderr = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='cp1252'...
stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
stdlib_module_names = frozenset({'__future__', '_abc', '_aix_support',...
stdout = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'...
thread_info = sys.thread_info(name='nt', lock=None, version=None)
version = '3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v...
version_info = sys.version_info(major=3, minor=12, micro=6, releaselev...
warnoptions = []
winver = '3.12'
FILE
(built-in)
http.server.test
Python Library Documentation: function test in module http.server
test(HandlerClass=<class 'http.server.BaseHTTPRequestHandler'>, ServerClass=<class 'http.server.ThreadingHTTPServer'>, protocol='HTTP/1.0', port=8000, bind=None)
Test the HTTP request handler class.
This runs an HTTP server on port 8000 (or the port argument).
http.server.time
Python Library Documentation: built-in module time
NAME
time - This module provides various functions to manipulate time values.
DESCRIPTION
There are two standard representations of time. One is the number
of seconds since the Epoch, in UTC (a.k.a. GMT). It may be an integer
or a floating-point number (to represent fractions of seconds).
The epoch is the point where the time starts, the return value of time.gmtime(0).
It is January 1, 1970, 00:00:00 (UTC) on all platforms.
The other representation is a tuple of 9 integers giving local time.
The tuple items are:
year (including century, e.g. 1998)
month (1-12)
day (1-31)
hours (0-23)
minutes (0-59)
seconds (0-59)
weekday (0-6, Monday is 0)
Julian day (day in the year, 1-366)
DST (Daylight Savings Time) flag (-1, 0 or 1)
If the DST flag is 0, the time is given in the regular time zone;
if it is 1, the time is given in the DST time zone;
if it is -1, mktime() should guess based on the date and time.
CLASSES
builtins.tuple(builtins.object)
struct_time
class struct_time(builtins.tuple)
| struct_time(iterable=(), /)
|
| The time value as returned by gmtime(), localtime(), and strptime(), and
| accepted by asctime(), mktime() and strftime(). May be considered as a
| sequence of 9 integers.
|
| Note that several fields' values are not the same as those defined by
| the C language standard for struct tm. For example, the value of the
| field tm_year is the actual year, not year - 1900. See individual
| fields' descriptions for details.
|
| Method resolution order:
| struct_time
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| tm_gmtoff
| offset from UTC in seconds
|
| tm_hour
| hours, range [0, 23]
|
| tm_isdst
| 1 if summer time is in effect, 0 if not, and -1 if unknown
|
| tm_mday
| day of month, range [1, 31]
|
| tm_min
| minutes, range [0, 59]
|
| tm_mon
| month of year, range [1, 12]
|
| tm_sec
| seconds, range [0, 61])
|
| tm_wday
| day of week, range [0, 6], Monday is 0
|
| tm_yday
| day of year, range [1, 366]
|
| tm_year
| year, for example, 1993
|
| tm_zone
| abbreviation of timezone name
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('tm_year', 'tm_mon', 'tm_mday', 'tm_hour', 'tm_min',...
|
| n_fields = 11
|
| n_sequence_fields = 9
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
FUNCTIONS
asctime(...)
asctime([tuple]) -> string
Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.
When the time tuple is not present, current time as returned by localtime()
is used.
ctime(...)
ctime(seconds) -> string
Convert a time in seconds since the Epoch to a string in local time.
This is equivalent to asctime(localtime(seconds)). When the time tuple is
not present, current time as returned by localtime() is used.
get_clock_info(...)
get_clock_info(name: str) -> dict
Get information of the specified clock.
gmtime(...)
gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,
tm_sec, tm_wday, tm_yday, tm_isdst)
Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.
GMT). When 'seconds' is not passed in, convert the current time instead.
If the platform supports the tm_gmtoff and tm_zone, they are available as
attributes only.
localtime(...)
localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,
tm_sec,tm_wday,tm_yday,tm_isdst)
Convert seconds since the Epoch to a time tuple expressing local time.
When 'seconds' is not passed in, convert the current time instead.
mktime(...)
mktime(tuple) -> floating-point number
Convert a time tuple in local time to seconds since the Epoch.
Note that mktime(gmtime(0)) will not generally return zero for most
time zones; instead the returned value will either be equal to that
of the timezone or altzone attributes on the time module.
monotonic(...)
monotonic() -> float
Monotonic clock, cannot go backward.
monotonic_ns(...)
monotonic_ns() -> int
Monotonic clock, cannot go backward, as nanoseconds.
perf_counter(...)
perf_counter() -> float
Performance counter for benchmarking.
perf_counter_ns(...)
perf_counter_ns() -> int
Performance counter for benchmarking as nanoseconds.
process_time(...)
process_time() -> float
Process time for profiling: sum of the kernel and user-space CPU time.
process_time_ns(...)
process_time() -> int
Process time for profiling as nanoseconds:
sum of the kernel and user-space CPU time.
sleep(...)
sleep(seconds)
Delay execution for a given number of seconds. The argument may be
a floating-point number for subsecond precision.
strftime(...)
strftime(format[, tuple]) -> string
Convert a time tuple to a string according to a format specification.
See the library reference manual for formatting codes. When the time tuple
is not present, current time as returned by localtime() is used.
Commonly used format codes:
%Y Year with century as a decimal number.
%m Month as a decimal number [01,12].
%d Day of the month as a decimal number [01,31].
%H Hour (24-hour clock) as a decimal number [00,23].
%M Minute as a decimal number [00,59].
%S Second as a decimal number [00,61].
%z Time zone offset from UTC.
%a Locale's abbreviated weekday name.
%A Locale's full weekday name.
%b Locale's abbreviated month name.
%B Locale's full month name.
%c Locale's appropriate date and time representation.
%I Hour (12-hour clock) as a decimal number [01,12].
%p Locale's equivalent of either AM or PM.
Other codes may be available on your platform. See documentation for
the C library strftime function.
strptime(...)
strptime(string, format) -> struct_time
Parse a string to a time tuple according to a format specification.
See the library reference manual for formatting codes (same as
strftime()).
Commonly used format codes:
%Y Year with century as a decimal number.
%m Month as a decimal number [01,12].
%d Day of the month as a decimal number [01,31].
%H Hour (24-hour clock) as a decimal number [00,23].
%M Minute as a decimal number [00,59].
%S Second as a decimal number [00,61].
%z Time zone offset from UTC.
%a Locale's abbreviated weekday name.
%A Locale's full weekday name.
%b Locale's abbreviated month name.
%B Locale's full month name.
%c Locale's appropriate date and time representation.
%I Hour (12-hour clock) as a decimal number [01,12].
%p Locale's equivalent of either AM or PM.
Other codes may be available on your platform. See documentation for
the C library strftime function.
thread_time(...)
thread_time() -> float
Thread time for profiling: sum of the kernel and user-space CPU time.
thread_time_ns(...)
thread_time() -> int
Thread time for profiling as nanoseconds:
sum of the kernel and user-space CPU time.
time(...)
time() -> floating-point number
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.
time_ns(...)
time_ns() -> int
Return the current time in nanoseconds since the Epoch.
DATA
altzone = -10800
daylight = 1
timezone = -7200
tzname = ('Egypt Standard Time', 'Egypt Daylight Time')
FILE
(built-in)
http.server.urllib
Python Library Documentation: package urllib
NAME
urllib
MODULE REFERENCE
https://docs.python.org/3.12/library/urllib.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
PACKAGE CONTENTS
error
parse
request
response
robotparser
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\urllib\__init__.py
http.cookies.BaseCookie
Python Library Documentation: class BaseCookie in module http.cookies class BaseCookie(builtins.dict) | BaseCookie(input=None) | | A container class for a set of Morsels. | | Method resolution order: | BaseCookie | builtins.dict | builtins.object | | Methods defined here: | | __init__(self, input=None) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | __setitem__(self, key, value) | Dictionary style assignment. | | __str__ = output(self, attrs=None, header='Set-Cookie:', sep='\r\n') | | js_output(self, attrs=None) | Return a string suitable for JavaScript. | | load(self, rawdata) | Load cookies from a string (presumably HTTP_COOKIE) or | from a dictionary. Loading cookies from a dictionary 'd' | is equivalent to calling: | map(Cookie.__setitem__, d.keys(), d.values()) | | output(self, attrs=None, header='Set-Cookie:', sep='\r\n') | Return a string suitable for HTTP. | | value_decode(self, val) | real_value, coded_value = value_decode(STRING) | Called prior to setting a cookie's value from the network | representation. The VALUE is the value read from HTTP | header. | Override this function to modify the behavior of cookies. | | value_encode(self, val) | real_value, coded_value = value_encode(VALUE) | Called prior to setting a cookie's value from the dictionary | representation. The VALUE is the value being assigned. | Override this function to modify the behavior of cookies. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.dict: | | __contains__(self, key, /) | True if the dictionary has the specified key, else False. | | __delitem__(self, key, /) | Delete self[key]. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, key, /) | Return self[key]. | | __gt__(self, value, /) | Return self>value. | | __ior__(self, value, /) | Return self|=value. | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __or__(self, value, /) | Return self|value. | | __reversed__(self, /) | Return a reverse iterator over the dict keys. | | __ror__(self, value, /) | Return value|self. | | __sizeof__(...) | D.__sizeof__() -> size of D in memory, in bytes | | clear(...) | D.clear() -> None. Remove all items from D. | | copy(...) | D.copy() -> a shallow copy of D | | get(self, key, default=None, /) | Return the value for key if key is in the dictionary, else default. | | items(...) | D.items() -> a set-like object providing a view on D's items | | keys(...) | D.keys() -> a set-like object providing a view on D's keys | | pop(...) | D.pop(k[,d]) -> v, remove specified key and return the corresponding value. | | If the key is not found, return the default if given; otherwise, | raise a KeyError. | | popitem(self, /) | Remove and return a (key, value) pair as a 2-tuple. | | Pairs are returned in LIFO (last-in, first-out) order. | Raises KeyError if the dict is empty. | | setdefault(self, key, default=None, /) | Insert key with a value of default if key is not in the dictionary. | | Return the value for key if key is in the dictionary, else default. | | update(...) | D.update([E, ]**F) -> None. Update D from dict/iterable E and F. | If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] | If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v | In either case, this is followed by: for k in F: D[k] = F[k] | | values(...) | D.values() -> an object providing a view on D's values | | ---------------------------------------------------------------------- | Class methods inherited from builtins.dict: | | __class_getitem__(...) | See PEP 585 | | fromkeys(iterable, value=None, /) | Create a new dictionary with keys from iterable and values set to value. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.dict: | | __new__(*args, **kwargs) class method of builtins.dict | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes inherited from builtins.dict: | | __hash__ = None
http.cookies.CookieError
Python Library Documentation: class CookieError in module http.cookies class CookieError(builtins.Exception) | # Define an exception visible to External modules | | Method resolution order: | CookieError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.cookies.Morsel
Python Library Documentation: class Morsel in module http.cookies class Morsel(builtins.dict) | A class to hold ONE (key, value) pair. | | In a cookie, each such pair may have several attributes, so this class is | used to keep the attributes associated with the appropriate key,value pair. | This class also includes a coded_value attribute, which is used to hold | the network representation of the value. | | Method resolution order: | Morsel | builtins.dict | builtins.object | | Methods defined here: | | OutputString(self, attrs=None) | | __eq__(self, morsel) | Return self==value. | | __getstate__(self) | Helper for pickle. | | __init__(self) | Initialize self. See help(type(self)) for accurate signature. | | __ne__(self, value, /) from builtins.object | Return self!=value. | | __repr__(self) | Return repr(self). | | __setitem__(self, K, V) | Set self[key] to value. | | __setstate__(self, state) | | __str__ = output(self, attrs=None, header='Set-Cookie:') | | copy(self) | D.copy() -> a shallow copy of D | | isReservedKey(self, K) | | js_output(self, attrs=None) | | output(self, attrs=None, header='Set-Cookie:') | | set(self, key, val, coded_val) | | setdefault(self, key, val=None) | Insert key with a value of default if key is not in the dictionary. | | Return the value for key if key is in the dictionary, else default. | | update(self, values) | D.update([E, ]**F) -> None. Update D from dict/iterable E and F. | If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] | If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v | In either case, this is followed by: for k in F: D[k] = F[k] | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__ = GenericAlias(...) | Represent a PEP 585 generic type | | E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,). | | ---------------------------------------------------------------------- | Readonly properties defined here: | | coded_value | | key | | value | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None | | ---------------------------------------------------------------------- | Methods inherited from builtins.dict: | | __contains__(self, key, /) | True if the dictionary has the specified key, else False. | | __delitem__(self, key, /) | Delete self[key]. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, key, /) | Return self[key]. | | __gt__(self, value, /) | Return self>value. | | __ior__(self, value, /) | Return self|=value. | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __or__(self, value, /) | Return self|value. | | __reversed__(self, /) | Return a reverse iterator over the dict keys. | | __ror__(self, value, /) | Return value|self. | | __sizeof__(...) | D.__sizeof__() -> size of D in memory, in bytes | | clear(...) | D.clear() -> None. Remove all items from D. | | get(self, key, default=None, /) | Return the value for key if key is in the dictionary, else default. | | items(...) | D.items() -> a set-like object providing a view on D's items | | keys(...) | D.keys() -> a set-like object providing a view on D's keys | | pop(...) | D.pop(k[,d]) -> v, remove specified key and return the corresponding value. | | If the key is not found, return the default if given; otherwise, | raise a KeyError. | | popitem(self, /) | Remove and return a (key, value) pair as a 2-tuple. | | Pairs are returned in LIFO (last-in, first-out) order. | Raises KeyError if the dict is empty. | | values(...) | D.values() -> an object providing a view on D's values | | ---------------------------------------------------------------------- | Class methods inherited from builtins.dict: | | fromkeys(iterable, value=None, /) | Create a new dictionary with keys from iterable and values set to value. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.dict: | | __new__(*args, **kwargs) class method of builtins.dict | Create and return a new object. See help(type) for accurate signature.
http.cookies.SimpleCookie
Python Library Documentation: class SimpleCookie in module http.cookies class SimpleCookie(BaseCookie) | SimpleCookie(input=None) | | SimpleCookie supports strings as cookie values. When setting | the value using the dictionary assignment notation, SimpleCookie | calls the builtin str() to convert the value to a string. Values | received from HTTP are kept as strings. | | Method resolution order: | SimpleCookie | BaseCookie | builtins.dict | builtins.object | | Methods defined here: | | value_decode(self, val) | real_value, coded_value = value_decode(STRING) | Called prior to setting a cookie's value from the network | representation. The VALUE is the value read from HTTP | header. | Override this function to modify the behavior of cookies. | | value_encode(self, val) | real_value, coded_value = value_encode(VALUE) | Called prior to setting a cookie's value from the dictionary | representation. The VALUE is the value being assigned. | Override this function to modify the behavior of cookies. | | ---------------------------------------------------------------------- | Methods inherited from BaseCookie: | | __init__(self, input=None) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | __setitem__(self, key, value) | Dictionary style assignment. | | __str__ = output(self, attrs=None, header='Set-Cookie:', sep='\r\n') | | js_output(self, attrs=None) | Return a string suitable for JavaScript. | | load(self, rawdata) | Load cookies from a string (presumably HTTP_COOKIE) or | from a dictionary. Loading cookies from a dictionary 'd' | is equivalent to calling: | map(Cookie.__setitem__, d.keys(), d.values()) | | output(self, attrs=None, header='Set-Cookie:', sep='\r\n') | Return a string suitable for HTTP. | | ---------------------------------------------------------------------- | Data descriptors inherited from BaseCookie: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.dict: | | __contains__(self, key, /) | True if the dictionary has the specified key, else False. | | __delitem__(self, key, /) | Delete self[key]. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, key, /) | Return self[key]. | | __gt__(self, value, /) | Return self>value. | | __ior__(self, value, /) | Return self|=value. | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __or__(self, value, /) | Return self|value. | | __reversed__(self, /) | Return a reverse iterator over the dict keys. | | __ror__(self, value, /) | Return value|self. | | __sizeof__(...) | D.__sizeof__() -> size of D in memory, in bytes | | clear(...) | D.clear() -> None. Remove all items from D. | | copy(...) | D.copy() -> a shallow copy of D | | get(self, key, default=None, /) | Return the value for key if key is in the dictionary, else default. | | items(...) | D.items() -> a set-like object providing a view on D's items | | keys(...) | D.keys() -> a set-like object providing a view on D's keys | | pop(...) | D.pop(k[,d]) -> v, remove specified key and return the corresponding value. | | If the key is not found, return the default if given; otherwise, | raise a KeyError. | | popitem(self, /) | Remove and return a (key, value) pair as a 2-tuple. | | Pairs are returned in LIFO (last-in, first-out) order. | Raises KeyError if the dict is empty. | | setdefault(self, key, default=None, /) | Insert key with a value of default if key is not in the dictionary. | | Return the value for key if key is in the dictionary, else default. | | update(...) | D.update([E, ]**F) -> None. Update D from dict/iterable E and F. | If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] | If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v | In either case, this is followed by: for k in F: D[k] = F[k] | | values(...) | D.values() -> an object providing a view on D's values | | ---------------------------------------------------------------------- | Class methods inherited from builtins.dict: | | __class_getitem__(...) | See PEP 585 | | fromkeys(iterable, value=None, /) | Create a new dictionary with keys from iterable and values set to value. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.dict: | | __new__(*args, **kwargs) class method of builtins.dict | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes inherited from builtins.dict: | | __hash__ = None
http.cookies.re
Python Library Documentation: package re
NAME
re - Support for regular expressions (RE).
MODULE REFERENCE
https://docs.python.org/3.12/library/re.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides regular expression matching operations similar to
those found in Perl. It supports both 8-bit and Unicode strings; both
the pattern and the strings being processed can contain null bytes and
characters outside the US ASCII range.
Regular expressions can contain both special and ordinary characters.
Most ordinary characters, like "A", "a", or "0", are the simplest
regular expressions; they simply match themselves. You can
concatenate ordinary characters, so last matches the string 'last'.
The special characters are:
"." Matches any character except a newline.
"^" Matches the start of the string.
"$" Matches the end of the string or just before the newline at
the end of the string.
"*" Matches 0 or more (greedy) repetitions of the preceding RE.
Greedy means that it will match as many repetitions as possible.
"+" Matches 1 or more (greedy) repetitions of the preceding RE.
"?" Matches 0 or 1 (greedy) of the preceding RE.
*?,+?,?? Non-greedy versions of the previous three special characters.
{m,n} Matches from m to n repetitions of the preceding RE.
{m,n}? Non-greedy version of the above.
"\\" Either escapes special characters or signals a special sequence.
[] Indicates a set of characters.
A "^" as the first character indicates a complementing set.
"|" A|B, creates an RE that will match either A or B.
(...) Matches the RE inside the parentheses.
The contents can be retrieved or matched later in the string.
(?aiLmsux) The letters set the corresponding flags defined below.
(?:...) Non-grouping version of regular parentheses.
(?P<name>...) The substring matched by the group is accessible by name.
(?P=name) Matches the text matched earlier by the group named name.
(?#...) A comment; ignored.
(?=...) Matches if ... matches next, but doesn't consume the string.
(?!...) Matches if ... doesn't match next.
(?<=...) Matches if preceded by ... (must be fixed length).
(?<!...) Matches if not preceded by ... (must be fixed length).
(?(id/name)yes|no) Matches yes pattern if the group with id/name matched,
the (optional) no pattern otherwise.
The special sequences consist of "\\" and a character from the list
below. If the ordinary character is not on the list, then the
resulting RE will match the second character.
\number Matches the contents of the group of the same number.
\A Matches only at the start of the string.
\Z Matches only at the end of the string.
\b Matches the empty string, but only at the start or end of a word.
\B Matches the empty string, but not at the start or end of a word.
\d Matches any decimal digit; equivalent to the set [0-9] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode digits.
\D Matches any non-digit character; equivalent to [^\d].
\s Matches any whitespace character; equivalent to [ \t\n\r\f\v] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode whitespace characters.
\S Matches any non-whitespace character; equivalent to [^\s].
\w Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]
in bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the
range of Unicode alphanumeric characters (letters plus digits
plus underscore).
With LOCALE, it will match the set [0-9_] plus characters defined
as letters for the current locale.
\W Matches the complement of \w.
\\ Matches a literal backslash.
This module exports the following functions:
match Match a regular expression pattern to the beginning of a string.
fullmatch Match a regular expression pattern to all of a string.
search Search a string for the presence of a pattern.
sub Substitute occurrences of a pattern found in a string.
subn Same as sub, but also return the number of substitutions made.
split Split a string by the occurrences of a pattern.
findall Find all occurrences of a pattern in a string.
finditer Return an iterator yielding a Match object for each match.
compile Compile a pattern into a Pattern object.
purge Clear the regular expression cache.
escape Backslash all non-alphanumerics in a string.
Each function other than purge and escape can take an optional 'flags' argument
consisting of one or more of the following module constants, joined by "|".
A, L, and U are mutually exclusive.
A ASCII For string patterns, make \w, \W, \b, \B, \d, \D
match the corresponding ASCII character categories
(rather than the whole Unicode categories, which is the
default).
For bytes patterns, this flag is the only available
behaviour and needn't be specified.
I IGNORECASE Perform case-insensitive matching.
L LOCALE Make \w, \W, \b, \B, dependent on the current locale.
M MULTILINE "^" matches the beginning of lines (after a newline)
as well as the string.
"$" matches the end of lines (before a newline) as well
as the end of the string.
S DOTALL "." matches any character at all, including the newline.
X VERBOSE Ignore whitespace and comments for nicer looking RE's.
U UNICODE For compatibility only. Ignored for string patterns (it
is the default), and forbidden for bytes patterns.
This module also defines an exception 'error'.
PACKAGE CONTENTS
_casefix
_compiler
_constants
_parser
CLASSES
builtins.Exception(builtins.BaseException)
error
builtins.object
Match
Pattern
enum.IntFlag(builtins.int, enum.ReprEnum, enum.Flag)
RegexFlag
class Match(builtins.object)
| The result of re.match() and re.search().
| Match objects always have a boolean value of True.
|
| Methods defined here:
|
| __copy__(self, /)
|
| __deepcopy__(self, memo, /)
|
| __getitem__(self, key, /)
| Return self[key].
|
| __repr__(self, /)
| Return repr(self).
|
| end(self, group=0, /)
| Return index of the end of the substring matched by group.
|
| expand(self, /, template)
| Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.
|
| group(...)
| group([group1, ...]) -> str or tuple.
| Return subgroup(s) of the match by indices or names.
| For 0 returns the entire match.
|
| groupdict(self, /, default=None)
| Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
|
| default
| Is used for groups that did not participate in the match.
|
| groups(self, /, default=None)
| Return a tuple containing all the subgroups of the match, from 1.
|
| default
| Is used for groups that did not participate in the match.
|
| span(self, group=0, /)
| For match object m, return the 2-tuple (m.start(group), m.end(group)).
|
| start(self, group=0, /)
| Return index of the start of the substring matched by group.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| endpos
| The index into the string beyond which the RE engine will not go.
|
| lastgroup
| The name of the last matched capturing group.
|
| lastindex
| The integer index of the last matched capturing group.
|
| pos
| The index into the string at which the RE engine started looking for a match.
|
| re
| The regular expression object.
|
| regs
|
| string
| The string passed to match() or search().
class Pattern(builtins.object)
| Compiled regular expression object.
|
| Methods defined here:
|
| __copy__(self, /)
|
| __deepcopy__(self, memo, /)
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| findall(self, /, string, pos=0, endpos=9223372036854775807)
| Return a list of all non-overlapping matches of pattern in string.
|
| finditer(self, /, string, pos=0, endpos=9223372036854775807)
| Return an iterator over all non-overlapping matches for the RE pattern in string.
|
| For each match, the iterator returns a match object.
|
| fullmatch(self, /, string, pos=0, endpos=9223372036854775807)
| Matches against all of the string.
|
| match(self, /, string, pos=0, endpos=9223372036854775807)
| Matches zero or more characters at the beginning of the string.
|
| scanner(self, /, string, pos=0, endpos=9223372036854775807)
|
| search(self, /, string, pos=0, endpos=9223372036854775807)
| Scan through string looking for a match, and return a corresponding match object instance.
|
| Return None if no position in the string matches.
|
| split(self, /, string, maxsplit=0)
| Split string by the occurrences of pattern.
|
| sub(self, /, repl, string, count=0)
| Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
|
| subn(self, /, repl, string, count=0)
| Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| flags
| The regex matching flags.
|
| groupindex
| A dictionary mapping group names to group numbers.
|
| groups
| The number of capturing groups in the pattern.
|
| pattern
| The pattern string from which the RE object was compiled.
class RegexFlag(enum.IntFlag)
| RegexFlag(*values)
|
| An enumeration.
|
| Method resolution order:
| RegexFlag
| enum.IntFlag
| builtins.int
| enum.ReprEnum
| enum.Flag
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __and__(self, other) from enum.Flag
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __invert__(self) from enum.Flag
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __or__(self, other) from enum.Flag
| Return self|value.
|
| __rand__ = __and__(self, other)
|
| __repr__ = global_flag_repr(self) from enum
| use module.flag_name instead of class.flag_name
|
| the module is the last module in case of a multi-module name
|
| __ror__ = __or__(self, other)
|
| __rxor__ = __xor__(self, other)
|
| __str__(self, /) from builtins.object
| Return str(self).
|
| __xor__(self, other) from enum.Flag
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ASCII = re.ASCII
|
| DEBUG = re.DEBUG
|
| DOTALL = re.DOTALL
|
| IGNORECASE = re.IGNORECASE
|
| LOCALE = re.LOCALE
|
| MULTILINE = re.MULTILINE
|
| TEMPLATE = re.TEMPLATE
|
| UNICODE = re.UNICODE
|
| VERBOSE = re.VERBOSE
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Flag:
|
| __contains__(self, other)
| Returns True if self has at least the same flags set as other.
|
| __iter__(self)
| Returns flags in definition order.
|
| __len__(self)
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __getitem__(name)
| Return the member matching `name`.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class error(builtins.Exception)
| error(msg, pattern=None, pos=None)
|
| Exception raised for invalid regular expressions.
|
| Attributes:
|
| msg: The unformatted error message
| pattern: The regular expression pattern
| pos: The index in the pattern where compilation failed (may be None)
| lineno: The line corresponding to pos (may be None)
| colno: The column corresponding to pos (may be None)
|
| Method resolution order:
| error
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, msg, pattern=None, pos=None) from re._constants.error
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
compile(pattern, flags=0)
Compile a regular expression pattern, returning a Pattern object.
escape(pattern)
Escape special characters in a string.
findall(pattern, string, flags=0)
Return a list of all non-overlapping matches in the string.
If one or more capturing groups are present in the pattern, return
a list of groups; this will be a list of tuples if the pattern
has more than one group.
Empty matches are included in the result.
finditer(pattern, string, flags=0)
Return an iterator over all non-overlapping matches in the
string. For each match, the iterator returns a Match object.
Empty matches are included in the result.
fullmatch(pattern, string, flags=0)
Try to apply the pattern to all of the string, returning
a Match object, or None if no match was found.
match(pattern, string, flags=0)
Try to apply the pattern at the start of the string, returning
a Match object, or None if no match was found.
purge()
Clear the regular expression caches
search(pattern, string, flags=0)
Scan through string looking for a match to the pattern, returning
a Match object, or None if no match was found.
split(pattern, string, maxsplit=0, flags=0)
Split the source string by the occurrences of the pattern,
returning a list containing the resulting substrings. If
capturing parentheses are used in pattern, then the text of all
groups in the pattern are also returned as part of the resulting
list. If maxsplit is nonzero, at most maxsplit splits occur,
and the remainder of the string is returned as the final element
of the list.
sub(pattern, repl, string, count=0, flags=0)
Return the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in string by the
replacement repl. repl can be either a string or a callable;
if a string, backslash escapes in it are processed. If it is
a callable, it's passed the Match object and must return
a replacement string to be used.
subn(pattern, repl, string, count=0, flags=0)
Return a 2-tuple containing (new_string, number).
new_string is the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in the source
string by the replacement repl. number is the number of
substitutions that were made. repl can be either a string or a
callable; if a string, backslash escapes in it are processed.
If it is a callable, it's passed the Match object and must
return a replacement string to be used.
template(pattern, flags=0)
Compile a template pattern, returning a Pattern object, deprecated
DATA
A = re.ASCII
ASCII = re.ASCII
DOTALL = re.DOTALL
I = re.IGNORECASE
IGNORECASE = re.IGNORECASE
L = re.LOCALE
LOCALE = re.LOCALE
M = re.MULTILINE
MULTILINE = re.MULTILINE
NOFLAG = re.NOFLAG
S = re.DOTALL
U = re.UNICODE
UNICODE = re.UNICODE
VERBOSE = re.VERBOSE
X = re.VERBOSE
__all__ = ['match', 'fullmatch', 'search', 'sub', 'subn', 'split', 'fi...
VERSION
2.2.1
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\re\__init__.py
http.cookies.string
Python Library Documentation: module string
NAME
string - A collection of string constants.
MODULE REFERENCE
https://docs.python.org/3.12/library/string.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
Public module variables:
whitespace -- a string containing all ASCII whitespace
ascii_lowercase -- a string containing all ASCII lowercase letters
ascii_uppercase -- a string containing all ASCII uppercase letters
ascii_letters -- a string containing all ASCII letters
digits -- a string containing all ASCII decimal digits
hexdigits -- a string containing all ASCII hexadecimal digits
octdigits -- a string containing all ASCII octal digits
punctuation -- a string containing all ASCII punctuation characters
printable -- a string containing all ASCII characters considered printable
CLASSES
builtins.object
Formatter
Template
class Formatter(builtins.object)
| Methods defined here:
|
| check_unused_args(self, used_args, args, kwargs)
|
| convert_field(self, value, conversion)
|
| format(self, format_string, /, *args, **kwargs)
|
| format_field(self, value, format_spec)
|
| get_field(self, field_name, args, kwargs)
| # given a field_name, find the object it references.
| # field_name: the field being looked up, e.g. "0.name"
| # or "lookup[3]"
| # used_args: a set of which args have been used
| # args, kwargs: as passed in to vformat
|
| get_value(self, key, args, kwargs)
|
| parse(self, format_string)
| # returns an iterable that contains tuples of the form:
| # (literal_text, field_name, format_spec, conversion)
| # literal_text can be zero length
| # field_name can be None, in which case there's no
| # object to format and output
| # if field_name is not None, it is looked up, formatted
| # with format_spec and conversion and then used
|
| vformat(self, format_string, args, kwargs)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class Template(builtins.object)
| Template(template)
|
| A string class for supporting $-substitutions.
|
| Methods defined here:
|
| __init__(self, template)
| Initialize self. See help(type(self)) for accurate signature.
|
| get_identifiers(self)
|
| is_valid(self)
|
| safe_substitute(self, mapping={}, /, **kws)
|
| substitute(self, mapping={}, /, **kws)
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __init_subclass__()
| This method is called when a class is subclassed.
|
| The default implementation does nothing. It may be
| overridden to extend subclasses.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| braceidpattern = None
|
| delimiter = '$'
|
| flags = re.IGNORECASE
|
| idpattern = '(?a:[_a-z][_a-z0-9]*)'
|
| pattern = re.compile('\n \\$(?:\n ...identifie...
FUNCTIONS
capwords(s, sep=None)
capwords(s [,sep]) -> string
Split the argument into words using split, capitalize each
word using capitalize, and join the capitalized words using
join. If the optional second argument sep is absent or None,
runs of whitespace characters are replaced by a single space
and leading and trailing whitespace are removed, otherwise
sep is used to split and join the words.
DATA
__all__ = ['ascii_letters', 'ascii_lowercase', 'ascii_uppercase', 'cap...
ascii_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
digits = '0123456789'
hexdigits = '0123456789abcdefABCDEF'
octdigits = '01234567'
printable = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU...
punctuation = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
whitespace = ' \t\n\r\x0b\x0c'
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\string.py
http.cookies.types
Python Library Documentation: module types
NAME
types - Define names for built-in types that aren't directly accessible as a builtin.
MODULE REFERENCE
https://docs.python.org/3.12/library/types.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
CLASSES
builtins.object
builtins.NoneType
builtins.NotImplementedType
builtins.async_generator
builtins.builtin_function_or_method
builtins.cell
builtins.classmethod_descriptor
builtins.code
builtins.coroutine
builtins.ellipsis
builtins.frame
builtins.function
builtins.generator
builtins.getset_descriptor
builtins.mappingproxy
builtins.member_descriptor
builtins.method
builtins.method-wrapper
builtins.method_descriptor
builtins.module
builtins.traceback
builtins.wrapper_descriptor
DynamicClassAttribute
GenericAlias
SimpleNamespace
UnionType
AsyncGeneratorType = class async_generator(object)
| Methods defined here:
|
| __aiter__(self, /)
| Return an awaitable, that resolves in asynchronous iterator.
|
| __anext__(self, /)
| Return a value or raise StopAsyncIteration.
|
| __del__(...)
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(...)
| gen.__sizeof__() -> size of gen in memory, in bytes
|
| aclose(...)
| aclose() -> raise GeneratorExit inside generator.
|
| asend(...)
| asend(v) -> send 'v' in generator.
|
| athrow(...)
| athrow(value)
| athrow(type[,value[,tb]])
|
| raise exception in generator.
| the (type, val, tb) signature is deprecated,
| and may be removed in a future version of Python.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| ag_await
| object being awaited on, or None
|
| ag_code
|
| ag_frame
|
| ag_running
|
| ag_suspended
BuiltinFunctionType = class builtin_function_or_method(object)
| Built-in subclasses:
| builtin_method
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __self__
|
| __text_signature__
BuiltinMethodType = class builtin_function_or_method(object)
| Built-in subclasses:
| builtin_method
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __self__
|
| __text_signature__
CellType = class cell(object)
| Create a new cell object.
|
| contents
| the contents of the cell. If not specified, the cell will be empty,
| and
| further attempts to access its cell_contents attribute will
| raise a ValueError.
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| cell_contents
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
ClassMethodDescriptorType = class classmethod_descriptor(object)
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __objclass__
|
| __text_signature__
CodeType = class code(object)
| CodeType(argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, qualname, firstlineno, linetable, exceptiontable, freevars=(), cellvars=(), /)
|
| Create a code object. Not for the faint of heart.
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(...)
| Size of object in memory, in bytes.
|
| co_lines(...)
|
| co_positions(...)
|
| replace(self, /, **changes)
| Return a copy of the code object with new values for the specified fields.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| co_argcount
|
| co_cellvars
|
| co_code
|
| co_consts
|
| co_exceptiontable
|
| co_filename
|
| co_firstlineno
|
| co_flags
|
| co_freevars
|
| co_kwonlyargcount
|
| co_linetable
|
| co_lnotab
|
| co_name
|
| co_names
|
| co_nlocals
|
| co_posonlyargcount
|
| co_qualname
|
| co_stacksize
|
| co_varnames
CoroutineType = class coroutine(object)
| Methods defined here:
|
| __await__(self, /)
| Return an iterator to be used in await expression.
|
| __del__(...)
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(...)
| gen.__sizeof__() -> size of gen in memory, in bytes
|
| close(...)
| close() -> raise GeneratorExit inside coroutine.
|
| send(...)
| send(arg) -> send 'arg' into coroutine,
| return next iterated value or raise StopIteration.
|
| throw(...)
| throw(value)
| throw(type[,value[,traceback]])
|
| Raise exception in coroutine, return next iterated value or raise
| StopIteration.
| the (type, val, tb) signature is deprecated,
| and may be removed in a future version of Python.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| cr_await
| object being awaited on, or None
|
| cr_code
|
| cr_frame
|
| cr_origin
|
| cr_running
|
| cr_suspended
class DynamicClassAttribute(builtins.object)
| DynamicClassAttribute(fget=None, fset=None, fdel=None, doc=None)
|
| Route attribute access on a class to __getattr__.
|
| This is a descriptor, used to define attributes that act differently when
| accessed through an instance and through a class. Instance access remains
| normal, but access to an attribute through a class will be routed to the
| class's __getattr__ method; this is done by raising AttributeError.
|
| This allows one to have properties active on an instance, and have virtual
| attributes on the class with the same name. (Enum used this between Python
| versions 3.4 - 3.9 .)
|
| Subclass from this to use a different method of accessing virtual attributes
| and still be treated properly by the inspect module. (Enum uses this since
| Python 3.10 .)
|
| Methods defined here:
|
| __delete__(self, instance)
|
| __get__(self, instance, ownerclass=None)
|
| __init__(self, fget=None, fset=None, fdel=None, doc=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __set__(self, instance, value)
|
| deleter(self, fdel)
|
| getter(self, fget)
|
| setter(self, fset)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
EllipsisType = class ellipsis(object)
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
FrameType = class frame(object)
| Methods defined here:
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(...)
| F.__sizeof__() -> size of F in memory, in bytes
|
| clear(...)
| F.clear(): clear most references held by the frame
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| f_back
|
| f_builtins
|
| f_code
|
| f_globals
|
| f_lasti
|
| f_lineno
|
| f_locals
|
| f_trace
|
| f_trace_lines
|
| f_trace_opcodes
FunctionType = class function(object)
| FunctionType(code, globals, name=None, argdefs=None, closure=None)
|
| Create a function object.
|
| code
| a code object
| globals
| the globals dictionary
| name
| a string that overrides the name from the code object
| argdefs
| a tuple that specifies the default argument values
| closure
| a tuple that supplies the bindings for free variables
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __annotations__
|
| __closure__
|
| __code__
|
| __defaults__
|
| __dict__
|
| __globals__
|
| __kwdefaults__
|
| __type_params__
GeneratorType = class generator(object)
| Methods defined here:
|
| __del__(...)
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __repr__(self, /)
| Return repr(self).
|
| __sizeof__(...)
| gen.__sizeof__() -> size of gen in memory, in bytes
|
| close(...)
| close() -> raise GeneratorExit inside generator.
|
| send(...)
| send(arg) -> send 'arg' into generator,
| return next yielded value or raise StopIteration.
|
| throw(...)
| throw(value)
| throw(type[,value[,tb]])
|
| Raise exception in generator, return next yielded value or raise
| StopIteration.
| the (type, val, tb) signature is deprecated,
| and may be removed in a future version of Python.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| gi_code
|
| gi_frame
|
| gi_running
|
| gi_suspended
|
| gi_yieldfrom
| object being iterated by yield from, or None
class GenericAlias(builtins.object)
| Represent a PEP 585 generic type
|
| E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __dir__(...)
| Default dir() implementation.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __instancecheck__(...)
| Check if an object is an instance.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mro_entries__(...)
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __ror__(self, value, /)
| Return value|self.
|
| __subclasscheck__(...)
| Check if a class is a subclass.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __args__
|
| __origin__
|
| __parameters__
| Type variables in the GenericAlias.
|
| __typing_unpacked_tuple_args__
|
| __unpacked__
GetSetDescriptorType = class getset_descriptor(object)
| Methods defined here:
|
| __delete__(self, instance, /)
| Delete an attribute of instance.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __repr__(self, /)
| Return repr(self).
|
| __set__(self, instance, value, /)
| Set an attribute of instance to value.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __objclass__
LambdaType = class function(object)
| LambdaType(code, globals, name=None, argdefs=None, closure=None)
|
| Create a function object.
|
| code
| a code object
| globals
| the globals dictionary
| name
| a string that overrides the name from the code object
| argdefs
| a tuple that specifies the default argument values
| closure
| a tuple that supplies the bindings for free variables
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __annotations__
|
| __closure__
|
| __code__
|
| __defaults__
|
| __dict__
|
| __globals__
|
| __kwdefaults__
|
| __type_params__
MappingProxyType = class mappingproxy(object)
| Methods defined here:
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(...)
| D.__reversed__() -> reverse iterator
|
| __ror__(self, value, /)
| Return value|self.
|
| __str__(self, /)
| Return str(self).
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| get(...)
| D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
MemberDescriptorType = class member_descriptor(object)
| Methods defined here:
|
| __delete__(self, instance, /)
| Delete an attribute of instance.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __set__(self, instance, value, /)
| Set an attribute of instance to value.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __objclass__
MethodDescriptorType = class method_descriptor(object)
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __objclass__
|
| __text_signature__
MethodType = class method(object)
| MethodType(function, instance, /)
|
| Create a bound instance method object.
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(self, /)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __func__
| the function (or other callable) implementing a method
|
| __self__
| the instance to which a method is bound
MethodWrapperType = class method-wrapper(object)
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __objclass__
|
| __self__
|
| __text_signature__
ModuleType = class module(object)
| ModuleType(name, doc=None)
|
| Create a module object.
|
| The name must be a string; the optional doc argument can have any type.
|
| Methods defined here:
|
| __dir__(...)
| __dir__() -> list
| specialized dir() implementation
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __annotations__
|
| __dict__
class NoneType(object)
| Methods defined here:
|
| __bool__(self, /)
| True if self else False
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class NotImplementedType(object)
| Methods defined here:
|
| __bool__(self, /)
| True if self else False
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class SimpleNamespace(builtins.object)
| A simple attribute-based namespace.
|
| SimpleNamespace(**kwargs)
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| Return state information for pickling
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
TracebackType = class traceback(object)
| TracebackType(tb_next, tb_frame, tb_lasti, tb_lineno)
| --
|
| Create a new traceback object.
|
| Methods defined here:
|
| __dir__(...)
| Default dir() implementation.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| tb_frame
|
| tb_lasti
|
| tb_lineno
|
| tb_next
class UnionType(builtins.object)
| Represent a PEP 604 union type
|
| E.g. for int | str
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __repr__(self, /)
| Return repr(self).
|
| __ror__(self, value, /)
| Return value|self.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __args__
|
| __parameters__
| Type variables in the types.UnionType.
WrapperDescriptorType = class wrapper_descriptor(object)
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __objclass__
|
| __text_signature__
FUNCTIONS
coroutine(func)
Convert regular generator function to a coroutine.
get_original_bases(cls, /)
Return the class's "original" bases prior to modification by `__mro_entries__`.
Examples::
from typing import TypeVar, Generic, NamedTuple, TypedDict
T = TypeVar("T")
class Foo(Generic[T]): ...
class Bar(Foo[int], float): ...
class Baz(list[str]): ...
Eggs = NamedTuple("Eggs", [("a", int), ("b", str)])
Spam = TypedDict("Spam", {"a": int, "b": str})
assert get_original_bases(Bar) == (Foo[int], float)
assert get_original_bases(Baz) == (list[str],)
assert get_original_bases(Eggs) == (NamedTuple,)
assert get_original_bases(Spam) == (TypedDict,)
assert get_original_bases(int) == (object,)
new_class(name, bases=(), kwds=None, exec_body=None)
Create a class object dynamically using the appropriate metaclass.
prepare_class(name, bases=(), kwds=None)
Call the __prepare__ method of the appropriate metaclass.
Returns (metaclass, namespace, kwds) as a 3-tuple
*metaclass* is the appropriate metaclass
*namespace* is the prepared class namespace
*kwds* is an updated copy of the passed in kwds argument with any
'metaclass' entry removed. If no kwds argument is passed in, this will
be an empty dict.
resolve_bases(bases)
Resolve MRO entries dynamically as specified by PEP 560.
DATA
__all__ = ['FunctionType', 'LambdaType', 'CodeType', 'MappingProxyType...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\types.py
http.cookiejar.Absent
Python Library Documentation: class Absent in module http.cookiejar class Absent(builtins.object) | # Used as second parameter to dict.get() method, to distinguish absent | # dict key from one with a None value. | | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
http.cookiejar.Cookie
Python Library Documentation: class Cookie in module http.cookiejar
class Cookie(builtins.object)
| Cookie(version, name, value, port, port_specified, domain, domain_specified, domain_initial_dot, path, path_specified, secure, expires, discard, comment, comment_url, rest, rfc2109=False)
|
| HTTP Cookie.
|
| This class represents both Netscape and RFC 2965 cookies.
|
| This is deliberately a very simple class. It just holds attributes. It's
| possible to construct Cookie instances that don't comply with the cookie
| standards. CookieJar.make_cookies is the factory function for Cookie
| objects -- it deals with cookie parsing, supplying defaults, and
| normalising to the representation used in this class. CookiePolicy is
| responsible for checking them to see whether they should be accepted from
| and returned to the server.
|
| Note that the port may be present in the headers, but unspecified ("Port"
| rather than"Port=80", for example); if this is the case, port is None.
|
| Methods defined here:
|
| __init__(self, version, name, value, port, port_specified, domain, domain_specified, domain_initial_dot, path, path_specified, secure, expires, discard, comment, comment_url, rest, rfc2109=False)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| get_nonstandard_attr(self, name, default=None)
|
| has_nonstandard_attr(self, name)
|
| is_expired(self, now=None)
|
| set_nonstandard_attr(self, name, value)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
http.cookiejar.CookieJar
Python Library Documentation: class CookieJar in module http.cookiejar
class CookieJar(builtins.object)
| CookieJar(policy=None)
|
| Collection of HTTP cookies.
|
| You may not need to know about this class: try
| urllib.request.build_opener(HTTPCookieProcessor).open(url).
|
| Methods defined here:
|
| __init__(self, policy=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self)
|
| __len__(self)
| Return number of contained cookies.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| add_cookie_header(self, request)
| Add correct Cookie: header to request (urllib.request.Request object).
|
| The Cookie2 header is also added unless policy.hide_cookie2 is true.
|
| clear(self, domain=None, path=None, name=None)
| Clear some cookies.
|
| Invoking this method without arguments will clear all cookies. If
| given a single argument, only cookies belonging to that domain will be
| removed. If given two arguments, cookies belonging to the specified
| path within that domain are removed. If given three arguments, then
| the cookie with the specified name, path and domain is removed.
|
| Raises KeyError if no matching cookie exists.
|
| clear_expired_cookies(self)
| Discard all expired cookies.
|
| You probably don't need to call this method: expired cookies are never
| sent back to the server (provided you're using DefaultCookiePolicy),
| this method is called by CookieJar itself every so often, and the
| .save() method won't save expired cookies anyway (unless you ask
| otherwise by passing a true ignore_expires argument).
|
| clear_session_cookies(self)
| Discard all session cookies.
|
| Note that the .save() method won't save session cookies anyway, unless
| you ask otherwise by passing a true ignore_discard argument.
|
| extract_cookies(self, response, request)
| Extract cookies from response, where allowable given the request.
|
| make_cookies(self, response, request)
| Return sequence of Cookie objects extracted from response object.
|
| set_cookie(self, cookie)
| Set a cookie, without checking whether or not it should be set.
|
| set_cookie_if_ok(self, cookie, request)
| Set a cookie if policy says it's OK to do so.
|
| set_policy(self, policy)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| domain_re = re.compile('[^.]*')
|
| dots_re = re.compile('^\\.+')
|
| magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
|
| non_word_re = re.compile('\\W')
|
| quote_re = re.compile('([\\"\\\\])')
|
| strict_domain_re = re.compile('\\.?[^.]*')
http.cookiejar.CookiePolicy
Python Library Documentation: class CookiePolicy in module http.cookiejar class CookiePolicy(builtins.object) | Defines which cookies get accepted from and returned to server. | | May also modify cookies, though this is probably a bad idea. | | The subclass DefaultCookiePolicy defines the standard rules for Netscape | and RFC 2965 cookies -- override that if you want a customized policy. | | Methods defined here: | | domain_return_ok(self, domain, request) | Return false if cookies should not be returned, given cookie domain. | | path_return_ok(self, path, request) | Return false if cookies should not be returned, given cookie path. | | return_ok(self, cookie, request) | Return true if (and only if) cookie should be returned to server. | | set_ok(self, cookie, request) | Return true if (and only if) cookie should be accepted from server. | | Currently, pre-expired cookies never get this far -- the CookieJar | class deletes such cookies itself. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
http.cookiejar.DAYS
Python Library Documentation: list object class list(object) | list(iterable=(), /) | | Built-in mutable sequence. | | If no argument is given, the constructor creates a new empty list. | The argument must be an iterable if specified. | | Methods defined here: | | __add__(self, value, /) | Return self+value. | | __contains__(self, key, /) | Return bool(key in self). | | __delitem__(self, key, /) | Delete self[key]. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, index, /) | Return self[index]. | | __gt__(self, value, /) | Return self>value. | | __iadd__(self, value, /) | Implement self+=value. | | __imul__(self, value, /) | Implement self*=value. | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | __reversed__(self, /) | Return a reverse iterator over the list. | | __rmul__(self, value, /) | Return value*self. | | __setitem__(self, key, value, /) | Set self[key] to value. | | __sizeof__(self, /) | Return the size of the list in memory, in bytes. | | append(self, object, /) | Append object to the end of the list. | | clear(self, /) | Remove all items from list. | | copy(self, /) | Return a shallow copy of the list. | | count(self, value, /) | Return number of occurrences of value. | | extend(self, iterable, /) | Extend list by appending elements from the iterable. | | index(self, value, start=0, stop=9223372036854775807, /) | Return first index of value. | | Raises ValueError if the value is not present. | | insert(self, index, object, /) | Insert object before index. | | pop(self, index=-1, /) | Remove and return item at index (default last). | | Raises IndexError if list is empty or index is out of range. | | remove(self, value, /) | Remove first occurrence of value. | | Raises ValueError if the value is not present. | | reverse(self, /) | Reverse *IN PLACE*. | | sort(self, /, *, key=None, reverse=False) | Sort the list in ascending order and return None. | | The sort is in-place (i.e. the list itself is modified) and stable (i.e. the | order of two equal elements is maintained). | | If a key function is given, apply it once to each list item and sort them, | ascending or descending, according to their function values. | | The reverse flag can be set to sort in descending order. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None
http.cookiejar.DEFAULT_HTTP_PORT
Error rendering doc: No Python documentation found for '80'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
http.cookiejar.DefaultCookiePolicy
Python Library Documentation: class DefaultCookiePolicy in module http.cookiejar
class DefaultCookiePolicy(CookiePolicy)
| DefaultCookiePolicy(blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False, rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False, strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False, strict_ns_domain=0, strict_ns_set_initial_dollar=False, strict_ns_set_path=False, secure_protocols=('https', 'wss'))
|
| Implements the standard rules for accepting and returning cookies.
|
| Method resolution order:
| DefaultCookiePolicy
| CookiePolicy
| builtins.object
|
| Methods defined here:
|
| __init__(self, blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False, rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False, strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False, strict_ns_domain=0, strict_ns_set_initial_dollar=False, strict_ns_set_path=False, secure_protocols=('https', 'wss'))
| Constructor arguments should be passed as keyword arguments only.
|
| allowed_domains(self)
| Return None, or the sequence of allowed domains (as a tuple).
|
| blocked_domains(self)
| Return the sequence of blocked domains (as a tuple).
|
| domain_return_ok(self, domain, request)
| Return false if cookies should not be returned, given cookie domain.
|
| is_blocked(self, domain)
|
| is_not_allowed(self, domain)
|
| path_return_ok(self, path, request)
| Return false if cookies should not be returned, given cookie path.
|
| return_ok(self, cookie, request)
| If you override .return_ok(), be sure to call this method. If it
| returns false, so should your subclass (assuming your subclass wants to
| be more strict about which cookies to return).
|
| return_ok_domain(self, cookie, request)
|
| return_ok_expires(self, cookie, request)
|
| return_ok_port(self, cookie, request)
|
| return_ok_secure(self, cookie, request)
|
| return_ok_verifiability(self, cookie, request)
|
| return_ok_version(self, cookie, request)
|
| set_allowed_domains(self, allowed_domains)
| Set the sequence of allowed domains, or None.
|
| set_blocked_domains(self, blocked_domains)
| Set the sequence of blocked domains.
|
| set_ok(self, cookie, request)
| If you override .set_ok(), be sure to call this method. If it returns
| false, so should your subclass (assuming your subclass wants to be more
| strict about which cookies to accept).
|
| set_ok_domain(self, cookie, request)
|
| set_ok_name(self, cookie, request)
|
| set_ok_path(self, cookie, request)
|
| set_ok_port(self, cookie, request)
|
| set_ok_verifiability(self, cookie, request)
|
| set_ok_version(self, cookie, request)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| DomainLiberal = 0
|
| DomainRFC2965Match = 4
|
| DomainStrict = 3
|
| DomainStrictNoDots = 1
|
| DomainStrictNonDomain = 2
|
| ----------------------------------------------------------------------
| Data descriptors inherited from CookiePolicy:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
http.cookiejar.EPOCH_YEAR
Python Library Documentation: int object
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
http.cookiejar.ESCAPED_CHAR_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.FileCookieJar
Python Library Documentation: class FileCookieJar in module http.cookiejar
class FileCookieJar(CookieJar)
| FileCookieJar(filename=None, delayload=False, policy=None)
|
| CookieJar that can be loaded from and saved to a file.
|
| Method resolution order:
| FileCookieJar
| CookieJar
| builtins.object
|
| Methods defined here:
|
| __init__(self, filename=None, delayload=False, policy=None)
| Cookies are NOT loaded from the named file until either the .load() or
| .revert() method is called.
|
| load(self, filename=None, ignore_discard=False, ignore_expires=False)
| Load cookies from a file.
|
| revert(self, filename=None, ignore_discard=False, ignore_expires=False)
| Clear all cookies and reload cookies from a saved file.
|
| Raises LoadError (or OSError) if reversion is not successful; the
| object's state will not be altered if this happens.
|
| save(self, filename=None, ignore_discard=False, ignore_expires=False)
| Save cookies to a file.
|
| ----------------------------------------------------------------------
| Methods inherited from CookieJar:
|
| __iter__(self)
|
| __len__(self)
| Return number of contained cookies.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| add_cookie_header(self, request)
| Add correct Cookie: header to request (urllib.request.Request object).
|
| The Cookie2 header is also added unless policy.hide_cookie2 is true.
|
| clear(self, domain=None, path=None, name=None)
| Clear some cookies.
|
| Invoking this method without arguments will clear all cookies. If
| given a single argument, only cookies belonging to that domain will be
| removed. If given two arguments, cookies belonging to the specified
| path within that domain are removed. If given three arguments, then
| the cookie with the specified name, path and domain is removed.
|
| Raises KeyError if no matching cookie exists.
|
| clear_expired_cookies(self)
| Discard all expired cookies.
|
| You probably don't need to call this method: expired cookies are never
| sent back to the server (provided you're using DefaultCookiePolicy),
| this method is called by CookieJar itself every so often, and the
| .save() method won't save expired cookies anyway (unless you ask
| otherwise by passing a true ignore_expires argument).
|
| clear_session_cookies(self)
| Discard all session cookies.
|
| Note that the .save() method won't save session cookies anyway, unless
| you ask otherwise by passing a true ignore_discard argument.
|
| extract_cookies(self, response, request)
| Extract cookies from response, where allowable given the request.
|
| make_cookies(self, response, request)
| Return sequence of Cookie objects extracted from response object.
|
| set_cookie(self, cookie)
| Set a cookie, without checking whether or not it should be set.
|
| set_cookie_if_ok(self, cookie, request)
| Set a cookie if policy says it's OK to do so.
|
| set_policy(self, policy)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from CookieJar:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from CookieJar:
|
| domain_re = re.compile('[^.]*')
|
| dots_re = re.compile('^\\.+')
|
| magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
|
| non_word_re = re.compile('\\W')
|
| quote_re = re.compile('([\\"\\\\])')
|
| strict_domain_re = re.compile('\\.?[^.]*')
http.cookiejar.HEADER_ESCAPE_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.HEADER_JOIN_ESCAPE_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.HEADER_QUOTED_VALUE_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.HEADER_TOKEN_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.HEADER_VALUE_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.HTTPONLY_ATTR
Error rendering doc: No Python documentation found for 'HTTPOnly'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
http.cookiejar.HTTPONLY_PREFIX
Error rendering doc: No Python documentation found for '#HttpOnly_'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
http.cookiejar.HTTP_PATH_SAFE
Error rendering doc: No Python documentation found for "%/;:@&=+$,!~*'()". Use help() to get the interactive help utility. Use help(str) for help on the str class.
http.cookiejar.IPV4_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.ISO_DATE_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.LOOSE_HTTP_DATE_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.LWPCookieJar
Python Library Documentation: class LWPCookieJar in module http.cookiejar
class LWPCookieJar(FileCookieJar)
| LWPCookieJar(filename=None, delayload=False, policy=None)
|
| The LWPCookieJar saves a sequence of "Set-Cookie3" lines.
| "Set-Cookie3" is the format used by the libwww-perl library, not known
| to be compatible with any browser, but which is easy to read and
| doesn't lose information about RFC 2965 cookies.
|
| Additional methods
|
| as_lwp_str(ignore_discard=True, ignore_expired=True)
|
| Method resolution order:
| LWPCookieJar
| FileCookieJar
| CookieJar
| builtins.object
|
| Methods defined here:
|
| as_lwp_str(self, ignore_discard=True, ignore_expires=True)
| Return cookies as a string of "\n"-separated "Set-Cookie3" headers.
|
| ignore_discard and ignore_expires: see docstring for FileCookieJar.save
|
| save(self, filename=None, ignore_discard=False, ignore_expires=False)
| Save cookies to a file.
|
| ----------------------------------------------------------------------
| Methods inherited from FileCookieJar:
|
| __init__(self, filename=None, delayload=False, policy=None)
| Cookies are NOT loaded from the named file until either the .load() or
| .revert() method is called.
|
| load(self, filename=None, ignore_discard=False, ignore_expires=False)
| Load cookies from a file.
|
| revert(self, filename=None, ignore_discard=False, ignore_expires=False)
| Clear all cookies and reload cookies from a saved file.
|
| Raises LoadError (or OSError) if reversion is not successful; the
| object's state will not be altered if this happens.
|
| ----------------------------------------------------------------------
| Methods inherited from CookieJar:
|
| __iter__(self)
|
| __len__(self)
| Return number of contained cookies.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| add_cookie_header(self, request)
| Add correct Cookie: header to request (urllib.request.Request object).
|
| The Cookie2 header is also added unless policy.hide_cookie2 is true.
|
| clear(self, domain=None, path=None, name=None)
| Clear some cookies.
|
| Invoking this method without arguments will clear all cookies. If
| given a single argument, only cookies belonging to that domain will be
| removed. If given two arguments, cookies belonging to the specified
| path within that domain are removed. If given three arguments, then
| the cookie with the specified name, path and domain is removed.
|
| Raises KeyError if no matching cookie exists.
|
| clear_expired_cookies(self)
| Discard all expired cookies.
|
| You probably don't need to call this method: expired cookies are never
| sent back to the server (provided you're using DefaultCookiePolicy),
| this method is called by CookieJar itself every so often, and the
| .save() method won't save expired cookies anyway (unless you ask
| otherwise by passing a true ignore_expires argument).
|
| clear_session_cookies(self)
| Discard all session cookies.
|
| Note that the .save() method won't save session cookies anyway, unless
| you ask otherwise by passing a true ignore_discard argument.
|
| extract_cookies(self, response, request)
| Extract cookies from response, where allowable given the request.
|
| make_cookies(self, response, request)
| Return sequence of Cookie objects extracted from response object.
|
| set_cookie(self, cookie)
| Set a cookie, without checking whether or not it should be set.
|
| set_cookie_if_ok(self, cookie, request)
| Set a cookie if policy says it's OK to do so.
|
| set_policy(self, policy)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from CookieJar:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from CookieJar:
|
| domain_re = re.compile('[^.]*')
|
| dots_re = re.compile('^\\.+')
|
| magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
|
| non_word_re = re.compile('\\W')
|
| quote_re = re.compile('([\\"\\\\])')
|
| strict_domain_re = re.compile('\\.?[^.]*')
http.cookiejar.LoadError
Python Library Documentation: class LoadError in module http.cookiejar class LoadError(builtins.OSError) | # derives from OSError for backwards-compatibility with Python 2.4.0 | | Method resolution order: | LoadError | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) class method of builtins.OSError | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | winerror | Win32 exception code | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
http.cookiejar.MISSING_FILENAME_TEXT
Error rendering doc: No Python documentation found for 'a filename was not supplied (nor was the CookieJar instance initialised with one)'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
http.cookiejar.MONTHS
Python Library Documentation: list object class list(object) | list(iterable=(), /) | | Built-in mutable sequence. | | If no argument is given, the constructor creates a new empty list. | The argument must be an iterable if specified. | | Methods defined here: | | __add__(self, value, /) | Return self+value. | | __contains__(self, key, /) | Return bool(key in self). | | __delitem__(self, key, /) | Delete self[key]. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, index, /) | Return self[index]. | | __gt__(self, value, /) | Return self>value. | | __iadd__(self, value, /) | Implement self+=value. | | __imul__(self, value, /) | Implement self*=value. | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | __reversed__(self, /) | Return a reverse iterator over the list. | | __rmul__(self, value, /) | Return value*self. | | __setitem__(self, key, value, /) | Set self[key] to value. | | __sizeof__(self, /) | Return the size of the list in memory, in bytes. | | append(self, object, /) | Append object to the end of the list. | | clear(self, /) | Remove all items from list. | | copy(self, /) | Return a shallow copy of the list. | | count(self, value, /) | Return number of occurrences of value. | | extend(self, iterable, /) | Extend list by appending elements from the iterable. | | index(self, value, start=0, stop=9223372036854775807, /) | Return first index of value. | | Raises ValueError if the value is not present. | | insert(self, index, object, /) | Insert object before index. | | pop(self, index=-1, /) | Remove and return item at index (default last). | | Raises IndexError if list is empty or index is out of range. | | remove(self, value, /) | Remove first occurrence of value. | | Raises ValueError if the value is not present. | | reverse(self, /) | Reverse *IN PLACE*. | | sort(self, /, *, key=None, reverse=False) | Sort the list in ascending order and return None. | | The sort is in-place (i.e. the list itself is modified) and stable (i.e. the | order of two equal elements is maintained). | | If a key function is given, apply it once to each list item and sort them, | ascending or descending, according to their function values. | | The reverse flag can be set to sort in descending order. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None
http.cookiejar.MONTHS_LOWER
Python Library Documentation: list object class list(object) | list(iterable=(), /) | | Built-in mutable sequence. | | If no argument is given, the constructor creates a new empty list. | The argument must be an iterable if specified. | | Methods defined here: | | __add__(self, value, /) | Return self+value. | | __contains__(self, key, /) | Return bool(key in self). | | __delitem__(self, key, /) | Delete self[key]. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, index, /) | Return self[index]. | | __gt__(self, value, /) | Return self>value. | | __iadd__(self, value, /) | Implement self+=value. | | __imul__(self, value, /) | Implement self*=value. | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | __reversed__(self, /) | Return a reverse iterator over the list. | | __rmul__(self, value, /) | Return value*self. | | __setitem__(self, key, value, /) | Set self[key] to value. | | __sizeof__(self, /) | Return the size of the list in memory, in bytes. | | append(self, object, /) | Append object to the end of the list. | | clear(self, /) | Remove all items from list. | | copy(self, /) | Return a shallow copy of the list. | | count(self, value, /) | Return number of occurrences of value. | | extend(self, iterable, /) | Extend list by appending elements from the iterable. | | index(self, value, start=0, stop=9223372036854775807, /) | Return first index of value. | | Raises ValueError if the value is not present. | | insert(self, index, object, /) | Insert object before index. | | pop(self, index=-1, /) | Remove and return item at index (default last). | | Raises IndexError if list is empty or index is out of range. | | remove(self, value, /) | Remove first occurrence of value. | | Raises ValueError if the value is not present. | | reverse(self, /) | Reverse *IN PLACE*. | | sort(self, /, *, key=None, reverse=False) | Sort the list in ascending order and return None. | | The sort is in-place (i.e. the list itself is modified) and stable (i.e. the | order of two equal elements is maintained). | | If a key function is given, apply it once to each list item and sort them, | ascending or descending, according to their function values. | | The reverse flag can be set to sort in descending order. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None
http.cookiejar.MozillaCookieJar
Python Library Documentation: class MozillaCookieJar in module http.cookiejar
class MozillaCookieJar(FileCookieJar)
| MozillaCookieJar(filename=None, delayload=False, policy=None)
|
| WARNING: you may want to backup your browser's cookies file if you use
| this class to save cookies. I *think* it works, but there have been
| bugs in the past!
|
| This class differs from CookieJar only in the format it uses to save and
| load cookies to and from a file. This class uses the Mozilla/Netscape
| `cookies.txt' format. curl and lynx use this file format, too.
|
| Don't expect cookies saved while the browser is running to be noticed by
| the browser (in fact, Mozilla on unix will overwrite your saved cookies if
| you change them on disk while it's running; on Windows, you probably can't
| save at all while the browser is running).
|
| Note that the Mozilla/Netscape format will downgrade RFC2965 cookies to
| Netscape cookies on saving.
|
| In particular, the cookie version and port number information is lost,
| together with information about whether or not Path, Port and Discard were
| specified by the Set-Cookie2 (or Set-Cookie) header, and whether or not the
| domain as set in the HTTP header started with a dot (yes, I'm aware some
| domains in Netscape files start with a dot and some don't -- trust me, you
| really don't want to know any more about this).
|
| Note that though Mozilla and Netscape use the same format, they use
| slightly different headers. The class saves cookies using the Netscape
| header by default (Mozilla can cope with that).
|
| Method resolution order:
| MozillaCookieJar
| FileCookieJar
| CookieJar
| builtins.object
|
| Methods defined here:
|
| save(self, filename=None, ignore_discard=False, ignore_expires=False)
| Save cookies to a file.
|
| ----------------------------------------------------------------------
| Methods inherited from FileCookieJar:
|
| __init__(self, filename=None, delayload=False, policy=None)
| Cookies are NOT loaded from the named file until either the .load() or
| .revert() method is called.
|
| load(self, filename=None, ignore_discard=False, ignore_expires=False)
| Load cookies from a file.
|
| revert(self, filename=None, ignore_discard=False, ignore_expires=False)
| Clear all cookies and reload cookies from a saved file.
|
| Raises LoadError (or OSError) if reversion is not successful; the
| object's state will not be altered if this happens.
|
| ----------------------------------------------------------------------
| Methods inherited from CookieJar:
|
| __iter__(self)
|
| __len__(self)
| Return number of contained cookies.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self)
| Return str(self).
|
| add_cookie_header(self, request)
| Add correct Cookie: header to request (urllib.request.Request object).
|
| The Cookie2 header is also added unless policy.hide_cookie2 is true.
|
| clear(self, domain=None, path=None, name=None)
| Clear some cookies.
|
| Invoking this method without arguments will clear all cookies. If
| given a single argument, only cookies belonging to that domain will be
| removed. If given two arguments, cookies belonging to the specified
| path within that domain are removed. If given three arguments, then
| the cookie with the specified name, path and domain is removed.
|
| Raises KeyError if no matching cookie exists.
|
| clear_expired_cookies(self)
| Discard all expired cookies.
|
| You probably don't need to call this method: expired cookies are never
| sent back to the server (provided you're using DefaultCookiePolicy),
| this method is called by CookieJar itself every so often, and the
| .save() method won't save expired cookies anyway (unless you ask
| otherwise by passing a true ignore_expires argument).
|
| clear_session_cookies(self)
| Discard all session cookies.
|
| Note that the .save() method won't save session cookies anyway, unless
| you ask otherwise by passing a true ignore_discard argument.
|
| extract_cookies(self, response, request)
| Extract cookies from response, where allowable given the request.
|
| make_cookies(self, response, request)
| Return sequence of Cookie objects extracted from response object.
|
| set_cookie(self, cookie)
| Set a cookie, without checking whether or not it should be set.
|
| set_cookie_if_ok(self, cookie, request)
| Set a cookie if policy says it's OK to do so.
|
| set_policy(self, policy)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from CookieJar:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from CookieJar:
|
| domain_re = re.compile('[^.]*')
|
| dots_re = re.compile('^\\.+')
|
| magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
|
| non_word_re = re.compile('\\W')
|
| quote_re = re.compile('([\\"\\\\])')
|
| strict_domain_re = re.compile('\\.?[^.]*')
http.cookiejar.NETSCAPE_HEADER_TEXT
Error rendering doc: No Python documentation found for '# Netscape HTTP Cookie File\n# http://curl.haxx.se/rfc/cookie_spec.html\n# This is a generated file! Do not edit.\n\n'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
http.cookiejar.NETSCAPE_MAGIC_RGX
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.STRICT_DATE_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.TIMEZONE_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.UTC_ZONES
Python Library Documentation: dict object
class dict(object)
| dict() -> new empty dictionary
| dict(mapping) -> new dictionary initialized from a mapping object's
| (key, value) pairs
| dict(iterable) -> new dictionary initialized as if via:
| d = {}
| for k, v in iterable:
| d[k] = v
| dict(**kwargs) -> new dictionary initialized with the name=value pairs
| in the keyword argument list. For example: dict(one=1, two=2)
|
| Methods defined here:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(self, /)
| Return a reverse iterator over the dict keys.
|
| __ror__(self, value, /)
| Return value|self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /)
| Remove and return a (key, value) pair as a 2-tuple.
|
| Pairs are returned in LIFO (last-in, first-out) order.
| Raises KeyError if the dict is empty.
|
| setdefault(self, key, default=None, /)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| update(...)
| D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
| If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
| If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
| In either case, this is followed by: for k in F: D[k] = F[k]
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| fromkeys(iterable, value=None, /)
| Create a new dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
http.cookiejar.WEEKDAY_RE
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.copy
Python Library Documentation: module copy
NAME
copy - Generic (shallow and deep) copying operations.
MODULE REFERENCE
https://docs.python.org/3.12/library/copy.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
Interface summary:
import copy
x = copy.copy(y) # make a shallow copy of y
x = copy.deepcopy(y) # make a deep copy of y
For module specific errors, copy.Error is raised.
The difference between shallow and deep copying is only relevant for
compound objects (objects that contain other objects, like lists or
class instances).
- A shallow copy constructs a new compound object and then (to the
extent possible) inserts *the same objects* into it that the
original contains.
- A deep copy constructs a new compound object and then, recursively,
inserts *copies* into it of the objects found in the original.
Two problems often exist with deep copy operations that don't exist
with shallow copy operations:
a) recursive objects (compound objects that, directly or indirectly,
contain a reference to themselves) may cause a recursive loop
b) because deep copy copies *everything* it may copy too much, e.g.
administrative data structures that should be shared even between
copies
Python's deep copy operation avoids these problems by:
a) keeping a table of objects already copied during the current
copying pass
b) letting user-defined classes override the copying operation or the
set of components copied
This version does not copy types like module, class, function, method,
nor stack trace, stack frame, nor file, socket, window, nor any
similar types.
Classes can use the same interfaces to control copying that they use
to control pickling: they can define methods called __getinitargs__(),
__getstate__() and __setstate__(). See the documentation for module
"pickle" for information on these methods.
CLASSES
builtins.Exception(builtins.BaseException)
Error
class Error(builtins.Exception)
| Method resolution order:
| Error
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
copy(x)
Shallow copy operation on arbitrary Python objects.
See the module's __doc__ string for more info.
deepcopy(x, memo=None, _nil=[])
Deep copy operation on arbitrary Python objects.
See the module's __doc__ string for more info.
DATA
__all__ = ['Error', 'copy', 'deepcopy']
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\copy.py
http.cookiejar.cut_port_re
Python Library Documentation: Pattern in module re object class Pattern(builtins.object) | Compiled regular expression object. | | Methods defined here: | | __copy__(self, /) | | __deepcopy__(self, memo, /) | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | findall(self, /, string, pos=0, endpos=9223372036854775807) | Return a list of all non-overlapping matches of pattern in string. | | finditer(self, /, string, pos=0, endpos=9223372036854775807) | Return an iterator over all non-overlapping matches for the RE pattern in string. | | For each match, the iterator returns a match object. | | fullmatch(self, /, string, pos=0, endpos=9223372036854775807) | Matches against all of the string. | | match(self, /, string, pos=0, endpos=9223372036854775807) | Matches zero or more characters at the beginning of the string. | | scanner(self, /, string, pos=0, endpos=9223372036854775807) | | search(self, /, string, pos=0, endpos=9223372036854775807) | Scan through string looking for a match, and return a corresponding match object instance. | | Return None if no position in the string matches. | | split(self, /, string, maxsplit=0) | Split string by the occurrences of pattern. | | sub(self, /, repl, string, count=0) | Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. | | subn(self, /, repl, string, count=0) | Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Data descriptors defined here: | | flags | The regex matching flags. | | groupindex | A dictionary mapping group names to group numbers. | | groups | The number of capturing groups in the pattern. | | pattern | The pattern string from which the RE object was compiled.
http.cookiejar.datetime
Python Library Documentation: module datetime
NAME
datetime - Fast implementation of the datetime type.
MODULE REFERENCE
https://docs.python.org/3.12/library/datetime.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
CLASSES
builtins.object
date
datetime
time
timedelta
tzinfo
timezone
class date(builtins.object)
| date(year, month, day) --> date object
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(...)
| Formats self with strftime.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __radd__(self, value, /)
| Return value+self.
|
| __reduce__(...)
| __reduce__() -> (cls, state)
|
| __repr__(self, /)
| Return repr(self).
|
| __rsub__(self, value, /)
| Return value-self.
|
| __str__(self, /)
| Return str(self).
|
| __sub__(self, value, /)
| Return self-value.
|
| ctime(...)
| Return ctime() style string.
|
| isocalendar(...)
| Return a named tuple containing ISO year, week number, and weekday.
|
| isoformat(...)
| Return string in ISO 8601 format, YYYY-MM-DD.
|
| isoweekday(...)
| Return the day of the week represented by the date.
| Monday == 1 ... Sunday == 7
|
| replace(...)
| Return date with new specified fields.
|
| strftime(...)
| format -> strftime() style string.
|
| timetuple(...)
| Return time tuple, compatible with time.localtime().
|
| toordinal(...)
| Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.
|
| weekday(...)
| Return the day of the week represented by the date.
| Monday == 0 ... Sunday == 6
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromisocalendar(...)
| int, int, int -> Construct a date from the ISO year, week number and weekday.
|
| This is the inverse of the date.isocalendar() function
|
| fromisoformat(...)
| str -> Construct a date from a string in ISO 8601 format.
|
| fromordinal(...)
| int -> date corresponding to a proleptic Gregorian ordinal.
|
| fromtimestamp(timestamp, /)
| Create a date from a POSIX timestamp.
|
| The timestamp is a number, e.g. created via time.time(), that is interpreted
| as local time.
|
| today(...)
| Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| day
|
| month
|
| year
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.date(9999, 12, 31)
|
| min = datetime.date(1, 1, 1)
|
| resolution = datetime.timedelta(days=1)
class datetime(date)
| datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])
|
| The year, month and day arguments are required. tzinfo may be None, or an
| instance of a tzinfo subclass. The remaining arguments may be ints.
|
| Method resolution order:
| datetime
| date
| builtins.object
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __radd__(self, value, /)
| Return value+self.
|
| __reduce__(...)
| __reduce__() -> (cls, state)
|
| __reduce_ex__(...)
| __reduce_ex__(proto) -> (cls, state)
|
| __repr__(self, /)
| Return repr(self).
|
| __rsub__(self, value, /)
| Return value-self.
|
| __str__(self, /)
| Return str(self).
|
| __sub__(self, value, /)
| Return self-value.
|
| astimezone(...)
| tz -> convert to local time in new timezone tz
|
| ctime(...)
| Return ctime() style string.
|
| date(...)
| Return date object with same year, month and day.
|
| dst(...)
| Return self.tzinfo.dst(self).
|
| isoformat(...)
| [sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].
| sep is used to separate the year from the time, and defaults to 'T'.
| The optional argument timespec specifies the number of additional terms
| of the time to include. Valid options are 'auto', 'hours', 'minutes',
| 'seconds', 'milliseconds' and 'microseconds'.
|
| replace(...)
| Return datetime with new specified fields.
|
| time(...)
| Return time object with same time but with tzinfo=None.
|
| timestamp(...)
| Return POSIX timestamp as float.
|
| timetuple(...)
| Return time tuple, compatible with time.localtime().
|
| timetz(...)
| Return time object with same time and tzinfo.
|
| tzname(...)
| Return self.tzinfo.tzname(self).
|
| utcoffset(...)
| Return self.tzinfo.utcoffset(self).
|
| utctimetuple(...)
| Return UTC time tuple, compatible with time.localtime().
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| combine(...)
| date, time -> datetime with same date and time fields
|
| fromisoformat(...)
| string -> datetime from a string in most ISO 8601 formats
|
| fromtimestamp(...)
| timestamp[, tz] -> tz's local time from POSIX timestamp.
|
| now(tz=None)
| Returns new datetime object representing current time local to tz.
|
| tz
| Timezone object.
|
| If no tz is specified, uses local timezone.
|
| strptime(...)
| string, format -> new datetime parsed from a string (like time.strptime()).
|
| utcfromtimestamp(...)
| Construct a naive UTC datetime from a POSIX timestamp.
|
| utcnow(...)
| Return a new datetime representing UTC day and time.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| fold
|
| hour
|
| microsecond
|
| minute
|
| second
|
| tzinfo
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)
|
| min = datetime.datetime(1, 1, 1, 0, 0)
|
| resolution = datetime.timedelta(microseconds=1)
|
| ----------------------------------------------------------------------
| Methods inherited from date:
|
| __format__(...)
| Formats self with strftime.
|
| isocalendar(...)
| Return a named tuple containing ISO year, week number, and weekday.
|
| isoweekday(...)
| Return the day of the week represented by the date.
| Monday == 1 ... Sunday == 7
|
| strftime(...)
| format -> strftime() style string.
|
| toordinal(...)
| Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.
|
| weekday(...)
| Return the day of the week represented by the date.
| Monday == 0 ... Sunday == 6
|
| ----------------------------------------------------------------------
| Class methods inherited from date:
|
| fromisocalendar(...)
| int, int, int -> Construct a date from the ISO year, week number and weekday.
|
| This is the inverse of the date.isocalendar() function
|
| fromordinal(...)
| int -> date corresponding to a proleptic Gregorian ordinal.
|
| today(...)
| Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from date:
|
| day
|
| month
|
| year
class time(builtins.object)
| time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time object
|
| All arguments are optional. tzinfo may be None, or an instance of
| a tzinfo subclass. The remaining arguments may be ints.
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(...)
| Formats self with strftime.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| __reduce__() -> (cls, state)
|
| __reduce_ex__(...)
| __reduce_ex__(proto) -> (cls, state)
|
| __repr__(self, /)
| Return repr(self).
|
| __str__(self, /)
| Return str(self).
|
| dst(...)
| Return self.tzinfo.dst(self).
|
| isoformat(...)
| Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].
|
| The optional argument timespec specifies the number of additional terms
| of the time to include. Valid options are 'auto', 'hours', 'minutes',
| 'seconds', 'milliseconds' and 'microseconds'.
|
| replace(...)
| Return time with new specified fields.
|
| strftime(...)
| format -> strftime() style string.
|
| tzname(...)
| Return self.tzinfo.tzname(self).
|
| utcoffset(...)
| Return self.tzinfo.utcoffset(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromisoformat(...)
| string -> time from a string in ISO 8601 format
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| fold
|
| hour
|
| microsecond
|
| minute
|
| second
|
| tzinfo
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.time(23, 59, 59, 999999)
|
| min = datetime.time(0, 0)
|
| resolution = datetime.timedelta(microseconds=1)
class timedelta(builtins.object)
| Difference between two datetime values.
|
| timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
|
| All arguments are optional and default to 0.
| Arguments may be integers or floats, and may be positive or negative.
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __reduce__(...)
| __reduce__() -> (cls, state)
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __str__(self, /)
| Return str(self).
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| total_seconds(...)
| Total seconds in the duration.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| days
| Number of days.
|
| microseconds
| Number of microseconds (>= 0 and less than 1 second).
|
| seconds
| Number of seconds (>= 0 and less than 1 day).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.timedelta(days=999999999, seconds=86399, microseconds=9...
|
| min = datetime.timedelta(days=-999999999)
|
| resolution = datetime.timedelta(microseconds=1)
class timezone(tzinfo)
| Fixed offset from UTC implementation of tzinfo.
|
| Method resolution order:
| timezone
| tzinfo
| builtins.object
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getinitargs__(...)
| pickle support
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __str__(self, /)
| Return str(self).
|
| dst(...)
| Return None.
|
| fromutc(...)
| datetime in UTC -> datetime in local time.
|
| tzname(...)
| If name is specified when timezone is created, returns the name. Otherwise returns offset as 'UTC(+|-)HH:MM'.
|
| utcoffset(...)
| Return fixed offset.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| max = datetime.timezone(datetime.timedelta(seconds=86340))
|
| min = datetime.timezone(datetime.timedelta(days=-1, seconds=60))
|
| utc = datetime.timezone.utc
|
| ----------------------------------------------------------------------
| Methods inherited from tzinfo:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| -> (cls, state)
class tzinfo(builtins.object)
| Abstract base class for time zone info objects.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| -> (cls, state)
|
| dst(...)
| datetime -> DST offset as timedelta positive east of UTC.
|
| fromutc(...)
| datetime in UTC -> datetime in local time.
|
| tzname(...)
| datetime -> string name of time zone.
|
| utcoffset(...)
| datetime -> timedelta showing offset from UTC, negative values indicating West of UTC
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
DATA
MAXYEAR = 9999
MINYEAR = 1
UTC = datetime.timezone.utc
__all__ = ('date', 'datetime', 'time', 'timedelta', 'timezone', 'tzinf...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\datetime.py
http.cookiejar.debug
Python Library Documentation: bool object class bool(int) | bool(x) -> bool | | Returns True when the argument x is true, False otherwise. | The builtins True and False are the only two instances of the class bool. | The class bool is a subclass of the class int, and cannot be subclassed. | | Method resolution order: | bool | int | object | | Methods defined here: | | __and__(self, value, /) | Return self&value. | | __invert__(self, /) | ~self | | __or__(self, value, /) | Return self|value. | | __rand__(self, value, /) | Return value&self. | | __repr__(self, /) | Return repr(self). | | __ror__(self, value, /) | Return value|self. | | __rxor__(self, value, /) | Return value^self. | | __xor__(self, value, /) | Return self^value. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __format__(self, format_spec, /) | Convert to a string according to format_spec. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number
http.cookiejar.deepvalues
Python Library Documentation: function deepvalues in module http.cookiejar
deepvalues(mapping)
Iterates over nested mapping, depth-first
http.cookiejar.domain_match
Python Library Documentation: function domain_match in module http.cookiejar
domain_match(A, B)
Return True if domain A domain-matches domain B, according to RFC 2965.
A and B may be host domain names or IP addresses.
RFC 2965, section 1:
Host names can be specified either as an IP address or a HDN string.
Sometimes we compare one host name with another. (Such comparisons SHALL
be case-insensitive.) Host A's name domain-matches host B's if
* their host name strings string-compare equal; or
* A is a HDN string and has the form NB, where N is a non-empty
name string, B has the form .B', and B' is a HDN string. (So,
x.y.com domain-matches .Y.com but not Y.com.)
Note that domain-match is not a commutative operation: a.b.c.com
domain-matches .c.com, but not the reverse.
http.cookiejar.eff_request_host
Python Library Documentation: function eff_request_host in module http.cookiejar
eff_request_host(request)
Return a tuple (request-host, effective request-host name).
As defined by RFC 2965, except both are lowercased.
http.cookiejar.escape_path
Python Library Documentation: function escape_path in module http.cookiejar
escape_path(path)
Escape any invalid characters in HTTP URL, and uppercase all escapes.
http.cookiejar.http
Python Library Documentation: package http
NAME
http
MODULE REFERENCE
https://docs.python.org/3.12/library/http.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
PACKAGE CONTENTS
client
cookiejar
cookies
server
CLASSES
enum.IntEnum(builtins.int, enum.ReprEnum)
HTTPStatus
enum.StrEnum(builtins.str, enum.ReprEnum)
HTTPMethod
class HTTPMethod(enum.StrEnum)
| HTTPMethod(*values)
|
| HTTP methods and descriptions
|
| Methods from the following RFCs are all observed:
|
| * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
| * RFC 5789: PATCH Method for HTTP
|
| Method resolution order:
| HTTPMethod
| enum.StrEnum
| builtins.str
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.str
| Return a formatted version of the string as described by format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __str__(self, /) from builtins.str
| Return str(self).
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CONNECT = <HTTPMethod.CONNECT>
|
| DELETE = <HTTPMethod.DELETE>
|
| GET = <HTTPMethod.GET>
|
| HEAD = <HTTPMethod.HEAD>
|
| OPTIONS = <HTTPMethod.OPTIONS>
|
| PATCH = <HTTPMethod.PATCH>
|
| POST = <HTTPMethod.POST>
|
| PUT = <HTTPMethod.PUT>
|
| TRACE = <HTTPMethod.TRACE>
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.str:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.str:
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class HTTPStatus(enum.IntEnum)
| HTTPStatus(*values)
|
| HTTP status codes and reason phrases
|
| Status codes from the following RFCs are all observed:
|
| * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
| * RFC 6585: Additional HTTP Status Codes
| * RFC 3229: Delta encoding in HTTP
| * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518
| * RFC 5842: Binding Extensions to WebDAV
| * RFC 7238: Permanent Redirect
| * RFC 2295: Transparent Content Negotiation in HTTP
| * RFC 2774: An HTTP Extension Framework
| * RFC 7725: An HTTP Status Code to Report Legal Obstacles
| * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2)
| * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
| * RFC 8297: An HTTP Status Code for Indicating Hints
| * RFC 8470: Using Early Data in HTTP
|
| Method resolution order:
| HTTPStatus
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ACCEPTED = <HTTPStatus.ACCEPTED: 202>
|
| ALREADY_REPORTED = <HTTPStatus.ALREADY_REPORTED: 208>
|
| BAD_GATEWAY = <HTTPStatus.BAD_GATEWAY: 502>
|
| BAD_REQUEST = <HTTPStatus.BAD_REQUEST: 400>
|
| CONFLICT = <HTTPStatus.CONFLICT: 409>
|
| CONTINUE = <HTTPStatus.CONTINUE: 100>
|
| CREATED = <HTTPStatus.CREATED: 201>
|
| EARLY_HINTS = <HTTPStatus.EARLY_HINTS: 103>
|
| EXPECTATION_FAILED = <HTTPStatus.EXPECTATION_FAILED: 417>
|
| FAILED_DEPENDENCY = <HTTPStatus.FAILED_DEPENDENCY: 424>
|
| FORBIDDEN = <HTTPStatus.FORBIDDEN: 403>
|
| FOUND = <HTTPStatus.FOUND: 302>
|
| GATEWAY_TIMEOUT = <HTTPStatus.GATEWAY_TIMEOUT: 504>
|
| GONE = <HTTPStatus.GONE: 410>
|
| HTTP_VERSION_NOT_SUPPORTED = <HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: 5...
|
| IM_A_TEAPOT = <HTTPStatus.IM_A_TEAPOT: 418>
|
| IM_USED = <HTTPStatus.IM_USED: 226>
|
| INSUFFICIENT_STORAGE = <HTTPStatus.INSUFFICIENT_STORAGE: 507>
|
| INTERNAL_SERVER_ERROR = <HTTPStatus.INTERNAL_SERVER_ERROR: 500>
|
| LENGTH_REQUIRED = <HTTPStatus.LENGTH_REQUIRED: 411>
|
| LOCKED = <HTTPStatus.LOCKED: 423>
|
| LOOP_DETECTED = <HTTPStatus.LOOP_DETECTED: 508>
|
| METHOD_NOT_ALLOWED = <HTTPStatus.METHOD_NOT_ALLOWED: 405>
|
| MISDIRECTED_REQUEST = <HTTPStatus.MISDIRECTED_REQUEST: 421>
|
| MOVED_PERMANENTLY = <HTTPStatus.MOVED_PERMANENTLY: 301>
|
| MULTIPLE_CHOICES = <HTTPStatus.MULTIPLE_CHOICES: 300>
|
| MULTI_STATUS = <HTTPStatus.MULTI_STATUS: 207>
|
| NETWORK_AUTHENTICATION_REQUIRED = <HTTPStatus.NETWORK_AUTHENTICATION_R...
|
| NON_AUTHORITATIVE_INFORMATION = <HTTPStatus.NON_AUTHORITATIVE_INFORMAT...
|
| NOT_ACCEPTABLE = <HTTPStatus.NOT_ACCEPTABLE: 406>
|
| NOT_EXTENDED = <HTTPStatus.NOT_EXTENDED: 510>
|
| NOT_FOUND = <HTTPStatus.NOT_FOUND: 404>
|
| NOT_IMPLEMENTED = <HTTPStatus.NOT_IMPLEMENTED: 501>
|
| NOT_MODIFIED = <HTTPStatus.NOT_MODIFIED: 304>
|
| NO_CONTENT = <HTTPStatus.NO_CONTENT: 204>
|
| OK = <HTTPStatus.OK: 200>
|
| PARTIAL_CONTENT = <HTTPStatus.PARTIAL_CONTENT: 206>
|
| PAYMENT_REQUIRED = <HTTPStatus.PAYMENT_REQUIRED: 402>
|
| PERMANENT_REDIRECT = <HTTPStatus.PERMANENT_REDIRECT: 308>
|
| PRECONDITION_FAILED = <HTTPStatus.PRECONDITION_FAILED: 412>
|
| PRECONDITION_REQUIRED = <HTTPStatus.PRECONDITION_REQUIRED: 428>
|
| PROCESSING = <HTTPStatus.PROCESSING: 102>
|
| PROXY_AUTHENTICATION_REQUIRED = <HTTPStatus.PROXY_AUTHENTICATION_REQUI...
|
| REQUESTED_RANGE_NOT_SATISFIABLE = <HTTPStatus.REQUESTED_RANGE_NOT_SATI...
|
| REQUEST_ENTITY_TOO_LARGE = <HTTPStatus.REQUEST_ENTITY_TOO_LARGE: 413>
|
| REQUEST_HEADER_FIELDS_TOO_LARGE = <HTTPStatus.REQUEST_HEADER_FIELDS_TO...
|
| REQUEST_TIMEOUT = <HTTPStatus.REQUEST_TIMEOUT: 408>
|
| REQUEST_URI_TOO_LONG = <HTTPStatus.REQUEST_URI_TOO_LONG: 414>
|
| RESET_CONTENT = <HTTPStatus.RESET_CONTENT: 205>
|
| SEE_OTHER = <HTTPStatus.SEE_OTHER: 303>
|
| SERVICE_UNAVAILABLE = <HTTPStatus.SERVICE_UNAVAILABLE: 503>
|
| SWITCHING_PROTOCOLS = <HTTPStatus.SWITCHING_PROTOCOLS: 101>
|
| TEMPORARY_REDIRECT = <HTTPStatus.TEMPORARY_REDIRECT: 307>
|
| TOO_EARLY = <HTTPStatus.TOO_EARLY: 425>
|
| TOO_MANY_REQUESTS = <HTTPStatus.TOO_MANY_REQUESTS: 429>
|
| UNAUTHORIZED = <HTTPStatus.UNAUTHORIZED: 401>
|
| UNAVAILABLE_FOR_LEGAL_REASONS = <HTTPStatus.UNAVAILABLE_FOR_LEGAL_REAS...
|
| UNPROCESSABLE_ENTITY = <HTTPStatus.UNPROCESSABLE_ENTITY: 422>
|
| UNSUPPORTED_MEDIA_TYPE = <HTTPStatus.UNSUPPORTED_MEDIA_TYPE: 415>
|
| UPGRADE_REQUIRED = <HTTPStatus.UPGRADE_REQUIRED: 426>
|
| USE_PROXY = <HTTPStatus.USE_PROXY: 305>
|
| VARIANT_ALSO_NEGOTIATES = <HTTPStatus.VARIANT_ALSO_NEGOTIATES: 506>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
DATA
__all__ = ['HTTPStatus', 'HTTPMethod']
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\http\__init__.py
http.cookiejar.http2time
Python Library Documentation: function http2time in module http.cookiejar
http2time(text)
Returns time in seconds since epoch of time represented by a string.
Return value is an integer.
None is returned if the format of str is unrecognized, the time is outside
the representable range, or the timezone string is not recognized. If the
string contains no timezone, UTC is assumed.
The timezone in the string may be numerical (like "-0800" or "+0100") or a
string timezone (like "UTC", "GMT", "BST" or "EST"). Currently, only the
timezone strings equivalent to UTC (zero offset) are known to the function.
The function loosely parses the following formats:
Wed, 09 Feb 1994 22:23:32 GMT -- HTTP format
Tuesday, 08-Feb-94 14:15:29 GMT -- old rfc850 HTTP format
Tuesday, 08-Feb-1994 14:15:29 GMT -- broken rfc850 HTTP format
09 Feb 1994 22:23:32 GMT -- HTTP format (no weekday)
08-Feb-94 14:15:29 GMT -- rfc850 format (no weekday)
08-Feb-1994 14:15:29 GMT -- broken rfc850 format (no weekday)
The parser ignores leading and trailing whitespace. The time may be
absent.
If the year is given with only 2 digits, the function will select the
century that makes the year closest to the current date.
http.cookiejar.is_HDN
Python Library Documentation: function is_HDN in module http.cookiejar
is_HDN(text)
Return True if text is a host domain name.
http.cookiejar.is_third_party
Python Library Documentation: function is_third_party in module http.cookiejar
is_third_party(request)
RFC 2965, section 3.3.6:
An unverifiable transaction is to a third-party host if its request-
host U does not domain-match the reach R of the request-host O in the
origin transaction.
http.cookiejar.iso2time
Python Library Documentation: function iso2time in module http.cookiejar
iso2time(text)
As for http2time, but parses the ISO 8601 formats:
1994-02-03 14:15:29 -0100 -- ISO 8601 format
1994-02-03 14:15:29 -- zone is optional
1994-02-03 -- only date
1994-02-03T14:15:29 -- Use T as separator
19940203T141529Z -- ISO 8601 compact format
19940203 -- only date
http.cookiejar.join_header_words
Python Library Documentation: function join_header_words in module http.cookiejar
join_header_words(lists)
Do the inverse (almost) of the conversion done by split_header_words.
Takes a list of lists of (key, value) pairs and produces a single header
value. Attribute values are quoted if needed.
>>> join_header_words([[("text/plain", None), ("charset", "iso-8859-1")]])
'text/plain; charset="iso-8859-1"'
>>> join_header_words([[("text/plain", None)], [("charset", "iso-8859-1")]])
'text/plain, charset="iso-8859-1"'
http.cookiejar.liberal_is_HDN
Python Library Documentation: function liberal_is_HDN in module http.cookiejar
liberal_is_HDN(text)
Return True if text is a sort-of-like a host domain name.
For accepting/blocking domains.
http.cookiejar.logger
Python Library Documentation: NoneType object class NoneType(object) | Methods defined here: | | __bool__(self, /) | True if self else False | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature.
http.cookiejar.lwp_cookie_str
Python Library Documentation: function lwp_cookie_str in module http.cookiejar
lwp_cookie_str(cookie)
Return string representation of Cookie in the LWP cookie file format.
Actually, the format is extended a bit -- see module docstring.
http.cookiejar.offset_from_tz_string
Python Library Documentation: function offset_from_tz_string in module http.cookiejar offset_from_tz_string(tz)
http.cookiejar.os
Python Library Documentation: module os
NAME
os - OS routines for NT or Posix depending on what system we're on.
MODULE REFERENCE
https://docs.python.org/3.12/library/os.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This exports:
- all functions from posix or nt, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix' or 'nt'
- os.curdir is a string representing the current directory (always '.')
- os.pardir is a string representing the parent directory (always '..')
- os.sep is the (or a most common) pathname separator ('/' or '\\')
- os.extsep is the extension separator (always '.')
- os.altsep is the alternate pathname separator (None or '/')
- os.pathsep is the component separator used in $PATH etc
- os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
- os.defpath is the default search path for executables
- os.devnull is the file path of the null device ('/dev/null', etc.)
Programs that import and use 'os' stand a better chance of being
portable between different platforms. Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).
CLASSES
builtins.Exception(builtins.BaseException)
builtins.OSError
builtins.object
nt.DirEntry
builtins.tuple(builtins.object)
nt.times_result
nt.uname_result
stat_result
statvfs_result
terminal_size
class DirEntry(builtins.object)
| Methods defined here:
|
| __fspath__(self, /)
| Returns the path for the entry.
|
| __repr__(self, /)
| Return repr(self).
|
| inode(self, /)
| Return inode of the entry; cached per entry.
|
| is_dir(self, /, *, follow_symlinks=True)
| Return True if the entry is a directory; cached per entry.
|
| is_file(self, /, *, follow_symlinks=True)
| Return True if the entry is a file; cached per entry.
|
| is_junction(self, /)
| Return True if the entry is a junction; cached per entry.
|
| is_symlink(self, /)
| Return True if the entry is a symbolic link; cached per entry.
|
| stat(self, /, *, follow_symlinks=True)
| Return stat_result object for the entry; cached per entry.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| name
| the entry's base filename, relative to scandir() "path" argument
|
| path
| the entry's full path name; equivalent to os.path.join(scandir_path, entry.name)
error = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class stat_result(builtins.tuple)
| stat_result(iterable=(), /)
|
| stat_result: Result from stat, fstat, or lstat.
|
| This object may be accessed either as a tuple of
| (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)
| or via the attributes st_mode, st_ino, st_dev, st_nlink, st_uid, and so on.
|
| Posix/windows: If your platform supports st_blksize, st_blocks, st_rdev,
| or st_flags, they are available as attributes only.
|
| See os.stat for more information.
|
| Method resolution order:
| stat_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| st_atime
| time of last access
|
| st_atime_ns
| time of last access in nanoseconds
|
| st_birthtime
| time of creation
|
| st_birthtime_ns
| time of creation in nanoseconds
|
| st_ctime
| time of last change
|
| st_ctime_ns
| time of last change in nanoseconds
|
| st_dev
| device
|
| st_file_attributes
| Windows file attribute bits
|
| st_gid
| group ID of owner
|
| st_ino
| inode
|
| st_mode
| protection bits
|
| st_mtime
| time of last modification
|
| st_mtime_ns
| time of last modification in nanoseconds
|
| st_nlink
| number of hard links
|
| st_reparse_tag
| Windows reparse tag
|
| st_size
| total size, in bytes
|
| st_uid
| user ID of owner
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('st_mode', 'st_ino', 'st_dev', 'st_nlink', 'st_uid',...
|
| n_fields = 20
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 3
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class statvfs_result(builtins.tuple)
| statvfs_result(iterable=(), /)
|
| statvfs_result: Result from statvfs or fstatvfs.
|
| This object may be accessed either as a tuple of
| (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax),
| or via the attributes f_bsize, f_frsize, f_blocks, f_bfree, and so on.
|
| See os.statvfs for more information.
|
| Method resolution order:
| statvfs_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| f_bavail
|
| f_bfree
|
| f_blocks
|
| f_bsize
|
| f_favail
|
| f_ffree
|
| f_files
|
| f_flag
|
| f_frsize
|
| f_fsid
|
| f_namemax
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('f_bsize', 'f_frsize', 'f_blocks', 'f_bfree', 'f_bav...
|
| n_fields = 11
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class terminal_size(builtins.tuple)
| terminal_size(iterable=(), /)
|
| A tuple of (columns, lines) for holding terminal window size
|
| Method resolution order:
| terminal_size
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| columns
| width of the terminal window in characters
|
| lines
| height of the terminal window in characters
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('columns', 'lines')
|
| n_fields = 2
|
| n_sequence_fields = 2
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class times_result(builtins.tuple)
| times_result(iterable=(), /)
|
| times_result: Result from os.times().
|
| This object may be accessed either as a tuple of
| (user, system, children_user, children_system, elapsed),
| or via the attributes user, system, children_user, children_system,
| and elapsed.
|
| See os.times for more information.
|
| Method resolution order:
| times_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| children_system
| system time of children
|
| children_user
| user time of children
|
| elapsed
| elapsed time since an arbitrary point in the past
|
| system
| system time
|
| user
| user time
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('user', 'system', 'children_user', 'children_system'...
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class uname_result(builtins.tuple)
| uname_result(iterable=(), /)
|
| uname_result: Result from os.uname().
|
| This object may be accessed either as a tuple of
| (sysname, nodename, release, version, machine),
| or via the attributes sysname, nodename, release, version, and machine.
|
| See os.uname for more information.
|
| Method resolution order:
| uname_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| machine
| hardware identifier
|
| nodename
| name of machine on network (implementation-defined)
|
| release
| operating system release
|
| sysname
| operating system name
|
| version
| operating system version
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('sysname', 'nodename', 'release', 'version', 'machin...
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
FUNCTIONS
_exit(status)
Exit to the system with specified status, without normal exit processing.
abort()
Abort the interpreter immediately.
This function 'dumps core' or otherwise fails in the hardest way possible
on the hosting operating system. This function never returns.
access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)
Use the real uid/gid to test for access to a path.
path
Path to be tested; can be string, bytes, or a path-like object.
mode
Operating-system mode bitfield. Can be F_OK to test existence,
or the inclusive-OR of R_OK, W_OK, and X_OK.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
effective_ids
If True, access will use the effective uid/gid instead of
the real uid/gid.
follow_symlinks
If False, and the last element of the path is a symbolic link,
access will examine the symbolic link itself instead of the file
the link points to.
dir_fd, effective_ids, and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.
Note that most operations will use the effective uid/gid, therefore this
routine can be used in a suid/sgid environment to test if the invoking user
has the specified access to the path.
chdir(path)
Change the current working directory to the specified path.
path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
chmod(path, mode, *, dir_fd=None, follow_symlinks=True)
Change the access permissions of a file.
path
Path to be modified. May always be specified as a str, bytes, or a path-like object.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
mode
Operating-system mode bitfield.
Be careful when using number literals for *mode*. The conventional UNIX notation for
numeric modes uses an octal base, which needs to be indicated with a ``0o`` prefix in
Python.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
chmod will modify the symbolic link itself instead of the file
the link points to.
It is an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
dir_fd and follow_symlinks may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
close(fd)
Close a file descriptor.
closerange(fd_low, fd_high, /)
Closes all file descriptors in [fd_low, fd_high), ignoring errors.
cpu_count()
Return the number of CPUs in the system; return None if indeterminable.
This number is not equivalent to the number of CPUs the current process can
use. The number of usable CPUs can be obtained with
``len(os.sched_getaffinity(0))``
device_encoding(fd)
Return a string describing the encoding of a terminal's file descriptor.
The file descriptor must be attached to a terminal.
If the device is not a terminal, return None.
dup(fd, /)
Return a duplicate of a file descriptor.
dup2(fd, fd2, inheritable=True)
Duplicate file descriptor.
execl(file, *args)
execl(file, *args)
Execute the executable file with argument list args, replacing the
current process.
execle(file, *args)
execle(file, *args, env)
Execute the executable file with argument list args and
environment env, replacing the current process.
execlp(file, *args)
execlp(file, *args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
execlpe(file, *args)
execlpe(file, *args, env)
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the current
process.
execv(path, argv, /)
Execute an executable path with arguments, replacing current process.
path
Path of executable file.
argv
Tuple or list of strings.
execve(path, argv, env)
Execute an executable path with arguments, replacing current process.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.
execvp(file, args)
execvp(file, args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
args may be a list or tuple of strings.
execvpe(file, args, env)
execvpe(file, args, env)
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the
current process.
args may be a list or tuple of strings.
fdopen(fd, mode='r', buffering=-1, encoding=None, *args, **kwargs)
fsdecode(filename)
Decode filename (an os.PathLike, bytes, or str) from the filesystem
encoding with 'surrogateescape' error handler, return str unchanged. On
Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
fsencode(filename)
Encode filename (an os.PathLike, bytes, or str) to the filesystem
encoding with 'surrogateescape' error handler, return bytes unchanged.
On Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
fspath(path)
Return the file system path representation of the object.
If the object is str or bytes, then allow it to pass through as-is. If the
object defines __fspath__(), then return the result of that method. All other
types raise a TypeError.
fstat(fd)
Perform a stat system call on the given file descriptor.
Like stat(), but for an open file descriptor.
Equivalent to os.stat(fd).
fsync(fd)
Force write of fd to disk.
ftruncate(fd, length, /)
Truncate a file, specified by file descriptor, to a specific length.
get_blocking(fd, /)
Get the blocking mode of the file descriptor.
Return False if the O_NONBLOCK flag is set, True if the flag is cleared.
get_exec_path(env=None)
Returns the sequence of directories that will be searched for the
named executable (similar to a shell) when launching a process.
*env* must be an environment variable dict or None. If *env* is None,
os.environ will be used.
get_handle_inheritable(handle, /)
Get the close-on-exe flag of the specified file descriptor.
get_inheritable(fd, /)
Get the close-on-exe flag of the specified file descriptor.
get_terminal_size(...)
Return the size of the terminal window as (columns, lines).
The optional argument fd (default standard output) specifies
which file descriptor should be queried.
If the file descriptor is not connected to a terminal, an OSError
is thrown.
This function will only be defined if an implementation is
available for this system.
shutil.get_terminal_size is the high-level function which should
normally be used, os.get_terminal_size is the low-level implementation.
getcwd()
Return a unicode string representing the current working directory.
getcwdb()
Return a bytes string representing the current working directory.
getenv(key, default=None)
Get an environment variable, return None if it doesn't exist.
The optional second argument can specify an alternate default.
key, default and the result are str.
getlogin()
Return the actual login name.
getpid()
Return the current process id.
getppid()
Return the parent's process id.
If the parent process has already exited, Windows machines will still
return its id; others systems will return the id of the 'init' process (1).
isatty(fd, /)
Return True if the fd is connected to a terminal.
Return True if the file descriptor is an open file descriptor
connected to the slave end of a terminal.
kill(pid, signal, /)
Kill a process with a signal.
link(src, dst, *, src_dir_fd=None, dst_dir_fd=None, follow_symlinks=True)
Create a hard link to a file.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
If follow_symlinks is False, and the last element of src is a symbolic
link, link will create a link to the symbolic link itself instead of the
file the link points to.
src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your
platform. If they are unavailable, using them will raise a
NotImplementedError.
listdir(path=None)
Return a list containing the names of the files in the directory.
path can be specified as either str, bytes, or a path-like object. If path is bytes,
the filenames returned will also be bytes; in all other circumstances
the filenames returned will be str.
If path is None, uses the path='.'.
On some platforms, path may also be specified as an open file descriptor;\
the file descriptor must refer to a directory.
If this functionality is unavailable, using it raises NotImplementedError.
The list is in arbitrary order. It does not include the special
entries '.' and '..' even if they are present in the directory.
listdrives()
Return a list containing the names of drives in the system.
A drive name typically looks like 'C:\\'.
listmounts(volume)
Return a list containing mount points for a particular volume.
'volume' should be a GUID path as returned from os.listvolumes.
listvolumes()
Return a list containing the volumes in the system.
Volumes are typically represented as a GUID path.
lseek(fd, position, whence, /)
Set the position of a file descriptor. Return the new position.
fd
An open file descriptor, as returned by os.open().
position
Position, interpreted relative to 'whence'.
whence
The relative position to seek from. Valid values are:
- SEEK_SET: seek from the start of the file.
- SEEK_CUR: seek from the current file position.
- SEEK_END: seek from the end of the file.
The return value is the number of bytes relative to the beginning of the file.
lstat(path, *, dir_fd=None)
Perform a stat system call on the given path, without following symbolic links.
Like stat(), but do not follow symbolic links.
Equivalent to stat(path, follow_symlinks=False).
makedirs(name, mode=511, exist_ok=False)
makedirs(name [, mode=0o777][, exist_ok=False])
Super-mkdir; create a leaf directory and all intermediate ones. Works like
mkdir, except that any intermediate path segment (not just the rightmost)
will be created if it does not exist. If the target directory already
exists, raise an OSError if exist_ok is False. Otherwise no exception is
raised. This is recursive.
mkdir(path, mode=511, *, dir_fd=None)
Create a directory.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
The mode argument is ignored on Windows. Where it is used, the current umask
value is first masked out.
open(path, flags, mode=511, *, dir_fd=None)
Open a file for low level IO. Returns a file descriptor (integer).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
pipe()
Create a pipe.
Returns a tuple of two file descriptors:
(read_fd, write_fd)
popen(cmd, mode='r', buffering=-1)
putenv(name, value, /)
Change or add an environment variable.
read(fd, length, /)
Read from a file descriptor. Returns a bytes object.
readlink(path, *, dir_fd=None)
Return a string representing the path to which the symbolic link points.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform. If it is unavailable,
using it will raise a NotImplementedError.
remove(path, *, dir_fd=None)
Remove a file (same as unlink()).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
removedirs(name)
removedirs(name)
Super-rmdir; remove a leaf directory and all empty intermediate
ones. Works like rmdir except that, if the leaf directory is
successfully removed, directories corresponding to rightmost path
segments will be pruned away until either the whole path is
consumed or an error occurs. Errors during this latter phase are
ignored -- they generally mean that a directory was not empty.
rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
renames(old, new)
renames(old, new)
Super-rename; create directories as necessary and delete any left
empty. Works like rename, except creation of any intermediate
directories needed to make the new pathname good is attempted
first. After the rename, directories corresponding to rightmost
path segments of the old name will be pruned until either the
whole path is consumed or a nonempty directory is found.
Note: this function can fail with the new directory structure made
if you lack permissions needed to unlink the leaf directory or
file.
replace(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory, overwriting the destination.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
rmdir(path, *, dir_fd=None)
Remove a directory.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
scandir(path=None)
Return an iterator of DirEntry objects for given path.
path can be specified as either str, bytes, or a path-like object. If path
is bytes, the names of yielded DirEntry objects will also be bytes; in
all other circumstances they will be str.
If path is None, uses the path='.'.
set_blocking(fd, blocking, /)
Set the blocking mode of the specified file descriptor.
Set the O_NONBLOCK flag if blocking is False,
clear the O_NONBLOCK flag otherwise.
set_handle_inheritable(handle, inheritable, /)
Set the inheritable flag of the specified handle.
set_inheritable(fd, inheritable, /)
Set the inheritable flag of the specified file descriptor.
spawnl(mode, file, *args)
spawnl(mode, file, *args) -> integer
Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.
spawnle(mode, file, *args)
spawnle(mode, file, *args, env) -> integer
Execute file with arguments from args in a subprocess with the
supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.
spawnv(mode, path, argv, /)
Execute the program specified by path in a new process.
mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
spawnve(mode, path, argv, env, /)
Execute the program specified by path in a new process.
mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.
startfile(...)
Start a file with its associated application.
When "operation" is not specified or "open", this acts like
double-clicking the file in Explorer, or giving the file name as an
argument to the DOS "start" command: the file is opened with whatever
application (if any) its extension is associated.
When another "operation" is given, it specifies what should be done with
the file. A typical operation is "print".
"arguments" is passed to the application, but should be omitted if the
file is a document.
"cwd" is the working directory for the operation. If "filepath" is
relative, it will be resolved against this directory. This argument
should usually be an absolute path.
"show_cmd" can be used to override the recommended visibility option.
See the Windows ShellExecute documentation for values.
startfile returns as soon as the associated application is launched.
There is no option to wait for the application to close, and no way
to retrieve the application's exit status.
The filepath is relative to the current directory. If you want to use
an absolute path, make sure the first character is not a slash ("/");
the underlying Win32 ShellExecute function doesn't work if it is.
stat(path, *, dir_fd=None, follow_symlinks=True)
Perform a stat system call on the given path.
path
Path to be examined; can be string, bytes, a path-like object or
open-file-descriptor int.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be a relative string; path will then be relative to
that directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
stat will examine the symbolic link itself instead of the file
the link points to.
dir_fd and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.
It's an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
strerror(code, /)
Translate an error code to a message string.
symlink(src, dst, target_is_directory=False, *, dir_fd=None)
Create a symbolic link pointing to src named dst.
target_is_directory is required on Windows if the target is to be
interpreted as a directory. (On Windows, symlink requires
Windows 6.0 or greater, and raises a NotImplementedError otherwise.)
target_is_directory is ignored on non-Windows platforms.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
system(command)
Execute the command in a subshell.
times()
Return a collection containing process timing information.
The object returned behaves like a named tuple with these fields:
(utime, stime, cutime, cstime, elapsed_time)
All fields are floating-point numbers.
truncate(path, length)
Truncate a file, specified by path, to a specific length.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
umask(mask, /)
Set the current numeric umask and return the previous umask.
unlink(path, *, dir_fd=None)
Remove a file (same as remove()).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
unsetenv(name, /)
Delete an environment variable.
urandom(size, /)
Return a bytes object containing random bytes suitable for cryptographic use.
utime(...)
Set the access and modified time of path.
path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
If times is not None, it must be a tuple (atime, mtime);
atime and mtime should be expressed as float seconds since the epoch.
If ns is specified, it must be a tuple (atime_ns, mtime_ns);
atime_ns and mtime_ns should be expressed as integer nanoseconds
since the epoch.
If times is None and ns is unspecified, utime uses the current time.
Specifying tuples for both times and ns is an error.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
If follow_symlinks is False, and the last element of the path is a symbolic
link, utime will modify the symbolic link itself instead of the file the
link points to.
It is an error to use dir_fd or follow_symlinks when specifying path
as an open file descriptor.
dir_fd and follow_symlinks may not be available on your platform.
If they are unavailable, using them will raise a NotImplementedError.
waitpid(pid, options, /)
Wait for completion of a given process.
Returns a tuple of information regarding the process:
(pid, status << 8)
The options argument is ignored on Windows.
waitstatus_to_exitcode(status)
Convert a wait status to an exit code.
On Unix:
* If WIFEXITED(status) is true, return WEXITSTATUS(status).
* If WIFSIGNALED(status) is true, return -WTERMSIG(status).
* Otherwise, raise a ValueError.
On Windows, return status shifted right by 8 bits.
On Unix, if the process is being traced or if waitpid() was called with
WUNTRACED option, the caller must first check if WIFSTOPPED(status) is true.
This function must not be called if WIFSTOPPED(status) is true.
walk(top, topdown=True, onerror=None, followlinks=False)
Directory tree generator.
For each directory in the directory tree rooted at top (including top
itself, but excluding '.' and '..'), yields a 3-tuple
dirpath, dirnames, filenames
dirpath is a string, the path to the directory. dirnames is a list of
the names of the subdirectories in dirpath (including symlinks to directories,
and excluding '.' and '..').
filenames is a list of the names of the non-directory files in dirpath.
Note that the names in the lists are just names, with no path components.
To get a full path (which begins with top) to a file or directory in
dirpath, do os.path.join(dirpath, name).
If optional arg 'topdown' is true or not specified, the triple for a
directory is generated before the triples for any of its subdirectories
(directories are generated top down). If topdown is false, the triple
for a directory is generated after the triples for all of its
subdirectories (directories are generated bottom up).
When topdown is true, the caller can modify the dirnames list in-place
(e.g., via del or slice assignment), and walk will only recurse into the
subdirectories whose names remain in dirnames; this can be used to prune the
search, or to impose a specific order of visiting. Modifying dirnames when
topdown is false has no effect on the behavior of os.walk(), since the
directories in dirnames have already been generated by the time dirnames
itself is generated. No matter the value of topdown, the list of
subdirectories is retrieved before the tuples for the directory and its
subdirectories are generated.
By default errors from the os.scandir() call are ignored. If
optional arg 'onerror' is specified, it should be a function; it
will be called with one argument, an OSError instance. It can
report the error to continue with the walk, or raise the exception
to abort the walk. Note that the filename is available as the
filename attribute of the exception object.
By default, os.walk does not follow symbolic links to subdirectories on
systems that support them. In order to get this functionality, set the
optional argument 'followlinks' to true.
Caution: if you pass a relative pathname for top, don't change the
current working directory between resumptions of walk. walk never
changes the current directory, and assumes that the client doesn't
either.
Example:
import os
from os.path import join, getsize
for root, dirs, files in os.walk('python/Lib/email'):
print(root, "consumes ")
print(sum(getsize(join(root, name)) for name in files), end=" ")
print("bytes in", len(files), "non-directory files")
if 'CVS' in dirs:
dirs.remove('CVS') # don't visit CVS directories
write(fd, data, /)
Write a bytes object to a file descriptor.
DATA
EX_OK = 0
F_OK = 0
O_APPEND = 8
O_BINARY = 32768
O_CREAT = 256
O_EXCL = 1024
O_NOINHERIT = 128
O_RANDOM = 16
O_RDONLY = 0
O_RDWR = 2
O_SEQUENTIAL = 32
O_SHORT_LIVED = 4096
O_TEMPORARY = 64
O_TEXT = 16384
O_TRUNC = 512
O_WRONLY = 1
P_DETACH = 4
P_NOWAIT = 1
P_NOWAITO = 3
P_OVERLAY = 2
P_WAIT = 0
R_OK = 4
SEEK_CUR = 1
SEEK_END = 2
SEEK_SET = 0
TMP_MAX = 2147483647
W_OK = 2
X_OK = 1
__all__ = ['altsep', 'curdir', 'pardir', 'sep', 'pathsep', 'linesep', ...
altsep = '/'
curdir = '.'
defpath = r'.;C:\bin'
devnull = 'nul'
environ = environ({'ALLUSERSPROFILE': 'C:\\ProgramData', '...undled\\l...
extsep = '.'
linesep = '\r\n'
name = 'nt'
pardir = '..'
pathsep = ';'
sep = r'\'
supports_bytes_environ = False
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\os.py
http.cookiejar.parse_ns_headers
Python Library Documentation: function parse_ns_headers in module http.cookiejar
parse_ns_headers(ns_headers)
Ad-hoc parser for Netscape protocol cookie-attributes.
The old Netscape cookie format for Set-Cookie can for instance contain
an unquoted "," in the expires field, so we have to use this ad-hoc
parser instead of split_header_words.
XXX This may not make the best possible effort to parse all the crap
that Netscape Cookie headers contain. Ronald Tschalar's HTTPClient
parser is probably better, so could do worse than following that if
this ever gives any trouble.
Currently, this is also used for parsing RFC 2109 cookies.
http.cookiejar.re
Python Library Documentation: package re
NAME
re - Support for regular expressions (RE).
MODULE REFERENCE
https://docs.python.org/3.12/library/re.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides regular expression matching operations similar to
those found in Perl. It supports both 8-bit and Unicode strings; both
the pattern and the strings being processed can contain null bytes and
characters outside the US ASCII range.
Regular expressions can contain both special and ordinary characters.
Most ordinary characters, like "A", "a", or "0", are the simplest
regular expressions; they simply match themselves. You can
concatenate ordinary characters, so last matches the string 'last'.
The special characters are:
"." Matches any character except a newline.
"^" Matches the start of the string.
"$" Matches the end of the string or just before the newline at
the end of the string.
"*" Matches 0 or more (greedy) repetitions of the preceding RE.
Greedy means that it will match as many repetitions as possible.
"+" Matches 1 or more (greedy) repetitions of the preceding RE.
"?" Matches 0 or 1 (greedy) of the preceding RE.
*?,+?,?? Non-greedy versions of the previous three special characters.
{m,n} Matches from m to n repetitions of the preceding RE.
{m,n}? Non-greedy version of the above.
"\\" Either escapes special characters or signals a special sequence.
[] Indicates a set of characters.
A "^" as the first character indicates a complementing set.
"|" A|B, creates an RE that will match either A or B.
(...) Matches the RE inside the parentheses.
The contents can be retrieved or matched later in the string.
(?aiLmsux) The letters set the corresponding flags defined below.
(?:...) Non-grouping version of regular parentheses.
(?P<name>...) The substring matched by the group is accessible by name.
(?P=name) Matches the text matched earlier by the group named name.
(?#...) A comment; ignored.
(?=...) Matches if ... matches next, but doesn't consume the string.
(?!...) Matches if ... doesn't match next.
(?<=...) Matches if preceded by ... (must be fixed length).
(?<!...) Matches if not preceded by ... (must be fixed length).
(?(id/name)yes|no) Matches yes pattern if the group with id/name matched,
the (optional) no pattern otherwise.
The special sequences consist of "\\" and a character from the list
below. If the ordinary character is not on the list, then the
resulting RE will match the second character.
\number Matches the contents of the group of the same number.
\A Matches only at the start of the string.
\Z Matches only at the end of the string.
\b Matches the empty string, but only at the start or end of a word.
\B Matches the empty string, but not at the start or end of a word.
\d Matches any decimal digit; equivalent to the set [0-9] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode digits.
\D Matches any non-digit character; equivalent to [^\d].
\s Matches any whitespace character; equivalent to [ \t\n\r\f\v] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode whitespace characters.
\S Matches any non-whitespace character; equivalent to [^\s].
\w Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]
in bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the
range of Unicode alphanumeric characters (letters plus digits
plus underscore).
With LOCALE, it will match the set [0-9_] plus characters defined
as letters for the current locale.
\W Matches the complement of \w.
\\ Matches a literal backslash.
This module exports the following functions:
match Match a regular expression pattern to the beginning of a string.
fullmatch Match a regular expression pattern to all of a string.
search Search a string for the presence of a pattern.
sub Substitute occurrences of a pattern found in a string.
subn Same as sub, but also return the number of substitutions made.
split Split a string by the occurrences of a pattern.
findall Find all occurrences of a pattern in a string.
finditer Return an iterator yielding a Match object for each match.
compile Compile a pattern into a Pattern object.
purge Clear the regular expression cache.
escape Backslash all non-alphanumerics in a string.
Each function other than purge and escape can take an optional 'flags' argument
consisting of one or more of the following module constants, joined by "|".
A, L, and U are mutually exclusive.
A ASCII For string patterns, make \w, \W, \b, \B, \d, \D
match the corresponding ASCII character categories
(rather than the whole Unicode categories, which is the
default).
For bytes patterns, this flag is the only available
behaviour and needn't be specified.
I IGNORECASE Perform case-insensitive matching.
L LOCALE Make \w, \W, \b, \B, dependent on the current locale.
M MULTILINE "^" matches the beginning of lines (after a newline)
as well as the string.
"$" matches the end of lines (before a newline) as well
as the end of the string.
S DOTALL "." matches any character at all, including the newline.
X VERBOSE Ignore whitespace and comments for nicer looking RE's.
U UNICODE For compatibility only. Ignored for string patterns (it
is the default), and forbidden for bytes patterns.
This module also defines an exception 'error'.
PACKAGE CONTENTS
_casefix
_compiler
_constants
_parser
CLASSES
builtins.Exception(builtins.BaseException)
error
builtins.object
Match
Pattern
enum.IntFlag(builtins.int, enum.ReprEnum, enum.Flag)
RegexFlag
class Match(builtins.object)
| The result of re.match() and re.search().
| Match objects always have a boolean value of True.
|
| Methods defined here:
|
| __copy__(self, /)
|
| __deepcopy__(self, memo, /)
|
| __getitem__(self, key, /)
| Return self[key].
|
| __repr__(self, /)
| Return repr(self).
|
| end(self, group=0, /)
| Return index of the end of the substring matched by group.
|
| expand(self, /, template)
| Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.
|
| group(...)
| group([group1, ...]) -> str or tuple.
| Return subgroup(s) of the match by indices or names.
| For 0 returns the entire match.
|
| groupdict(self, /, default=None)
| Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
|
| default
| Is used for groups that did not participate in the match.
|
| groups(self, /, default=None)
| Return a tuple containing all the subgroups of the match, from 1.
|
| default
| Is used for groups that did not participate in the match.
|
| span(self, group=0, /)
| For match object m, return the 2-tuple (m.start(group), m.end(group)).
|
| start(self, group=0, /)
| Return index of the start of the substring matched by group.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| endpos
| The index into the string beyond which the RE engine will not go.
|
| lastgroup
| The name of the last matched capturing group.
|
| lastindex
| The integer index of the last matched capturing group.
|
| pos
| The index into the string at which the RE engine started looking for a match.
|
| re
| The regular expression object.
|
| regs
|
| string
| The string passed to match() or search().
class Pattern(builtins.object)
| Compiled regular expression object.
|
| Methods defined here:
|
| __copy__(self, /)
|
| __deepcopy__(self, memo, /)
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| findall(self, /, string, pos=0, endpos=9223372036854775807)
| Return a list of all non-overlapping matches of pattern in string.
|
| finditer(self, /, string, pos=0, endpos=9223372036854775807)
| Return an iterator over all non-overlapping matches for the RE pattern in string.
|
| For each match, the iterator returns a match object.
|
| fullmatch(self, /, string, pos=0, endpos=9223372036854775807)
| Matches against all of the string.
|
| match(self, /, string, pos=0, endpos=9223372036854775807)
| Matches zero or more characters at the beginning of the string.
|
| scanner(self, /, string, pos=0, endpos=9223372036854775807)
|
| search(self, /, string, pos=0, endpos=9223372036854775807)
| Scan through string looking for a match, and return a corresponding match object instance.
|
| Return None if no position in the string matches.
|
| split(self, /, string, maxsplit=0)
| Split string by the occurrences of pattern.
|
| sub(self, /, repl, string, count=0)
| Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
|
| subn(self, /, repl, string, count=0)
| Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| flags
| The regex matching flags.
|
| groupindex
| A dictionary mapping group names to group numbers.
|
| groups
| The number of capturing groups in the pattern.
|
| pattern
| The pattern string from which the RE object was compiled.
class RegexFlag(enum.IntFlag)
| RegexFlag(*values)
|
| An enumeration.
|
| Method resolution order:
| RegexFlag
| enum.IntFlag
| builtins.int
| enum.ReprEnum
| enum.Flag
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __and__(self, other) from enum.Flag
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __invert__(self) from enum.Flag
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __or__(self, other) from enum.Flag
| Return self|value.
|
| __rand__ = __and__(self, other)
|
| __repr__ = global_flag_repr(self) from enum
| use module.flag_name instead of class.flag_name
|
| the module is the last module in case of a multi-module name
|
| __ror__ = __or__(self, other)
|
| __rxor__ = __xor__(self, other)
|
| __str__(self, /) from builtins.object
| Return str(self).
|
| __xor__(self, other) from enum.Flag
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ASCII = re.ASCII
|
| DEBUG = re.DEBUG
|
| DOTALL = re.DOTALL
|
| IGNORECASE = re.IGNORECASE
|
| LOCALE = re.LOCALE
|
| MULTILINE = re.MULTILINE
|
| TEMPLATE = re.TEMPLATE
|
| UNICODE = re.UNICODE
|
| VERBOSE = re.VERBOSE
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Flag:
|
| __contains__(self, other)
| Returns True if self has at least the same flags set as other.
|
| __iter__(self)
| Returns flags in definition order.
|
| __len__(self)
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __getitem__(name)
| Return the member matching `name`.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class error(builtins.Exception)
| error(msg, pattern=None, pos=None)
|
| Exception raised for invalid regular expressions.
|
| Attributes:
|
| msg: The unformatted error message
| pattern: The regular expression pattern
| pos: The index in the pattern where compilation failed (may be None)
| lineno: The line corresponding to pos (may be None)
| colno: The column corresponding to pos (may be None)
|
| Method resolution order:
| error
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, msg, pattern=None, pos=None) from re._constants.error
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
compile(pattern, flags=0)
Compile a regular expression pattern, returning a Pattern object.
escape(pattern)
Escape special characters in a string.
findall(pattern, string, flags=0)
Return a list of all non-overlapping matches in the string.
If one or more capturing groups are present in the pattern, return
a list of groups; this will be a list of tuples if the pattern
has more than one group.
Empty matches are included in the result.
finditer(pattern, string, flags=0)
Return an iterator over all non-overlapping matches in the
string. For each match, the iterator returns a Match object.
Empty matches are included in the result.
fullmatch(pattern, string, flags=0)
Try to apply the pattern to all of the string, returning
a Match object, or None if no match was found.
match(pattern, string, flags=0)
Try to apply the pattern at the start of the string, returning
a Match object, or None if no match was found.
purge()
Clear the regular expression caches
search(pattern, string, flags=0)
Scan through string looking for a match to the pattern, returning
a Match object, or None if no match was found.
split(pattern, string, maxsplit=0, flags=0)
Split the source string by the occurrences of the pattern,
returning a list containing the resulting substrings. If
capturing parentheses are used in pattern, then the text of all
groups in the pattern are also returned as part of the resulting
list. If maxsplit is nonzero, at most maxsplit splits occur,
and the remainder of the string is returned as the final element
of the list.
sub(pattern, repl, string, count=0, flags=0)
Return the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in string by the
replacement repl. repl can be either a string or a callable;
if a string, backslash escapes in it are processed. If it is
a callable, it's passed the Match object and must return
a replacement string to be used.
subn(pattern, repl, string, count=0, flags=0)
Return a 2-tuple containing (new_string, number).
new_string is the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in the source
string by the replacement repl. number is the number of
substitutions that were made. repl can be either a string or a
callable; if a string, backslash escapes in it are processed.
If it is a callable, it's passed the Match object and must
return a replacement string to be used.
template(pattern, flags=0)
Compile a template pattern, returning a Pattern object, deprecated
DATA
A = re.ASCII
ASCII = re.ASCII
DOTALL = re.DOTALL
I = re.IGNORECASE
IGNORECASE = re.IGNORECASE
L = re.LOCALE
LOCALE = re.LOCALE
M = re.MULTILINE
MULTILINE = re.MULTILINE
NOFLAG = re.NOFLAG
S = re.DOTALL
U = re.UNICODE
UNICODE = re.UNICODE
VERBOSE = re.VERBOSE
X = re.VERBOSE
__all__ = ['match', 'fullmatch', 'search', 'sub', 'subn', 'split', 'fi...
VERSION
2.2.1
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\re\__init__.py
http.cookiejar.reach
Python Library Documentation: function reach in module http.cookiejar
reach(h)
Return reach of host h, as defined by RFC 2965, section 1.
The reach R of a host name H is defined as follows:
* If
- H is the host domain name of a host; and,
- H has the form A.B; and
- A has no embedded (that is, interior) dots; and
- B has at least one embedded dot, or B is the string "local".
then the reach of H is .B.
* Otherwise, the reach of H is H.
>>> reach("www.acme.com")
'.acme.com'
>>> reach("acme.com")
'acme.com'
>>> reach("acme.local")
'.local'
http.cookiejar.request_host
Python Library Documentation: function request_host in module http.cookiejar
request_host(request)
Return request-host, as defined by RFC 2965.
Variation from RFC: returned value is lowercased, for convenient
comparison.
http.cookiejar.request_path
Python Library Documentation: function request_path in module http.cookiejar
request_path(request)
Path component of request-URI, as defined by RFC 2965.
http.cookiejar.request_port
Python Library Documentation: function request_port in module http.cookiejar request_port(request)
http.cookiejar.split_header_words
Python Library Documentation: function split_header_words in module http.cookiejar
split_header_words(header_values)
Parse header values into a list of lists containing key,value pairs.
The function knows how to deal with ",", ";" and "=" as well as quoted
values after "=". A list of space separated tokens are parsed as if they
were separated by ";".
If the header_values passed as argument contains multiple values, then they
are treated as if they were a single value separated by comma ",".
This means that this function is useful for parsing header fields that
follow this syntax (BNF as from the HTTP/1.1 specification, but we relax
the requirement for tokens).
headers = #header
header = (token | parameter) *( [";"] (token | parameter))
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
qdtext = <any TEXT except <">>
quoted-pair = "\" CHAR
parameter = attribute "=" value
attribute = token
value = token | quoted-string
Each header is represented by a list of key/value pairs. The value for a
simple token (not part of a parameter) is None. Syntactically incorrect
headers will not necessarily be parsed as you would want.
This is easier to describe with some examples:
>>> split_header_words(['foo="bar"; port="80,81"; discard, bar=baz'])
[[('foo', 'bar'), ('port', '80,81'), ('discard', None)], [('bar', 'baz')]]
>>> split_header_words(['text/html; charset="iso-8859-1"'])
[[('text/html', None), ('charset', 'iso-8859-1')]]
>>> split_header_words([r'Basic realm="\"foo\bar\""'])
[[('Basic', None), ('realm', '"foobar"')]]
http.cookiejar.strip_quotes
Python Library Documentation: function strip_quotes in module http.cookiejar strip_quotes(text)
http.cookiejar.time
Python Library Documentation: built-in module time
NAME
time - This module provides various functions to manipulate time values.
DESCRIPTION
There are two standard representations of time. One is the number
of seconds since the Epoch, in UTC (a.k.a. GMT). It may be an integer
or a floating-point number (to represent fractions of seconds).
The epoch is the point where the time starts, the return value of time.gmtime(0).
It is January 1, 1970, 00:00:00 (UTC) on all platforms.
The other representation is a tuple of 9 integers giving local time.
The tuple items are:
year (including century, e.g. 1998)
month (1-12)
day (1-31)
hours (0-23)
minutes (0-59)
seconds (0-59)
weekday (0-6, Monday is 0)
Julian day (day in the year, 1-366)
DST (Daylight Savings Time) flag (-1, 0 or 1)
If the DST flag is 0, the time is given in the regular time zone;
if it is 1, the time is given in the DST time zone;
if it is -1, mktime() should guess based on the date and time.
CLASSES
builtins.tuple(builtins.object)
struct_time
class struct_time(builtins.tuple)
| struct_time(iterable=(), /)
|
| The time value as returned by gmtime(), localtime(), and strptime(), and
| accepted by asctime(), mktime() and strftime(). May be considered as a
| sequence of 9 integers.
|
| Note that several fields' values are not the same as those defined by
| the C language standard for struct tm. For example, the value of the
| field tm_year is the actual year, not year - 1900. See individual
| fields' descriptions for details.
|
| Method resolution order:
| struct_time
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| tm_gmtoff
| offset from UTC in seconds
|
| tm_hour
| hours, range [0, 23]
|
| tm_isdst
| 1 if summer time is in effect, 0 if not, and -1 if unknown
|
| tm_mday
| day of month, range [1, 31]
|
| tm_min
| minutes, range [0, 59]
|
| tm_mon
| month of year, range [1, 12]
|
| tm_sec
| seconds, range [0, 61])
|
| tm_wday
| day of week, range [0, 6], Monday is 0
|
| tm_yday
| day of year, range [1, 366]
|
| tm_year
| year, for example, 1993
|
| tm_zone
| abbreviation of timezone name
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('tm_year', 'tm_mon', 'tm_mday', 'tm_hour', 'tm_min',...
|
| n_fields = 11
|
| n_sequence_fields = 9
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
FUNCTIONS
asctime(...)
asctime([tuple]) -> string
Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.
When the time tuple is not present, current time as returned by localtime()
is used.
ctime(...)
ctime(seconds) -> string
Convert a time in seconds since the Epoch to a string in local time.
This is equivalent to asctime(localtime(seconds)). When the time tuple is
not present, current time as returned by localtime() is used.
get_clock_info(...)
get_clock_info(name: str) -> dict
Get information of the specified clock.
gmtime(...)
gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,
tm_sec, tm_wday, tm_yday, tm_isdst)
Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.
GMT). When 'seconds' is not passed in, convert the current time instead.
If the platform supports the tm_gmtoff and tm_zone, they are available as
attributes only.
localtime(...)
localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,
tm_sec,tm_wday,tm_yday,tm_isdst)
Convert seconds since the Epoch to a time tuple expressing local time.
When 'seconds' is not passed in, convert the current time instead.
mktime(...)
mktime(tuple) -> floating-point number
Convert a time tuple in local time to seconds since the Epoch.
Note that mktime(gmtime(0)) will not generally return zero for most
time zones; instead the returned value will either be equal to that
of the timezone or altzone attributes on the time module.
monotonic(...)
monotonic() -> float
Monotonic clock, cannot go backward.
monotonic_ns(...)
monotonic_ns() -> int
Monotonic clock, cannot go backward, as nanoseconds.
perf_counter(...)
perf_counter() -> float
Performance counter for benchmarking.
perf_counter_ns(...)
perf_counter_ns() -> int
Performance counter for benchmarking as nanoseconds.
process_time(...)
process_time() -> float
Process time for profiling: sum of the kernel and user-space CPU time.
process_time_ns(...)
process_time() -> int
Process time for profiling as nanoseconds:
sum of the kernel and user-space CPU time.
sleep(...)
sleep(seconds)
Delay execution for a given number of seconds. The argument may be
a floating-point number for subsecond precision.
strftime(...)
strftime(format[, tuple]) -> string
Convert a time tuple to a string according to a format specification.
See the library reference manual for formatting codes. When the time tuple
is not present, current time as returned by localtime() is used.
Commonly used format codes:
%Y Year with century as a decimal number.
%m Month as a decimal number [01,12].
%d Day of the month as a decimal number [01,31].
%H Hour (24-hour clock) as a decimal number [00,23].
%M Minute as a decimal number [00,59].
%S Second as a decimal number [00,61].
%z Time zone offset from UTC.
%a Locale's abbreviated weekday name.
%A Locale's full weekday name.
%b Locale's abbreviated month name.
%B Locale's full month name.
%c Locale's appropriate date and time representation.
%I Hour (12-hour clock) as a decimal number [01,12].
%p Locale's equivalent of either AM or PM.
Other codes may be available on your platform. See documentation for
the C library strftime function.
strptime(...)
strptime(string, format) -> struct_time
Parse a string to a time tuple according to a format specification.
See the library reference manual for formatting codes (same as
strftime()).
Commonly used format codes:
%Y Year with century as a decimal number.
%m Month as a decimal number [01,12].
%d Day of the month as a decimal number [01,31].
%H Hour (24-hour clock) as a decimal number [00,23].
%M Minute as a decimal number [00,59].
%S Second as a decimal number [00,61].
%z Time zone offset from UTC.
%a Locale's abbreviated weekday name.
%A Locale's full weekday name.
%b Locale's abbreviated month name.
%B Locale's full month name.
%c Locale's appropriate date and time representation.
%I Hour (12-hour clock) as a decimal number [01,12].
%p Locale's equivalent of either AM or PM.
Other codes may be available on your platform. See documentation for
the C library strftime function.
thread_time(...)
thread_time() -> float
Thread time for profiling: sum of the kernel and user-space CPU time.
thread_time_ns(...)
thread_time() -> int
Thread time for profiling as nanoseconds:
sum of the kernel and user-space CPU time.
time(...)
time() -> floating-point number
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.
time_ns(...)
time_ns() -> int
Return the current time in nanoseconds since the Epoch.
DATA
altzone = -10800
daylight = 1
timezone = -7200
tzname = ('Egypt Standard Time', 'Egypt Daylight Time')
FILE
(built-in)
http.cookiejar.time2isoz
Python Library Documentation: function time2isoz in module http.cookiejar
time2isoz(t=None)
Return a string representing time in seconds since epoch, t.
If the function is called without an argument, it will use the current
time.
The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ",
representing Universal Time (UTC, aka GMT). An example of this format is:
1994-11-24 08:49:37Z
http.cookiejar.time2netscape
Python Library Documentation: function time2netscape in module http.cookiejar
time2netscape(t=None)
Return a string representing time in seconds since epoch, t.
If the function is called without an argument, it will use the current
time.
The format of the returned string is like this:
Wed, DD-Mon-YYYY HH:MM:SS GMT
http.cookiejar.timegm
Python Library Documentation: function timegm in module calendar
timegm(tuple)
Unrelated but handy function to calculate Unix timestamp from GMT.
http.cookiejar.unmatched
Python Library Documentation: function unmatched in module http.cookiejar
unmatched(match)
Return unmatched part of re.Match object.
http.cookiejar.uppercase_escaped_char
Python Library Documentation: function uppercase_escaped_char in module http.cookiejar uppercase_escaped_char(match)
http.cookiejar.urllib
Python Library Documentation: package urllib
NAME
urllib
MODULE REFERENCE
https://docs.python.org/3.12/library/urllib.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
PACKAGE CONTENTS
error
parse
request
response
robotparser
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\urllib\__init__.py
http.cookiejar.user_domain_match
Python Library Documentation: function user_domain_match in module http.cookiejar
user_domain_match(A, B)
For blocking/accepting domains.
A and B may be host domain names or IP addresses.