Immutable, Pythonic, correct URLs. (LADI project)
Go to file
Mahmoud Hashemi a4ad7602d0 link to docs from setup.py and bump docs version 2017-06-17 18:47:15 -07:00
docs link to docs from setup.py and bump docs version 2017-06-17 18:47:15 -07:00
hyperlink make empty paths, whether with a slash or not, compare as equal, which fixes #7 to some degree 2017-06-17 18:37:45 -07:00
.gitignore gitignore .coverage files 2017-06-17 11:13:40 -07:00
.tox-coveragerc coverage run's "source" can be a path or a module. 2017-04-22 12:55:19 -07:00
.travis.yml Call coverage xml manually before codecov 2017-04-22 13:15:30 -07:00
CHANGELOG.md CHANGELOG for 17.1.1 2017-05-06 17:28:55 -07:00
LICENSE MIT 2017-04-15 15:23:48 -07:00
README.md fix a couple README links 2017-06-02 02:41:43 -07:00
TODO.md better compliance with empty-path behavior recommended in RFC 3986 6.2.3 (and Twisted test suite) 2017-05-06 17:20:00 -07:00
appveyor.yml Call coverage xml manually before codecov 2017-04-22 13:15:30 -07:00
pytest.ini add pytest.ini to enable doctest ALLOW_UNICODE (to get rid of errors on u'') 2017-03-13 23:09:25 -07:00
requirements-test.txt WIP: trying to get tox toxing 2017-03-13 20:19:49 -07:00
setup.cfg add setup.cfg for universal wheels 2017-05-06 17:21:52 -07:00
setup.py link to docs from setup.py and bump docs version 2017-06-17 18:47:15 -07:00
tox.ini just run coverage on every tox env in an attempt to make codecov actually display some results 2017-04-20 23:19:20 -07:00

README.md

Hyperlink

Cool URLs that don't change.

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, 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('http://github.com/mahmoud/hyperlink?utm_souce=README')
    utm_source = url.get('utm_source')
    better_url = url.replace(scheme='https')
    user_url = better_url.click('..')

See the full API docs here.

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.