<commit_before>************************************************************************
uritools
************************************************************************

This module defines RFC 3986 compliant replacements for the most
commonly used functions of the Python 2.7 Standard Library urlparse_
module.

.. code-block:: pycon

    >>> from uritools import urisplit, uriunsplit, urijoin, uridefrag
    >>> p = urisplit('foo://example.com:8042/over/there?name=ferret#nose')
    >>> p
    SplitResult(scheme='foo', authority='example.com:8042',
                path='/over/there', query='name=ferret', fragment='nose')
    >>> p.scheme
    'foo'
    >>> p.authority
    'example.com:8042'
    >>> p.port
    8042
    >>> p.geturi()
    'foo://example.com:8042/over/there?name=ferret#nose'
    >>> uriunsplit(['foo', 'example.com:8042', '/over/there', None, None])
    'foo://example.com:8042/over/there'
    >>> urijoin('http://www.cwi.nl/~guido/Python.html', 'FAQ.html')
    'http://www.cwi.nl/~guido/FAQ.html'
    >>> uridefrag('http://pythonhosted.org/uritools/index.html#constants')
    DefragResult(uri='http://pythonhosted.org/uritools/index.html',
                 fragment='constants')

For various reasons, the urlparse_ module is not compliant with
current Internet standards, does not include Unicode support, and is
generally unusable with proprietary URI schemes.  As stated in
`Lib/urlparse.py
<http://hg.python.org/cpython/file/2.7/Lib/urlparse.py>`_::

    RFC 3986 is considered the current standard and any future changes
    to urlparse module should conform with it.  The urlparse module is
    currently not entirely compliant with this RFC due to defacto
    scenarios for parsing, and for backward compatibility purposes,
    some parsing quirks from older RFCs are retained.

This module aims to provide fully RFC 3986 compliant replacements for
some commonly used functions found in urlparse_, plus additional
functions for handling Unicode, normalizing URI paths, and
conveniently composing URIs from their individual components.


Installation
========================================================================

Install uritools using pip::

    pip install uritools


Project Resources
========================================================================

- `Documentation <http://pythonhosted.org/uritools/>`_
- `Issue Tracker <https://github.com/tkem/uritools/issues>`_
- `Source Code <https://github.com/tkem/uritools>`_
- `Change Log <https://github.com/tkem/uritools/CHANGELOG.rst>`_


.. image:: https://pypip.in/v/uritools/badge.png
    :target: https://pypi.python.org/pypi/uritools/
    :alt: Latest PyPI version

.. image:: https://pypip.in/d/uritools/badge.png
    :target: https://pypi.python.org/pypi/uritools/
    :alt: Number of PyPI downloads

.. _urlparse: http://docs.python.org/2/library/urlparse.html<commit_msg>Fix changelog URL<commit_after>************************************************************************
uritools
************************************************************************

This module defines RFC 3986 compliant replacements for the most
commonly used functions of the Python 2.7 Standard Library urlparse_
module.

.. code-block:: pycon

    >>> from uritools import urisplit, uriunsplit, urijoin, uridefrag
    >>> p = urisplit('foo://example.com:8042/over/there?name=ferret#nose')
    >>> p
    SplitResult(scheme='foo', authority='example.com:8042',
                path='/over/there', query='name=ferret', fragment='nose')
    >>> p.scheme
    'foo'
    >>> p.authority
    'example.com:8042'
    >>> p.port
    8042
    >>> p.geturi()
    'foo://example.com:8042/over/there?name=ferret#nose'
    >>> uriunsplit(['foo', 'example.com:8042', '/over/there', None, None])
    'foo://example.com:8042/over/there'
    >>> urijoin('http://www.cwi.nl/~guido/Python.html', 'FAQ.html')
    'http://www.cwi.nl/~guido/FAQ.html'
    >>> uridefrag('http://pythonhosted.org/uritools/index.html#constants')
    DefragResult(uri='http://pythonhosted.org/uritools/index.html',
                 fragment='constants')

For various reasons, the urlparse_ module is not compliant with
current Internet standards, does not include Unicode support, and is
generally unusable with proprietary URI schemes.  As stated in
`Lib/urlparse.py
<http://hg.python.org/cpython/file/2.7/Lib/urlparse.py>`_::

    RFC 3986 is considered the current standard and any future changes
    to urlparse module should conform with it.  The urlparse module is
    currently not entirely compliant with this RFC due to defacto
    scenarios for parsing, and for backward compatibility purposes,
    some parsing quirks from older RFCs are retained.

This module aims to provide fully RFC 3986 compliant replacements for
some commonly used functions found in urlparse_, plus additional
functions for handling Unicode, normalizing URI paths, and
conveniently composing URIs from their individual components.


Installation
========================================================================

Install uritools using pip::

    pip install uritools


Project Resources
========================================================================

- `Documentation <http://pythonhosted.org/uritools/>`_
- `Issue Tracker <https://github.com/tkem/uritools/issues>`_
- `Source Code <https://github.com/tkem/uritools>`_
- `Change Log <https://github.com/tkem/uritools/blob/master/CHANGELOG.rst>`_


.. image:: https://pypip.in/v/uritools/badge.png
    :target: https://pypi.python.org/pypi/uritools/
    :alt: Latest PyPI version

.. image:: https://pypip.in/d/uritools/badge.png
    :target: https://pypi.python.org/pypi/uritools/
    :alt: Number of PyPI downloads

.. _urlparse: http://docs.python.org/2/library/urlparse.html
{'fraction_non_alphanumeric': 0.21525129982668978, 'fraction_numerical': 0.01559792027729636, 'mean_word_length': 4.289642529789184, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 73, 'https://': 14, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5669736', 'n_tokens_mistral': 1807, 'n_tokens_neox': 1648, 'n_words': 429}