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.3.tar.gz
(8.8 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.3.tar.gz.
File metadata
- Download URL: permalint-0.1.3.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d55fab6b53c8e9ef88f8d2f2f447baa61fc2871feb29dcb7bd8a9c09460f9c3c
|
|
| MD5 |
47fadf11f024f1a4c862d989015ecef3
|
|
| BLAKE2b-256 |
dc9217d16b2e54a318f6c3b0d4473d1395519395a427f6b99947bf4b754e35c9
|
File details
Details for the file permalint-0.1.3-py3-none-any.whl.
File metadata
- Download URL: permalint-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7738b84703618704c0a6a9755f20ad1fda65b9d18ad736abb737016c61ceed15
|
|
| MD5 |
5e356e011d259e37334713ef66284595
|
|
| BLAKE2b-256 |
c52546e0d7a3190e89f61f2ca09ce56cfc1f7e089d1d72fe6d4e53f2b702f3f0
|