10000 GitHub - ada-url/ada-python at 3ef21fe0535d6c9e6199e1b0ca17522271696a8d
[go: up one dir, main page]

Skip to content

ada-url/ada-python

Repository files navigation

what-url

This is what_url, a Python library for parsing and joining URLs.

Examples

>>> import what_url
>>> what_url.check_url('https://example.org')
True
>>> what_url.join_url(
    'https://example.org/dir/child.txt', '../parent.txt'
)
'https://example.org/parent.txt'
>>> what_url.normalize_url('https://example.org/dir/../parent.txt')
'https://example.org/parent.txt'
>>> what_url.parse_url('https://user:pass@example.org:80/api?q=1#2')
{
    'href': 'https://user:pass@example.org:80/api?q=1#2',
    'username': 'user',
    'password': 'pass',
    'protocol': 'https:',
    'host': 'example.org:80',
    'port': '80',
    'hostname': 'example.org',
    'pathname': '/api',
    'search': '?q=1',
    'hash': '#2'
}

About

Python bindings for Ada URL parser

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 8

0