uritools


Nameuritools JSON
Version 4.0.2 PyPI version JSON
download
home_pagehttps://github.com/tkem/uritools/
SummaryURI parsing, classification and composition
upload_time2023-08-30 19:35:43
maintainer
docs_urlNone
authorThomas Kemmer
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            uritools
========================================================================

.. image:: https://img.shields.io/pypi/v/uritools
    :target: https://pypi.org/project/uritools
    :alt: Latest PyPI version

.. image:: https://img.shields.io/github/actions/workflow/status/tkem/uritools/ci.yml
   :target: https://github.com/tkem/uritools/actions/workflows/ci.yml
   :alt: CI build status

.. image:: https://img.shields.io/readthedocs/uritools
   :target: https://uritools.readthedocs.io
   :alt: Documentation build status

.. image:: https://img.shields.io/codecov/c/github/tkem/uritools/master.svg
   :target: https://codecov.io/gh/tkem/uritools
   :alt: Test coverage

.. image:: https://img.shields.io/librariesio/sourcerank/pypi/uritools
   :target: https://libraries.io/pypi/uritools
   :alt: Libraries.io SourceRank

.. image:: https://img.shields.io/github/license/tkem/uritools
   :target: https://raw.github.com/tkem/uritools/master/LICENSE
   :alt: License

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
   :alt: Code style: black

This module provides RFC 3986 compliant functions for parsing,
classifying and composing URIs and URI references, largely replacing
the Python Standard Library's ``urllib.parse`` module.

.. code-block:: pycon

    >>> from uritools import uricompose, urijoin, urisplit, uriunsplit
    >>> uricompose(scheme='foo', host='example.com', port=8042,
    ...            path='/over/there', query={'name': 'ferret'},
    ...            fragment='nose')
    'foo://example.com:8042/over/there?name=ferret#nose'
    >>> parts = urisplit(_)
    >>> parts.scheme
    'foo'
    >>> parts.authority
    'example.com:8042'
    >>> parts.getport(default=80)
    8042
    >>> parts.getquerydict().get('name')
    ['ferret']
    >>> parts.isuri()
    True
    >>> parts.isabsuri()
    False
    >>> urijoin(uriunsplit(parts), '/right/here?name=swallow#beak')
    'foo://example.com:8042/right/here?name=swallow#beak'

