Skip to main content

PythonSupport PyPI version

Documentation

A high-level Url class to make parsing, looking at and manipulating urls much easier.

Also allows for easily composable urls.

Everything is subject to change!

📄 Detailed Documentation | 🐍 PyPi

Getting Started

poetry install xurls

or

pip install xurls

Very basic example:

from xurls import Url

url = Url("http://www.google.com/some/path?some_key=some-value")
assert url.host == "www.google.com"

url.host = "apple.com"
assert str(url) == "http://apple.com/some/path"

assert url['some_key'] == 'some-value'

You can also compose urls:

from xurls import Url

base_url = Url(host='www.example.com')
url_to_append = Url(path='hello/today')

# Append url; paths will append to end, queries merged together.
# Other components like host will be replaced if there is a value in the appended url.
final_url = base_url.copy().append_url(url_to_append)

assert str(final_url) == 'www.example.com/hello/today'

Metadata

Release files for xurls 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xurls 1.4.1
File Size Uploaded
xurls-1.4.1.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xurls 1.4.1
File Interpreter ABI Platform
xurls-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 38.0 kB

Release files / xurls-1.4.1.tar.gz

Download URL xurls-1.4.1.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
344117ce3197a6508008f1d84de8adf313093799d215f17d0934c48c2217ed8b
BLAKE2b-256 checksum
How to use checksums
a707f6ca89b3474a90b06527ac06d064cc84b383d92b6dfc67b39bf08dd1435b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.12.4 Darwin/24.6.0

Release files / xurls-1.4.1-py3-none-any.whl

Download URL xurls-1.4.1-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e04e07828939f698d73341352aff55cba56252a3dc840db9986b687996b90a58
BLAKE2b-256 checksum
How to use checksums
a996c4f93610bbe854de368c349a799ac1284b6c3f27e6a2eae570ddd3ccd34f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.12.4 Darwin/24.6.0

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page