Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

irl

irl is a URL parser library that has a mixture of very strict rules around a URL's host and port section but very relaxed in all other sections making it the ideal balance of secure, tolerant, and performant.

It's primary use-case is for being used in HTTP client libraries as they have to deal with the Internet and lots URLs that are definitely not compliant but users expect them to work anyways!

Installation

Supports Python 3.6 or later.

python -m pip install irl

Usage

>>> import irl
>>> url = irl.URL.parse("https://user:pass@example.com:1234/path?q=ue&r=&y#frag")

>>> print(repr(url))
URL(scheme="https", userinfo="user:pass", host="example.com", port=1234, path="/path", query="q=ue&r=&y", fragment="frag")

>>> url.target()
b"/path?qu=e&r=&y"

>>> url.host_header()
b"example.com:1234"

>>> url.query_to_items()
[("q", "ue"), ("r", ""), ("y", None)

>>> url.address()
("example.com", 1234)

Standards Implemented

Acknowledgements

This URL parser library wouldn't be possible without the rfc3986 library or the test suite from urllib3. This parser is based heavily on techniques used in both libraries and they directly inspired this libraries creation.

License

MIT

Metadata

Release files for irl 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for irl 0.2
File Size Uploaded Provenance Actions
irl-0.2.tar.gz 6.0 kB Without provenance Details for irl-0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for irl 0.2
File Interpreter ABI Platform Actions
irl-0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for irl-0.2-py2.py3-none-any.whl

Total release size: 12.9 kB

Release files / irl-0.2.tar.gz

Download URL irl-0.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3cad62a72ac5869f6d93d715526b6edf4debc117bc2d0964ed33bd35c12e0413
BLAKE2b-256 checksum
How to use checksums
df8a52ca4930681e43c9cfdb4a4de3c29537a804aa322b94026bd6f9b5c63842
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

Release files / irl-0.2-py2.py3-none-any.whl

Download URL irl-0.2-py2.py3-none-any.whl
Size 6.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e4ecfbcb371784f4539710916eebb9888c76154cdcf6b9ae6cd5a8ac419ce22a
BLAKE2b-256 checksum
How to use checksums
efab033187a7ef9658d9e23618ad0a1eba23057c08c5ec392f8576e4f9482015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

Security for irl 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page