xurls


Namexurls JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/xyngular/py-xurls
SummaryPython URL Library
upload_time2024-09-04 03:57:21
maintainerNone
docs_urlNone
authorJosh Orr
requires_python<4.0,>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.8|%203.9|%203.10|%203.11&color=blue?style=flat-square&logo=python)
![PyPI version](https://badge.fury.io/py/xurls.svg?)

## Documentation

A high-level `Url` class to make parsing, looking at and manipulating
urls much easier.

Also allows for easily composable urls.

Everything is subject to change!

**[📄 Detailed Documentation](https://xyngular.github.io/py-xurls/latest/)** | **[🐍 PyPi](https://pypi.org/project/xurls/)**

## Getting Started

```shell
poetry install xurls
```

or

```shell
pip install xurls
```

Very basic example:

```python
from xurls import Url

url = Url("http://www.google.com/some/path?some_key=some-value")
assert url.host == "www.google.com"

url.host = "apple.com"
assert str(url) == "http://apple.com/some/path"

assert url['some_key'] == 'some-value'

```

You can also compose urls:

```python
from xurls import Url

base_url = Url(host='www.example.com')
url_to_append = Url(path='hello/today')

# Append url; paths will append to end, queries merged together.
# Other components like host will be replaced if there is a value in the appended url.
final_url = base_url.copy().append_url(url_to_append)

assert str(final_url) == 'www.example.com/hello/today'

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xyngular/py-xurls",
    "name": "xurls",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Josh Orr",
    "author_email": "josh@orr.blue",
    "download_url": "https://files.pythonhosted.org/packages/52/73/89b29df170b67b563db9eb9e7c25a994fc3a996976bc5c18440f34eaf3b3/xurls-1.2.0.tar.gz",
    "platform": null,
    "description": "![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.8|%203.9|%203.10|%203.11&color=blue?style=flat-square&logo=python)\n![PyPI version](https://badge.fury.io/py/xurls.svg?)\n\n## Documentation\n\nA high-level `Url` class to make parsing, looking at and manipulating\nurls much easier.\n\nAlso allows for easily composable urls.\n\nEverything is subject to change!\n\n**[\ud83d\udcc4 Detailed Documentation](https://xyngular.github.io/py-xurls/latest/)** | **[\ud83d\udc0d PyPi](https://pypi.org/project/xurls/)**\n\n## Getting Started\n\n```shell\npoetry install xurls\n```\n\nor\n\n```shell\npip install xurls\n```\n\nVery basic example:\n\n```python\nfrom xurls import Url\n\nurl = Url(\"http://www.google.com/some/path?some_key=some-value\")\nassert url.host == \"www.google.com\"\n\nurl.host = \"apple.com\"\nassert str(url) == \"http://apple.com/some/path\"\n\nassert url['some_key'] == 'some-value'\n\n```\n\nYou can also compose urls:\n\n```python\nfrom xurls import Url\n\nbase_url = Url(host='www.example.com')\nurl_to_append = Url(path='hello/today')\n\n# Append url; paths will append to end, queries merged together.\n# Other components like host will be replaced if there is a value in the appended url.\nfinal_url = base_url.copy().append_url(url_to_append)\n\nassert str(final_url) == 'www.example.com/hello/today'\n\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python URL Library",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/xyngular/py-xurls",
        "Repository": "https://github.com/xyngular/py-xurls"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "52bb6a3a82db8b60703bbb37c241bc1d04596e2be59b105615531c13e41aedf8",
                "md5": "16530a5fefa50bc25f684c426fe9d87f",
                "sha256": "e611c4c3c133f738f0178ea6a63aaa5203457ea91ddc522a8177474470e9639a"
            },
            "downloads": -1,
            "filename": "xurls-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16530a5fefa50bc25f684c426fe9d87f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 18428,
            "upload_time": "2024-09-04T03:57:20",
            "upload_time_iso_8601": "2024-09-04T03:57:20.057445Z",
            "url": "https://files.pythonhosted.org/packages/52/bb/6a3a82db8b60703bbb37c241bc1d04596e2be59b105615531c13e41aedf8/xurls-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "527389b29df170b67b563db9eb9e7c25a994fc3a996976bc5c18440f34eaf3b3",
                "md5": "37824ba989cd47436127c7fae84900a7",
                "sha256": "2394e8008e4117d0649ef33758953679dee6e4d682b76b7074f738c6d8884f06"
            },
            "downloads": -1,
            "filename": "xurls-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "37824ba989cd47436127c7fae84900a7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 19127,
            "upload_time": "2024-09-04T03:57:21",
            "upload_time_iso_8601": "2024-09-04T03:57:21.623870Z",
            "url": "https://files.pythonhosted.org/packages/52/73/89b29df170b67b563db9eb9e7c25a994fc3a996976bc5c18440f34eaf3b3/xurls-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-04 03:57:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xyngular",
    "github_project": "py-xurls",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xurls"
}
        
Elapsed time: 0.35018s