my eye

easyuri

a dumb URL parser with a smart interface
web, www

Issues

Bump Python minimum requirement 14 tests passing in 1.035s 3ADF8C3 6 commits

.github/, .gitignore, README.md, pyproject.toml, pyrightconfig.json

easyuri is a dumb URL parser with a smart interface.

>>> import easyuri
>>> uri = easyuri.parse("en.wikipedia.org/wiki/Jabberwocky")
>>> uri.is_secure, uri.in_hsts
(True, True)
>>> uri.scheme, uri.host, uri.port
('https', 'en.wikipedia.org', 443)
>>> uri.subdomain, uri.domain, uri.suffix, uri.path
('en', 'wikipedia', 'org', 'wiki/Jabberwocky')
>>> str(uri)
'https://en.wikipedia.org/wiki/Jabberwocky'
>>> uri = easyuri.parse("http://evil.com\\@good.com/")  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
DifficultURLError

easyuri

A dumb URL parser with a smart interface.

pkg_resources, requests, hstspreload

471 LLOC, highly maintainable

parse(uri, secure=True) -> 'URI'

Return a URI object for given uri.