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.14.tar.gz
(23.0 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.14.tar.gz.
File metadata
- Download URL: permalint-0.1.14.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33e9515ac69853fef5f43fee753b8315a7d3943931fac3c8e0a72d5808e3e850
|
|
| MD5 |
b3391ee745fb77aac1748c3689746768
|
|
| BLAKE2b-256 |
2fd62f06abd76dec3916a7b05986d4d63102a25d85e4ddc78ddfb86ae6272c7d
|
File details
Details for the file permalint-0.1.14-py3-none-any.whl.
File metadata
- Download URL: permalint-0.1.14-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e24d740808d4bc3a10a3a9296f814e6a74f57a19f8eeb1d2ceb8c610c132de91
|
|
| MD5 |
1ad34a8b130ff6db879a9f6947cebba5
|
|
| BLAKE2b-256 |
faafbad3c2fdf9c55d7b73765cf500c1731d6227b9dae9f8e504e3dabf45a3da
|