Lint URLs
Project description
permalint
Lint URLs (mostly for teaxyz/chai, but hopefully other uses too)
Features
- Ignores protocol (http, https, etc.)
- Normalizes GitHub URLs to owner/repo
- Removes query strings and fragments
- Lowercases domains and removes www
Usage
from permalint import normalize_url
url = "https://github.com/user/repo?utm_source=foo#readme"
print(normalize_url(url)) # Output: github.com/user/repo
Development
- Install dependencies:
pkgx rye sync - Run tests:
pkgx rye run pytest - Lint:
pkgx ruff check src/ - Type check:
pkgx ty src/
Contributing / Wishlist
guess-canonical-urlto guess the correct URL based on a passed list of URLs- actual source of Homepages for
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
permalint-0.1.6.tar.gz
(13.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file permalint-0.1.6.tar.gz.
File metadata
- Download URL: permalint-0.1.6.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6d812e2e6dbe97db37aa2c3f1ee147c9de8504227d7b183561cd98127309339
|
|
| MD5 |
20d8965fdfb6805146fe4c0b4b327c6c
|
|
| BLAKE2b-256 |
67ffdd49641bff5ac7b289cdfc8d140593ee468fa6fdab5331f5b2b293396ace
|
File details
Details for the file permalint-0.1.6-py3-none-any.whl.
File metadata
- Download URL: permalint-0.1.6-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c77af769686d61fc5e85175c1fd4afa9b1fa977f20ddd04c3f773a4c02c148e7
|
|
| MD5 |
0cc4307feb2c773cd023df6bae03c0de
|
|
| BLAKE2b-256 |
f00ea25937328e7abb5522911ef352f6829fc59a1f24d3a2856c0b39fd1812e1
|