Yet another URL library
Project description
yarl
Introduction
Url could be 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, 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 produces a new url object:
>>> url.parent / 'downloads/source' URL('https://www.python.org/downloads/source')
Strings in URL object are always unquoted, for getting quoted version please convert URL into bytes:
>>> bytes(url) b'https://www.python.org/%7Eguido?arg=1#frag'
Constructing URL from bytes performs unquoting as well:
>>> URL(b'https://www.python.org/%7Eguido') URL('https://www.python.org/~guido')
For full documentation please read https:://yarl.readthedocs.org.
Installation
$ pip install yarl
The library is Python 3 only!
Dependencies
YARL requires multidict library.
API documentation
The documentation is located at https://yarl.readthedocs.org
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.
The library uses Travis for Continuous Integration.
Discussion list
aio-libs google group: https://groups.google.com/forum/#!forum/aio-libs
Feel free to post your questions and ideas here.
CHANGES
0.1.0 (2016-09-06)
The library was deeply refactored, bytes are gone away but all accepted strings are encoded if needed.
0.0.1 (2016-08-30)
The first release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file yarl-0.1.0.tar.gz
.
File metadata
- Download URL: yarl-0.1.0.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a84d4ce94b92267d981b76c7af1b146d40c1a09480882a7988a59063f0b91d6 |
|
MD5 | 4ab13832ebb9924072116c9d28dfe77f |
|
BLAKE2b-256 | c954fe183648f103c144e76ec0a75d47b76d745b0cc0fed96b008e8ef49036b7 |
File details
Details for the file yarl-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: yarl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5314b4cb8def42f34f7d68c21b9df39dfe93e4425f70e49ef145f812775ff73 |
|
MD5 | d45f19d307bac02c6be358f127c5283d |
|
BLAKE2b-256 | db11aec7a5cfe7410a77c6a1e4706a05007e33aa690fadb14c63456e79467fb6 |