Skip to main content

urlz

GitHub Workflow Status PyPI - Python Version PyPI

urlz is a simple URL parsing library that provides Pathlib-like usage to URLs in Python:

>>>> from urlz import URL
>>>> url = URL("https://wordbrew.io")
>>>> str(url / "about" / "index.html")
'https://wordbrew.io/about/index.html'

It also provides a special URL-building function urlify:

>>>> from urlz import urlify
>>>> urlify("https://wordbrew.io", "about", "index.html")
'https://wordbrew.io/about/index.html'

# with querystring params:
>>>> urlify("https://wordbrew.io", "search", params={"q": "hello world"})
'https://wordbrew.io/search?q=hello+world'

Installation

pip install urlz

TODO

  • QS param helpers
  • Path replacements (e.g. url.replace(path="/new/stuff/"))
  • Validation helpers

Alternatives

For more URL-parsing fun, check out these libraries:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

urlz-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

urlz-0.1.2-py2.py3-none-any.whl (3.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file urlz-0.1.2.tar.gz.

File metadata

  • Download URL: urlz-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for urlz-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c6430923d482db11301208cd04f10496627da71f9fdde79acfa8d648af9ef3b6
MD5 6597f19ecd3702c3537f2ef1342282d5
BLAKE2b-256 f1df62bb2e98c675c2929d993a2d17e9dce00fd8c194283b9f11e801e229bb70

See more details on using hashes here.

File details

Details for the file urlz-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: urlz-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for urlz-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f75138004f70b1c372d0a1b30d07288a8a3dcb19b4bddd4a60ea7c795a511e69
MD5 0d2fbde973fc40b58c7991794d2f530e
BLAKE2b-256 63b5e06e2df672768c62b950d0b47ff15098b7512e98d4bbf79b4c9c518fe8fe

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page