A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pypi.python.org/pypi/yarl below:

yarl · PyPI

yarl

The module provides handy URL class for URL parsing and changing.

Introduction

Url is constructed from str:

>>> from yarl import URL
>>> url = URL('https://www.python.org/~guido?arg=1#frag')
>>> url
URL('https://www.python.org/~guido?arg=1#frag')

All url parts: scheme, user, password, host, port, path, query and fragment are accessible by properties:

>>> url.scheme
'https'
>>> url.host
'www.python.org'
>>> url.path
'/~guido'
>>> url.query_string
'arg=1'
>>> url.query
<MultiDictProxy('arg': '1')>
>>> url.fragment
'frag'

All url manipulations produce a new url object:

>>> url = URL('https://www.python.org')
>>> url / 'foo' / 'bar'
URL('https://www.python.org/foo/bar')
>>> url / 'foo' % {'bar': 'baz'}
URL('https://www.python.org/foo?bar=baz')

Strings passed to constructor and modification methods are automatically encoded giving canonical representation as result:

>>> url = URL('https://www.python.org/шлях')
>>> url
URL('https://www.python.org/%D1%88%D0%BB%D1%8F%D1%85')

Regular properties are percent-decoded, use raw_ versions for getting encoded strings:

>>> url.path
'/шлях'

>>> url.raw_path
'/%D1%88%D0%BB%D1%8F%D1%85'

Human readable representation of URL is available as .human_repr():

>>> url.human_repr()
'https://www.python.org/шлях'

For full documentation please read https://yarl.aio-libs.org.

Installation
$ pip install yarl

The library is Python 3 only!

PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install yarl on another operating system where wheels are not provided, the tarball will be used to compile the library from the source code. It requires a C compiler and and Python headers installed.

To skip the compilation you must explicitly opt-in by using a PEP 517 configuration setting pure-python, or setting the YARL_NO_EXTENSIONS environment variable to a non-empty value, e.g.:

$ pip install yarl --config-settings=pure-python=false

Please note that the pure-Python (uncompiled) version is much slower. However, PyPy always uses a pure-Python implementation, and, as such, it is unaffected by this variable.

Dependencies

YARL requires multidict and propcache libraries.

API documentation

The documentation is located at https://yarl.aio-libs.org.

Why isn’t boolean supported by the URL query API?

There is no standard for boolean representation of boolean values.

Some systems prefer true/false, others like yes/no, on/off, Y/N, 1/0, etc.

yarl cannot make an unambiguous decision on how to serialize bool values because it is specific to how the end-user’s application is built and would be different for different apps. The library doesn’t accept booleans in the API; a user should convert bools into strings using own preferred translation protocol.

Comparison with other URL libraries Source code

The project is hosted on GitHub

Please file an issue on the bug tracker if you have found a bug or have some suggestion in order to improve the library.

Discussion list

aio-libs google group: https://groups.google.com/forum/#!forum/aio-libs

Feel free to post your questions and ideas here.

Authors and License

The yarl package is written by Andrew Svetlov.

It’s Apache 2 licensed and freely available.

Changelog 1.20.1

(2025-06-09)

Bug fixes Packaging updates and notes for downstreams 1.20.0

(2025-04-16)

Features Packaging updates and notes for downstreams 1.19.0

(2025-04-05)

Bug fixes Features Contributor-facing changes Miscellaneous internal changes 1.18.3

(2024-12-01)

Bug fixes Miscellaneous internal changes 1.18.2

(2024-11-29)

No significant changes.

1.18.1

(2024-11-29)

Miscellaneous internal changes 1.18.0

(2024-11-21)

Features Contributor-facing changes Miscellaneous internal changes 1.17.2

(2024-11-17)

Bug fixes Features Packaging updates and notes for downstreams Miscellaneous internal changes 1.17.1

(2024-10-30)

Miscellaneous internal changes 1.17.0

(2024-10-28)

Features 1.16.0

(2024-10-21)

Bug fixes Removals and backward incompatible breaking changes Miscellaneous internal changes 1.15.5

(2024-10-18)

Miscellaneous internal changes 1.15.4

(2024-10-16)

Miscellaneous internal changes 1.15.3

(2024-10-15)

Bug fixes Removals and backward incompatible breaking changes Miscellaneous internal changes 1.15.2

(2024-10-13)

Miscellaneous internal changes 1.15.1

(2024-10-12)

Miscellaneous internal changes 1.15.0

(2024-10-11)

Bug fixes Features Miscellaneous internal changes 1.14.0

(2024-10-08)

Packaging updates and notes for downstreams Contributor-facing changes Miscellaneous internal changes 1.13.1

(2024-09-27)

