Skip to main content

a dumb URL parser with a smart interface

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easyuri-0.1.4.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

easyuri-0.1.4-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page