Lines Matching +full:whatwg +full:- +full:encoding
1 :mod:`urllib.parse` --- Parse URLs into components
16 --------------
35 -----------
42 Parse a URL into six components, returning a 6-item :term:`named tuple`. This
59 ... "highlight=params#url-parsing")
63 query='highlight=params', fragment='url-parsing')
107 +------------------+-------+-------------------------+------------------------+
111 +------------------+-------+-------------------------+------------------------+
113 +------------------+-------+-------------------------+------------------------+
115 +------------------+-------+-------------------------+------------------------+
118 +------------------+-------+-------------------------+------------------------+
120 +------------------+-------+-------------------------+------------------------+
122 +------------------+-------+-------------------------+------------------------+
124 +------------------+-------+-------------------------+------------------------+
126 +------------------+-------+-------------------------+------------------------+
128 +------------------+-------+-------------------------+------------------------+
131 +------------------+-------+-------------------------+------------------------+
135 :ref:`urlparse-result-object` for more information on the result object.
141 normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
165 security <url-parsing-security>` for details.
176 Out-of-range port numbers now raise :exc:`ValueError`, instead of
184 .. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors=…
187 :mimetype:`application/x-www-form-urlencoded`). Data are returned as a
192 values in percent-encoded queries should be treated as blank strings. A true value
201 The optional *encoding* and *errors* parameters specify how to decode
202 percent-encoded sequences into Unicode characters, as accepted by the
218 Add *encoding* and *errors* parameters.
230 .. function:: parse_qsl(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors…
233 :mimetype:`application/x-www-form-urlencoded`). Data are returned as a list of
237 values in percent-encoded queries should be treated as blank strings. A true value
246 The optional *encoding* and *errors* parameters specify how to decode
247 percent-encoded sequences into Unicode characters, as accepted by the
261 Add *encoding* and *errors* parameters.
276 argument can be any six-item iterable. This may result in a slightly
288 separate the path segments and parameters. This function returns a 5-item
296 +------------------+-------+-------------------------+----------------------+
300 +------------------+-------+-------------------------+----------------------+
302 +------------------+-------+-------------------------+----------------------+
304 +------------------+-------+-------------------------+----------------------+
306 +------------------+-------+-------------------------+----------------------+
308 +------------------+-------+-------------------------+----------------------+
310 +------------------+-------+-------------------------+----------------------+
312 +------------------+-------+-------------------------+----------------------+
314 +------------------+-------+-------------------------+----------------------+
317 +------------------+-------+-------------------------+----------------------+
321 :ref:`urlparse-result-object` for more information on the result object.
327 normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
331 Following some of the `WHATWG spec`_ that updates RFC 3986, leading C0
338 security <url-parsing-security>` for details.
341 Out-of-range port numbers now raise :exc:`ValueError`, instead of
352 Leading WHATWG C0 control and space characters are stripped from the URL.
354 .. _WHATWG spec: https://url.spec.whatwg.org/#concept-basic-url-parser
359 complete URL as a string. The *parts* argument can be any five-item
409 +------------------+-------+-------------------------+----------------------+
413 +------------------+-------+-------------------------+----------------------+
415 +------------------+-------+-------------------------+----------------------+
417 See section :ref:`urlparse-result-object` for more information on the result
421 Result is a structured object rather than a simple 2-tuple.
430 .. _url-parsing-security:
433 --------------------
452 have different needs and desired constraints. For instance the living `WHATWG
459 .. _parsing-ascii-encoded-bytes:
462 ---------------------------
476 :exc:`TypeError` being raised, while attempting to pass in non-ASCII
484 :class:`str` and :class:`bytes` methods (except that the default encoding
485 is ``'ascii'`` rather than ``'utf-8'``). Each produces a value of a
491 that may contain non-ASCII data will need to do their own decoding from
503 .. _urlparse-result-object:
506 ------------------------
511 those functions, the encoding and decoding support described in the
516 Return the re-combined version of the original URL as a string. This may
591 -----------
595 encoding non-ASCII text. They also support reversing these operations to
599 .. function:: quote(string, safe='/', encoding=None, errors=None)
602 digits, and the characters ``'_.-~'`` are never quoted. By default, this
605 quoted --- its default value is ``'/'``.
613 The optional *encoding* and *errors* parameters specify how to deal with
614 non-ASCII characters, as accepted by the :meth:`str.encode` method.
615 *encoding* defaults to ``'utf-8'``.
618 *encoding* and *errors* must not be supplied if *string* is a
621 Note that ``quote(string, safe, encoding, errors)`` is equivalent to
622 ``quote_from_bytes(string.encode(encoding, errors), safe)``.
627 .. function:: quote_plus(string, safe='', encoding=None, errors=None)
640 :class:`str`, and does not perform string-to-bytes encoding.
646 .. function:: unquote(string, encoding='utf-8', errors='replace')
648 Replace ``%xx`` escapes with their single-character equivalent.
649 The optional *encoding* and *errors* parameters specify how to decode
650 percent-encoded sequences into Unicode characters, as accepted by the
655 *encoding* defaults to ``'utf-8'``.
667 .. function:: unquote_plus(string, encoding='utf-8', errors='replace')
679 Replace ``%xx`` escapes with their single-octet equivalent, and return a
684 If it is a :class:`str`, unescaped non-ASCII characters in *string*
685 are encoded into UTF-8 bytes.
690 .. function:: urlencode(query, doseq=False, safe='', encoding=None, \
693 Convert a mapping object or a sequence of two-element tuples, which may
694 contain :class:`str` or :class:`bytes` objects, to a percent-encoded ASCII
705 (``application/x-www-form-urlencoded``). An alternate function that can be
710 When a sequence of two-element tuples is used as the *query*
718 The *safe*, *encoding*, and *errors* parameters are passed down to
719 *quote_via* (the *encoding* and *errors* parameters are only passed
722 To reverse this encoding process, :func:`parse_qs` and :func:`parse_qsl` are
725 Refer to :ref:`urllib examples <urllib-examples>` to find out how the
738 `WHATWG`_ - URL Living standard
740 application/x-www-form-urlencoded format, and their API.
742 :rfc:`3986` - Uniform Resource Identifiers
745 mostly for backward compatibility purposes and for certain de-facto
748 :rfc:`2732` - Format for Literal IPv6 Addresses in URL's.
751 :rfc:`2396` - Uniform Resource Identifiers (URI): Generic Syntax
755 :rfc:`2368` - The mailto URL scheme.
758 :rfc:`1808` - Relative Uniform Resource Locators
763 :rfc:`1738` - Uniform Resource Locators (URL)
766 .. _WHATWG: https://url.spec.whatwg.org/