Sometimes it feels like working with URLs is harder than it should be. Urly is a little wrapper around the werkzeug URL class to make things easy and pleasant. One module to pip install, one import, and then everything is easy. For instance:
>>> from urly import URL
>>> url = URL('http://example.com/old/path?a=b')
>>> url.path = '/new/path'
>>> url.add_param('a', 'c')
>>> print(url)
http://example.com/new/path?a=b&a=c
>>> print(url.relative_url)
/new/path?a=b&a=c
Common tasks like changing a path, adding a parameter, and getting the relative URL, are all simple.
Urly also lets you parse URLs the way a browser would. For instance:
>>> url = URL('example.com', parse_like_browser=True)
>>> print(url)
http://example.com
Documentation
Full documentation is at https://urly.readthedocs.org.
Install
Simply install with pip:
$ pip install urly
Metadata
Release files for urly 0.1.1455780396
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| urly-0.1.1455780396.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| urly-0.1.1455780396-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / urly-0.1.1455780396.tar.gz
| Download URL | urly-0.1.1455780396.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a62c31b58c26c2ea0689e6d4be5347ef6e8771e34ad41f4af186320587e7fc84
|
|
BLAKE2b-256 checksum How to use checksums |
9382bb3bfdf18a0f860dfed92b7a78455544a42cc45ea228f72042ce012f4c11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / urly-0.1.1455780396-py2.py3-none-any.whl
| Download URL | urly-0.1.1455780396-py2.py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a2e68e6ab208bb764162cc556825f5c82c2e248682d19f3659abde5e08773a1e
|
|
BLAKE2b-256 checksum How to use checksums |
27efe339439fea2e86275cf66746580a9f614b1419d9d32195c11f06aa6ea081
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |