Metadata-Version: 1.1
Name: urimagic
Version: 1.1.0
Summary: UNKNOWN
Home-page: http://nigelsmall.com/urimagic
Author: Nigel Small
Author-email: nigel@nigelsmall.com
License: Apache License, Version 2.0
Description: .. image:: https://travis-ci.org/nigelsmall/urimagic.png?branch=master
           :target: https://travis-ci.org/nigelsmall/urimagic
        
        URIMagic
        ========
        
        URIMagic is a Python library that provides full implementations of RFC
        3986 URIs and RFC 6570 URI Templates.
        
        Percent Encoding & Decoding
        ---------------------------
        
        .. code-block:: python
        
            >>> from urimagic import percent_encode, percent_decode
            >>> percent_encode("Mulder & Scully")
            'Mulder%20%26%20Scully'
            >>> percent_decode("Mulder%20%26%20Scully")
            'Mulder & Scully'
        
        Parsing a URI
        -------------
        
        .. code-block:: python
        
            >>> from urimagic import URI
            >>> uri = URI("https://bob@example.com:8080/data/report.html?date=2000-12-25#summary")
            >>> uri.scheme
            'https'
            >>> uri.authority
            Authority('bob@example.com:8080')
            >>> uri.user_info
            'bob'
            >>> uri.host
            'example.com'
            >>> uri.port
            8080
            >>> uri.host_port
            'example.com:8080'
            >>> uri.path
            Path('/data/report.html')
            >>> uri.query
            Query('date=2000-12-25')
            >>> uri.fragment
            'summary'
            >>> uri.hierarchical_part
            '//bob@example.com:8080/data/report.html'
            >>> uri.absolute_path_reference
            '/data/report.html?date=2000-12-25#summary'
            >>> uri.string
            'https://bob@example.com:8080/data/report.html?date=2000-12-25#summary'
        
        Authorities
        ~~~~~~~~~~~
        
        .. code-block:: python
        
            >>> from urimagic import Authority
            >>> auth = Authority("bob@example.com:8080")
            >>> auth.user_info
            'bob'
            >>> auth.host
            'example.com'
            >>> auth.port
            8080
            >>> auth.host_port
            'example.com:8080'
            >>> auth.string
            'bob@example.com:8080'
        
        Paths
        ~~~~~
        
        .. code-block:: python
        
            >>> from urimagic import Path
            >>> Path("/foo/bar").segments
            [PathSegment(''), PathSegment('foo'), PathSegment('bar')]
            >>> Path("/foo/bar").with_trailing_slash()
            Path('/foo/bar/')
            >>> Path("/foo/bar/").without_trailing_slash()
            Path('/foo/bar')
            >>> Path("/foo/bar").string
            '/foo/bar'
        
        Queries
        ~~~~~~~
        
        .. code-block:: python
        
            >>> from urimagic import Query
            >>> query = Query("cake=nice&cake=sweet&mushrooms=yuk")
            >>> query.get("cake")
            'nice'
            >>> query.get("cake", 1)
            'sweet'
            >>> query.get("mushrooms")
            'yuk'
            >>> query.string
            'cake=nice&cake=sweet&mushrooms=yuk'
        
        Resolving new URIs
        ------------------
        
        URI Templates
        -------------
        
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development
