Metadata-Version: 1.0
Name: urledit
Version: 1.0
Summary: Url parsing and editing
Home-page: https://github.com/imbolc/urledit
Author: Imbolc
Author-email: imbolc@imbolc.name
License: MIT
Description: urledit
        ======
        URL parsing and editing in the object or functional style.
        
            >>> from urledit import urledit
            >>> url = 'forum/showthread.php?s=9b5d99fc6a61a17cc07326714500b3ab&p=728386#post728386'
        
        Functional style
        ----------------
            >>> urledit(url)(scheme='http')(netloc='host.com')(fragment=''
            ... ).param(s=None).param(a=1).param(b=['x', 'y', 'z']).join()
            'http://host.com/forum/showthread.php?p=728386&a=1&b=x&b=y&b=z'
        
        or
        
            >>> urledit(url, scheme='http', netloc='host.com', fragment=''
            ... ).param(s=None, a=1, b=['x', 'y', 'z']).join()
            'http://host.com/forum/showthread.php?p=728386&a=1&b=x&b=y&b=z'
        
        Object style
        ------------
            >>> u = urledit(url)
            >>> u.scheme, u.netloc, u.path, u.qs, u.fragment
            ('', '', 'forum/showthread.php', 's=9b5d99fc6a61a17cc07326714500b3ab&p=728386', 'post728386')
        
            >>> u.scheme, u.netloc, u.fragment = 'http', 'host.com', ''
            >>> u.join()
            'http://host.com/forum/showthread.php?s=9b5d99fc6a61a17cc07326714500b3ab&p=728386'
        
        Working with query string:
        
            >>> u.query
            {'p': '728386', 's': '9b5d99fc6a61a17cc07326714500b3ab'}
        
            >>> del u.query['s']
            >>> u.join()
            'http://host.com/forum/showthread.php?p=728386'
        
            >>> u.query['a'] = 1
            >>> u.query['b'] = ['x', 'y', 'z']
            >>> u.join()
            'http://host.com/forum/showthread.php?p=728386&a=1&b=x&b=y&b=z'
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: ISC License (ISCL)
Classifier: Programming Language :: Python
