miniuri


Nameminiuri JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://git.unturf.com/python/miniuri
Summaryminiuri: The Universal URI Parser
upload_time2024-09-25 13:57:19
maintainerNone
docs_urlNone
authorRussell Ballestrini
requires_pythonNone
licensePublic Domain
keywords miniuri uri url parser
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            miniuri
#######

miniuri is a universal URI parser class.

Only 150 lines of Python (486 lines if you count unit tests).


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

.. code-block:: bash

  pip install miniuri


What does it do?
================

The parser grants access to the following attributes:

.. code-block:: text

 foo://username:password@test.com:808/go/to/index.php?pet=cat&name=bam#eye
 \_/   \_______________/ \______/ \_/       \___/ \_/ \_______________/\_/
  |           |             |      |          |    |       |            | 
  |       userinfo       hostname  |          |    |      query   fragment
  |    \___________________________|/\________|____|_/
  |                  |             |      |   |    |
 scheme          authority         |    path  |  extension
                                   |          |
                                  port     filename


Tutorial
========

This example shows how you can set and get any of the URI attributes:

.. code-block:: python

 >>> from miniuri import Uri
 >>> u = Uri( "http://www.foxhop.net/samsung/HL-T5087SA/red-LED-failure" )
 >>> u.uri = "https://fox:pass@www.foxhop.net:81/path/filename.jpg?p=2#5"
 >>> print(u.uri)
 'https://fox:pass@www.foxhop.net:81/path/filename.jpg?p=2#5'
 >>> print(u.hostname)
 'www.foxhop.net'
 >>> print(u.scheme)
 'https'
 >>> u.username = 'max'
 >>> print(u)
 'https://max:pass@www.foxhop.net:81/path/filename.jpg?p=2#5'
 >>> print(u.relative_uri)
 '/path/filename.jpg?p=2#5'


How do I thank you?
===================

You should follow me on http://twitter.com/russellbal


License
===================

* Public Domain


Public Revision Control
=======================

* https://git.unturf.com/python/miniuri

            

Raw data

            {
    "_id": null,
    "home_page": "https://git.unturf.com/python/miniuri",
    "name": "miniuri",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "miniuri uri url parser",
    "author": "Russell Ballestrini",
    "author_email": "russell.ballestrini@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ce/52/cf8f3be8880870330aa34b842f9c54be20dc8ea440b9b8895f4b925dc579/miniuri-1.1.0.tar.gz",
    "platform": "All",
    "description": "miniuri\n#######\n\nminiuri is a universal URI parser class.\n\nOnly 150 lines of Python (486 lines if you count unit tests).\n\n\nInstallation\n============\n\n.. code-block:: bash\n\n  pip install miniuri\n\n\nWhat does it do?\n================\n\nThe parser grants access to the following attributes:\n\n.. code-block:: text\n\n foo://username:password@test.com:808/go/to/index.php?pet=cat&name=bam#eye\n \\_/   \\_______________/ \\______/ \\_/       \\___/ \\_/ \\_______________/\\_/\n  |           |             |      |          |    |       |            | \n  |       userinfo       hostname  |          |    |      query   fragment\n  |    \\___________________________|/\\________|____|_/\n  |                  |             |      |   |    |\n scheme          authority         |    path  |  extension\n                                   |          |\n                                  port     filename\n\n\nTutorial\n========\n\nThis example shows how you can set and get any of the URI attributes:\n\n.. code-block:: python\n\n >>> from miniuri import Uri\n >>> u = Uri( \"http://www.foxhop.net/samsung/HL-T5087SA/red-LED-failure\" )\n >>> u.uri = \"https://fox:pass@www.foxhop.net:81/path/filename.jpg?p=2#5\"\n >>> print(u.uri)\n 'https://fox:pass@www.foxhop.net:81/path/filename.jpg?p=2#5'\n >>> print(u.hostname)\n 'www.foxhop.net'\n >>> print(u.scheme)\n 'https'\n >>> u.username = 'max'\n >>> print(u)\n 'https://max:pass@www.foxhop.net:81/path/filename.jpg?p=2#5'\n >>> print(u.relative_uri)\n '/path/filename.jpg?p=2#5'\n\n\nHow do I thank you?\n===================\n\nYou should follow me on http://twitter.com/russellbal\n\n\nLicense\n===================\n\n* Public Domain\n\n\nPublic Revision Control\n=======================\n\n* https://git.unturf.com/python/miniuri\n",
    "bugtrack_url": null,
    "license": "Public Domain",
    "summary": "miniuri: The Universal URI Parser",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://git.unturf.com/python/miniuri"
    },
    "split_keywords": [
        "miniuri",
        "uri",
        "url",
        "parser"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ce52cf8f3be8880870330aa34b842f9c54be20dc8ea440b9b8895f4b925dc579",
                "md5": "853897d88f11027ec46a41c2a825d7c3",
                "sha256": "8e1cd7a6223abda90175706881685e87c71d499d806ed90743d76816f7cbc8ef"
            },
            "downloads": -1,
            "filename": "miniuri-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "853897d88f11027ec46a41c2a825d7c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5115,
            "upload_time": "2024-09-25T13:57:19",
            "upload_time_iso_8601": "2024-09-25T13:57:19.725347Z",
            "url": "https://files.pythonhosted.org/packages/ce/52/cf8f3be8880870330aa34b842f9c54be20dc8ea440b9b8895f4b925dc579/miniuri-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-25 13:57:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "miniuri"
}
        
Elapsed time: 1.80505s