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.
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)
Output:
Source code: github.com/VolodymyrBor/urlx
Documentation: urlx
Changelog: changelog