Miscellaneous internal changes 1.13.0

(2024-09-26)

Bug fixes Features 1.12.1

(2024-09-23)

No significant changes.

1.12.0

(2024-09-23)

Features Removals and backward incompatible breaking changes Miscellaneous internal changes 1.11.1

(2024-09-09)

Bug fixes Features Miscellaneous internal changes 1.11.0

(2024-09-08)

Features Miscellaneous internal changes 1.10.0

(2024-09-06)

Bug fixes Features Contributor-facing changes Miscellaneous internal changes 1.9.11

(2024-09-04)

Bug fixes Miscellaneous internal changes 1.9.10

(2024-09-04)

Bug fixes Features 1.9.9

(2024-09-04)

Bug fixes 1.9.8

(2024-09-03)

Features Contributor-facing changes Miscellaneous internal changes 1.9.7

(2024-09-01)

Removals and backward incompatible breaking changes Miscellaneous internal changes 1.9.6

(2024-08-30)

Bug fixes 1.9.5

(2024-08-30)

Bug fixes Removals and backward incompatible breaking changes Improved documentation Packaging updates and notes for downstreams Contributor-facing changes Miscellaneous internal changes 1.9.4 (2023-12-06) Bug fixes Packaging updates and notes for downstreams Contributor-facing changes 1.9.3 (2023-11-20) Bug fixes Packaging updates and notes for downstreams Contributor-facing changes 1.9.2 (2023-04-25)

Bugfixes

1.9.1 (2023-04-21)

Bugfixes

1.9.0 (2023-04-19)

This release was never published to PyPI, due to issues with the build process.

Features Bugfixes Misc 1.8.2 (2022-12-03)

This is the first release that started shipping wheels for Python 3.11.

1.8.1 (2022-08-01)

Misc

1.8.0 (2022-08-01) Features Improved Documentation Deprecations and Removals Misc 1.7.2 (2021-11-01)

Bugfixes

1.7.1 (2021-10-07)

Bugfixes

1.7.0 (2021-10-06)

Features

1.6.3 (2020-11-14)

Bugfixes

1.6.2 (2020-10-12)

Bugfixes

1.6.1 (2020-10-12) Features Bugfixes Removal 1.6.0 (2020-09-23) Features Bugfixes 1.5.1 (2020-08-01) Bugfixes Misc 1.5.0 (2020-07-26) Features Bugfixes 1.4.2 (2019-12-05)

Features

1.4.1 (2019-11-29) 1.4.0 (2019-11-29) 1.3.0 (2018-12-11) 1.2.6 (2018-06-14) 1.2.5 (2018-05-23) 1.2.4 (2018-05-08) 1.2.3 (2018-05-03) 1.2.2 (2018-05-01) 1.2.1 (2018-04-30) 1.2.0 (2018-04-30) 1.1.1 (2018-02-17) 1.1.0 (2018-01-21) 1.0.0 (2018-01-15) 0.18.0 (2018-01-10) 0.17.0 (2017-12-30) 0.16.0 (2017-12-07) 0.15.0 (2017-11-23) 0.14.2 (2017-11-14) 0.14.1 (2017-11-13) 0.14.0 (2017-11-11) 0.13.0 (2017-10-01) 0.12.0 (2017-06-26) 0.11.0 (2017-06-26) 0.10.3 (2017-06-13) 0.10.2 (2017-05-05) 0.10.1 (2017-05-03) 0.10.0 (2017-03-14) 0.9.8 (2017-02-16) 0.9.7 (2017-02-16) 0.9.6 (2017-02-15) 0.9.5 (2017-02-14) 0.9.4 (2017-02-14) 0.9.3 (2017-02-14) 0.9.2 (2017-02-08) 0.9.1 (2017-02-07) 0.9.0 (2017-02-07) 0.8.1 (2016-12-03) 0.8.0 (2016-12-03) 0.7.1 (2016-11-18) 0.7.0 (2016-11-07) 0.6.0 (2016-11-07) 0.5.3 (2016-11-02) 0.5.2 (2016-11-02) 0.5.1 (2016-11-02) 0.5.0 (2016-11-02) 0.4.3 (2016-09-29) 0.4.2 (2016-09-29) 0.4.1 (2016-09-28) 0.4.0 (2016-09-27) 0.3.2 (2016-09-27) 0.3.1 (2016-09-26) 0.3.0 (2016-09-26) 0.2.1 (2016-09-26) 0.2.0 (2016-09-18) 0.1.4 (2016-09-09) 0.1.3 (2016-09-07) 0.1.2 (2016-09-07) 0.1.1 (2016-09-06) 0.1.0 (2016-09-06) 0.0.1 (2016-08-30)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4