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.10.tar.gz
(22.2 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.10.tar.gz.
File metadata
- Download URL: permalint-0.1.10.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
790aa8de95d0027a4aa7edaefa3bb621192afb8ccd662124c1fe5bcc268f5e89
|
|
| MD5 |
f70b937048ffc157087d95d448ba97b4
|
|
| BLAKE2b-256 |
4205b1efd486a5bc7d0e5489d8eee61228cf31b26d1367522d555d4a0273eb0f
|
File details
Details for the file permalint-0.1.10-py3-none-any.whl.
File metadata
- Download URL: permalint-0.1.10-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b09180a625d5c5ff084f19318f9d25d665a32314dd034b9280dad9cd75cfd06
|
|
| MD5 |
439a2f41d7862bfb60bb2ed7becffa6e
|
|
| BLAKE2b-256 |
8dfa01c3d79610655ef2f4de7f36581a89dd6573bb8e4e91fa4b178c759a2869
|