Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1.89 KB

README.md

File metadata and controls

62 lines (46 loc) · 1.89 KB

urlx

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.


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


Links

Source code: github.com/VolodymyrBor/urlx

Documentation: urlx

Changelog: changelog