Skip to content

Home

Overview

urlx

Supported Python versions Package version Build Docs

Supported Versions Supported Versions Supported Versions Supported Versions


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)
Output:

https://localhost:443/api/user-list?limit=100&skip=20


Source code: github.com/VolodymyrBor/urlx

Documentation: urlx

Changelog: changelog