Metadata-Version: 1.1
Name: table2dicts
Version: 0.2
Summary: Python module for converting a html table to a list of dictionaries.
Home-page: http://github.com/moagstar/table2dicts/
Author: Daniel Bradburn
Author-email: moagstar@gmail.com
License: MIT
Download-URL: https://github.com/moagstar/table2dicts/tarball/0.2
Description: .. image:: https://travis-ci.org/moagstar/table2dicts.svg?branch=master
            :target: https://travis-ci.org/moagstar/table2dicts
        
        table2dicts
        =========== 
        Python module for converting a html table to a list of dictionaries.
        
        Installation
        ------------
        Installing from PyPI using ``pip``:
            
        .. code-block:: bash
        
            $ pip install table2dicts
        
        Installing from source:
            
        .. code-block:: bash
        
            $ python setup.py install
            
        Usage
        -----
        
        Give it some html with a :code:`table`:
        
            >>> table2dicts('''
            ...    <table>
            ...         <thead>
            ...             <tr><th>a</th><th>b</th><th>c</th></tr>
            ...         </thead>
            ...         <tbody>
            ...             <tr><td>1</td><td>2</td><td>3</td></tr>
            ...             <tr><td>4</td><td>5</td><td>6</td></tr>
            ...         </tbody>
            ...    </table>
            ... ''')
            [OrderedDict([('a', '1'), ('b', '2'), ('c', '3')]), OrderedDict([('a', '4'), ('b', '5'), ('c', '6')])]
            
        No :code:`thead` or :code:`tbody`, no problem:
        
            >>> table2dicts('''
            ...    <table>
            ...        <tr><th>a</th><th>b</th><th>c</th></tr>
            ...        <tr><td>1</td><td>2</td><td>3</td></tr>
            ...        <tr><td>4</td><td>5</td><td>6</td></tr>
            ...    </table>
            ... ''')
            [OrderedDict([('a', '1'), ('b', '2'), ('c', '3')]), OrderedDict([('a', '4'), ('b', '5'), ('c', '6')])]
        
        When no :code:`th` is present, the first row of :code:`td` elements is used as a header:
        
            >>> table2dicts('''
            ...    <table>
            ...        <tr><td>a</td><td>b</td><td>c</td></tr>
            ...        <tr><td>1</td><td>2</td><td>3</td></tr>
            ...        <tr><td>4</td><td>5</td><td>6</td></tr>
            ...    </table>
            ... ''')
            [OrderedDict([('a', '1'), ('b', '2'), ('c', '3')]), OrderedDict([('a', '4'), ('b', '5'), ('c', '6')])]
        
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development :: Libraries :: Python Modules
