Immutable, Pythonic, correct URLs. (LADI project)
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Wilfredo Sánchez Vega ec7d172688
Merge pull request #175 from python-hyper/requires-io-master
[requires.io] dependency update on master branch
2 years ago
.github/workflows Argh, can't do version slugs except in the default test env… let's do the XML dance there. 3 years ago
docs Update conf.py 3 years ago
src/hyperlink Merge branch 'master' into fix_some_type_issues 3 years ago
.appveyor.yml Remove Python 2.7 and Python 3.5 from the Windows build matrix. 3 years ago
.coveragerc Exclude `if TYPE_CHECKING` and `...` from coverage. 3 years ago
.gitignore Merge branch 'master' into strategies 4 years ago
CHANGELOG.md Remove merge turd 3 years ago
LICENSE Disable HealthCheck.too_slow in CI. 4 years ago
MANIFEST.in Compress the IDNA table 4 years ago
README.md fix pypi badge typo 3 years ago
TODO.md Fix a typo in the docs 4 years ago
pyproject.toml Check in black config 4 years ago
pytest.ini
setup.cfg add setup.cfg for universal wheels 7 years ago
setup.py bump version for v21.0.1dev 3 years ago
tox.ini [requires.io] dependency update 2 years ago

README.md

Hyperlink

Cool URLs that don't change.

Documentation PyPI Calendar Versioning Python Version Compatibility Code Coverage Requirements Status

Hyperlink provides a pure-Python implementation of immutable URLs. Based on RFC 3986 and 3987, the Hyperlink URL makes working with both URIs and IRIs easy.

Hyperlink is tested against Python 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, and PyPy.

Full documentation is available on Read the Docs.

Installation

Hyperlink is a pure-Python package and requires nothing but Python. The easiest way to install is with pip:

pip install hyperlink

Then, hyperlink away!

from hyperlink import URL

url = URL.from_text(u'http://github.com/python-hyper/hyperlink?utm_source=README')
utm_source = url.get(u'utm_source')
better_url = url.replace(scheme=u'https', port=443)
org_url = better_url.click(u'.')

See the full API docs on Read the Docs.

More information

Hyperlink would not have been possible without the help of Glyph Lefkowitz and many other community members, especially considering that it started as an extract from the Twisted networking library. Thanks to them, Hyperlink's URL has been production-grade for well over a decade.

Still, should you encounter any issues, do file an issue, or submit a pull request.