uritools


Nameuritools JSON
Version 4.0.3 PyPI version JSON
download
home_pagehttps://github.com/tkem/uritools/
SummaryURI parsing, classification and composition
upload_time2024-05-28 18:07:45
maintainerNone
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": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Thomas Kemmer",
    "author_email": "tkemmer@computer.org",
    "download_url": "https://files.pythonhosted.org/packages/d3/43/4182fb2a03145e6d38698e38b49114ce59bc8c79063452eb585a58f8ce78/uritools-4.0.3.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.3",
    "project_urls": {
        "Homepage": "https://github.com/tkem/uritools/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e6175a4510d9ca9cc8be217ce359eb54e693dca81cf4d442308b282d5131b17d",
                "md5": "fc8516087f201548cf6adb2e92589e89",
                "sha256": "bae297d090e69a0451130ffba6f2f1c9477244aa0a5543d66aed2d9f77d0dd9c"
            },
            "downloads": -1,
            "filename": "uritools-4.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fc8516087f201548cf6adb2e92589e89",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10304,
            "upload_time": "2024-05-28T18:07:42",
            "upload_time_iso_8601": "2024-05-28T18:07:42.731214Z",
            "url": "https://files.pythonhosted.org/packages/e6/17/5a4510d9ca9cc8be217ce359eb54e693dca81cf4d442308b282d5131b17d/uritools-4.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3434182fb2a03145e6d38698e38b49114ce59bc8c79063452eb585a58f8ce78",
                "md5": "599768df977add2b43e357613b05ecaa",
                "sha256": "ee06a182a9c849464ce9d5fa917539aacc8edd2a4924d1b7aabeeecabcae3bc2"
            },
            "downloads": -1,
            "filename": "uritools-4.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "599768df977add2b43e357613b05ecaa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 24184,
            "upload_time": "2024-05-28T18:07:45",
            "upload_time_iso_8601": "2024-05-28T18:07:45.194147Z",
            "url": "https://files.pythonhosted.org/packages/d3/43/4182fb2a03145e6d38698e38b49114ce59bc8c79063452eb585a58f8ce78/uritools-4.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-28 18:07:45",
    "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: 4.13694s