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 details)
Built Distribution
File details
Details for the file easyuri-0.1.4.tar.gz
.
File metadata
- Download URL: easyuri-0.1.4.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.10.0-23-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4775bf66c1bf0455ba5565e3c58ba484d43ec8c668207001688aa8e1784fbc0 |
|
MD5 | 80c8f7c1eb1daaef2ad09e8a01ebf5fe |
|
BLAKE2b-256 | 44f47e83f566fdc2dd0c3225615a9c15f8c51cb2865b2153d2a088983bd7b5a8 |
File details
Details for the file easyuri-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: easyuri-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.10.0-23-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4646ab4bf2b2c47c0eea2a2c7f819834d86f0ea65eaa29bc2ff3200fafea2db0 |
|
MD5 | e572a609caefd15ba43a3af4d6506841 |
|
BLAKE2b-256 | 1b4e6abd32dbc18cfeb8559e8f364574adbd4980ef04c6e8ccca1c651b26aa6c |