• Home
  • Raw
  • Download

Lines Matching +full:decode +full:- +full:uri +full:- +full:component

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
48 result, except for a leading slash in the *path* component, which is retained if
59 ... "highlight=params#url-parsing")
63 query='highlight=params', fragment='url-parsing')
78 a path component.
101 or query component, and :attr:`fragment` is set to the empty string in
107 +------------------+-------+-------------------------+------------------------+
111 +------------------+-------+-------------------------+------------------------+
113 +------------------+-------+-------------------------+------------------------+
115 +------------------+-------+-------------------------+------------------------+
118 +------------------+-------+-------------------------+------------------------+
119 | :attr:`query` | 4 | Query component | empty string |
120 +------------------+-------+-------------------------+------------------------+
122 +------------------+-------+-------------------------+------------------------+
124 +------------------+-------+-------------------------+------------------------+
126 +------------------+-------+-------------------------+------------------------+
128 +------------------+-------+-------------------------+------------------------+
131 +------------------+-------+-------------------------+------------------------+
135 :ref:`urlparse-result-object` for more information on the result object.
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
203 :meth:`bytes.decode` method.
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
248 :meth:`bytes.decode` method.
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 +------------------+-------+-------------------------+----------------------+
305 | :attr:`query` | 3 | Query component | empty string |
306 +------------------+-------+-------------------------+----------------------+
308 +------------------+-------+-------------------------+----------------------+
310 +------------------+-------+-------------------------+----------------------+
312 +------------------+-------+-------------------------+----------------------+
314 +------------------+-------+-------------------------+----------------------+
317 +------------------+-------+-------------------------+----------------------+
321 :ref:`urlparse-result-object` for more information on the result object.
338 security <url-parsing-security>` for details.
341 Out-of-range port numbers now raise :exc:`ValueError`, instead of
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 --------------------
442 component parts as empty strings. Or components may contain more than perhaps
447 code before trusting a returned component part. Does that ``scheme`` make
459 .. _parsing-ascii-encoded-bytes:
462 ---------------------------
476 :exc:`TypeError` being raised, while attempting to pass in non-ASCII
482 data) or a :meth:`decode` method (when the result contains :class:`bytes`
485 is ``'ascii'`` rather than ``'utf-8'``). Each produces a value of a
488 :meth:`decode` methods).
491 that may contain non-ASCII data will need to do their own decoding from
503 .. _urlparse-result-object:
506 ------------------------
516 Return the re-combined version of the original URL as a string. This may
568 data. The :meth:`decode` method returns a :class:`DefragResult`
576 data. The :meth:`decode` method returns a :class:`ParseResult`
584 data. The :meth:`decode` method returns a :class:`SplitResult`
591 -----------
595 encoding non-ASCII text. They also support reversing these operations to
596 recreate the original data from the contents of a URL component if that
602 digits, and the characters ``'_.-~'`` are never quoted. By default, this
605 quoted --- its default value is ``'/'``.
614 non-ASCII characters, as accepted by the :meth:`str.encode` method.
615 *encoding* defaults to ``'utf-8'``.
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
651 :meth:`bytes.decode` method.
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.
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*
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)