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.15.tar.gz
(23.1 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.15.tar.gz.
File metadata
- Download URL: permalint-0.1.15.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7393d4e1a8e01bfc294607a16046af252c4d9bfba235278047a5710a19bf8a1
|
|
| MD5 |
3fa4a37934575959a645c15c639b0785
|
|
| BLAKE2b-256 |
4bad1baa79cb0026c049c46df25638fb3d6603803ab3d3c9833438776e832f87
|
File details
Details for the file permalint-0.1.15-py3-none-any.whl.
File metadata
- Download URL: permalint-0.1.15-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0317c4891e486fd1bc50ad4525a84100b50b819304eadb757808935072c62ac
|
|
| MD5 |
2e86a45b7feecbdb34a4eeb75b02aff3
|
|
| BLAKE2b-256 |
4c1c5cffa3ffdff4e6fe891b04d5c74223898aef0d3884a5608b4f03f36b42ff
|