For various reasons, ``urllib.parse`` and its Python 2 predecessor
``urlparse`` are not compliant with current Internet standards.  As
stated in `Lib/urllib/parse.py
<https://github.com/python/cpython/blob/3.8/Lib/urllib/parse.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
the most commonly used functions found in ``urllib.parse``.  It also
includes functions for distinguishing between the different forms of
URIs and URI references, and for conveniently creating URIs from their
individual components.


Installation
------------------------------------------------------------------------

uritools is available from PyPI_ and can be installed by running::

  pip install uritools


Project Resources
------------------------------------------------------------------------

- `Documentation`_
- `Issue tracker`_
- `Source code`_
- `Change log`_


License
------------------------------------------------------------------------

Copyright (c) 2014-2023 Thomas Kemmer.

Licensed under the `MIT License`_.


.. _PyPI: https://pypi.org/project/uritools/
.. _Documentation: https://uritools.readthedocs.io/
.. _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
.. _MIT License: https://raw.github.com/tkem/uritools/master/LICENSE

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tkem/uritools/",
    "name": "uritools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Thomas Kemmer",
    "author_email": "tkemmer@computer.org",
    "download_url": "https://files.pythonhosted.org/packages/44/71/2712397a459ef0c960141f1f9fdf5a6b48052c521644c7154c508d976373/uritools-4.0.2.tar.gz",
    "platform": null,
    "description": "uritools\n========================================================================\n\n.. image:: https://img.shields.io/pypi/v/uritools\n    :target: https://pypi.org/project/uritools\n    :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/github/actions/workflow/status/tkem/uritools/ci.yml\n   :target: https://github.com/tkem/uritools/actions/workflows/ci.yml\n   :alt: CI build status\n\n.. image:: https://img.shields.io/readthedocs/uritools\n   :target: https://uritools.readthedocs.io\n   :alt: Documentation build status\n\n.. image:: https://img.shields.io/codecov/c/github/tkem/uritools/master.svg\n   :target: https://codecov.io/gh/tkem/uritools\n   :alt: Test coverage\n\n.. image:: https://img.shields.io/librariesio/sourcerank/pypi/uritools\n   :target: https://libraries.io/pypi/uritools\n   :alt: Libraries.io SourceRank\n\n.. image:: https://img.shields.io/github/license/tkem/uritools\n   :target: https://raw.github.com/tkem/uritools/master/LICENSE\n   :alt: License\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/psf/black\n   :alt: Code style: black\n\nThis module provides RFC 3986 compliant functions for parsing,\nclassifying and composing URIs and URI references, largely replacing\nthe Python Standard Library's ``urllib.parse`` module.\n\n.. code-block:: pycon\n\n    >>> from uritools import uricompose, urijoin, urisplit, uriunsplit\n    >>> uricompose(scheme='foo', host='example.com', port=8042,\n    ...            path='/over/there', query={'name': 'ferret'},\n    ...            fragment='nose')\n    'foo://example.com:8042/over/there?name=ferret#nose'\n    >>> parts = urisplit(_)\n    >>> parts.scheme\n    'foo'\n    >>> parts.authority\n    'example.com:8042'\n    >>> parts.getport(default=80)\n    8042\n    >>> parts.getquerydict().get('name')\n    ['ferret']\n    >>> parts.isuri()\n    True\n    >>> parts.isabsuri()\n    False\n    >>> urijoin(uriunsplit(parts), '/right/here?name=swallow#beak')\n    'foo://example.com:8042/right/here?name=swallow#beak'\n\nFor various reasons, ``urllib.parse`` and its Python 2 predecessor\n``urlparse`` are not compliant with current Internet standards.  As\nstated in `Lib/urllib/parse.py\n<https://github.com/python/cpython/blob/3.8/Lib/urllib/parse.py>`_:\n\n    RFC 3986 is considered the current standard and any future changes\n    to urlparse module should conform with it.  The urlparse module is\n    currently not entirely compliant with this RFC due to defacto\n    scenarios for parsing, and for backward compatibility purposes,\n    some parsing quirks from older RFCs are retained.\n\nThis module aims to provide fully RFC 3986 compliant replacements for\nthe most commonly used functions found in ``urllib.parse``.  It also\nincludes functions for distinguishing between the different forms of\nURIs and URI references, and for conveniently creating URIs from their\nindividual components.\n\n\nInstallation\n------------------------------------------------------------------------\n\nuritools is available from PyPI_ and can be installed by running::\n\n  pip install uritools\n\n\nProject Resources\n------------------------------------------------------------------------\n\n- `Documentation`_\n- `Issue tracker`_\n- `Source code`_\n- `Change log`_\n\n\nLicense\n------------------------------------------------------------------------\n\nCopyright (c) 2014-2023 Thomas Kemmer.\n\nLicensed under the `MIT License`_.\n\n\n.. _PyPI: https://pypi.org/project/uritools/\n.. _Documentation: https://uritools.readthedocs.io/\n.. _Issue tracker: https://github.com/tkem/uritools/issues/\n.. _Source code: https://github.com/tkem/uritools/\n.. _Change log: https://github.com/tkem/uritools/blob/master/CHANGELOG.rst\n.. _MIT License: https://raw.github.com/tkem/uritools/master/LICENSE\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "URI parsing, classification and composition",
    "version": "4.0.2",
    "project_urls": {
        "Homepage": "https://github.com/tkem/uritools/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6bffb16f225ceeb47f5d8899371ce446a8d6c1fe509a8882998b869f2a794c25",
                "md5": "709b8ac5e5fdfdd20367a56200eae800",
                "sha256": "607b15eae1e7b69a120f463a7d98f91a56671e1ab92aae13f8e1f25c017fe60e"
            },
            "downloads": -1,
            "filename": "uritools-4.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "709b8ac5e5fdfdd20367a56200eae800",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10302,
            "upload_time": "2023-08-30T19:35:39",
            "upload_time_iso_8601": "2023-08-30T19:35:39.624826Z",
            "url": "https://files.pythonhosted.org/packages/6b/ff/b16f225ceeb47f5d8899371ce446a8d6c1fe509a8882998b869f2a794c25/uritools-4.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44712712397a459ef0c960141f1f9fdf5a6b48052c521644c7154c508d976373",
                "md5": "d3dd370a89ea484cb2ae58b9fd98aaa0",
                "sha256": "04df2b787d0eb76200e8319382a03562fbfe4741fd66c15506b08d3b8211d573"
            },
            "downloads": -1,
            "filename": "uritools-4.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d3dd370a89ea484cb2ae58b9fd98aaa0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 23673,
            "upload_time": "2023-08-30T19:35:43",
            "upload_time_iso_8601": "2023-08-30T19:35:43.439394Z",
            "url": "https://files.pythonhosted.org/packages/44/71/2712397a459ef0c960141f1f9fdf5a6b48052c521644c7154c508d976373/uritools-4.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-30 19:35:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tkem",
    "github_project": "uritools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "uritools"
}
        
Elapsed time: 0.10741s