Home
Overview
urlx - provide new data type - Url
.
The purpose of this package is to standardize URL declaration in the codebase.
This approach should reduce the number of errors and speed up code writing.
Installation
pip install urlx
poetry add urlx
Example
from pathlib import Path
from urlx import Url, Protocol, Port
url = Url(
protocol=Protocol.HTTPS,
host='localhost',
port=Port.HTTPS_443,
path=Path('api/user-list'),
query={
'limit': '100',
'skip': '20',
},
)
print(url)
https://localhost:443/api/user-list?limit=100&skip=20
Links
Source code: github.com/VolodymyrBor/urlx
Documentation: urlx
Changelog: changelog