urlnorm.py
Normalize a URL to a standard unicode representation
urlnorm normalizes a URL by:
lowercasing the scheme and hostname
converting the hostname to IDN format
taking out default port if present (e.g., http://www.foo.com:80/)
collapsing the path (./, ../, etc)
removing the last character in the hostname if it is ‘.’
unquoting any % escaped characters (where possible)
Installation
pip install urlnorm
Example
>>> import urlnorm
>>> urlnorm.norm("http://xn--q-bga.com./u/u/../%72/l/")
u'http://q\xe9.com/u/r/l/'
Metadata
Release files for urlnorm 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| urlnorm-1.1.4.tar.gz | 4.3 kB | Without provenance | Details |
Release files / urlnorm-1.1.4.tar.gz
| Download URL | urlnorm-1.1.4.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cde99b7ec8edb6768dfecbed5d97e9bd0c784b0593ee28a3f83b20419dcd75e
|
|
BLAKE2b-256 checksum How to use checksums |
4d462bbc8d92698b72c44099e215cdaff85a7c27c64fbcf74aa8e313a4da36fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for urlnorm 1.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.