Commit 4088ec18 authored by hyperlink Upstream's avatar hyperlink Upstream Committed by Aron Helser
Browse files

hyperlink 2017-08-03 (166d307a)

Code extracted from:

    https://gitlab.kitware.com/third-party/hyperlink.git

at commit 166d307ac3f052d5e71e3cfd8b1cab7f0b492fca (for/vtk).
parents
* -whitespace
Copyright (c) 2017
Glyph Lefkowitz
Itamar Turner-Trauring
Jean Paul Calderone
Adi Roiban
Amber Hawkie Brown
Mahmoud Hashemi
and others that have contributed code to the public domain.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# hyperlink fork for vtk/ParaView
hyperlink is a dependency of Twisted. This branch contains changes required to embed into vtk/ParaView. This includes a readme and .gitattributes file. A subset is chosen on import to vtk using update.sh.
# Hyperlink
*Cool URLs that don't change.*
<a href="https://hyperlink.readthedocs.io/en/latest/"><img src="https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat"></a>
<a href="https://pypi.python.org/pypi/hyperlink"><img src="https://img.shields.io/pypi/v/boltons.svg"></a>
<a href="http://calver.org"><img src="https://img.shields.io/badge/calver-YY.MINOR.MICRO-22bfda.svg"></a>
Hyperlink provides a pure-Python implementation of immutable
URLs. Based on [RFC 3986][rfc3986] and [3987][rfc3987], the Hyperlink URL
makes working with both URIs and IRIs easy.
Hyperlink is tested against Python 2.7, 3.4, 3.5, 3.6, and PyPy.
Full documentation is available on [Read the Docs][docs].
[rfc3986]: https://tools.ietf.org/html/rfc3986
[rfc3987]: https://tools.ietf.org/html/rfc3987
[docs]: http://hyperlink.readthedocs.io/en/latest/
## 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!
```python
from hyperlink import URL
url = URL.from_text('http://github.com/mahmoud/hyperlink?utm_source=README')
utm_source = url.get('utm_source')
better_url = url.replace(scheme='https')
user_url = better_url.click('..')
```
See the full API docs on [Read the Docs][docs].
## More information
Hyperlink would not have been possible without the help of
[Glyph Lefkowitz](https://glyph.twistedmatrix.com/) 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.
from ._url import URL, URLParseError, register_scheme, parse_host
__all__ = [
"URL",
"URLParseError",
"register_scheme",
"parse_host"
]
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment