Metadata-Version: 1.0
Name: SimpleDB
Version: 0.0.4
Summary: A wrapper around MySQLdb to make development of quick scripts easier
Home-page: http://www.kormoc.com
Author: Rob Smith
Author-email: kormoc@gmail.com
License: LICENSE.txt
Description: ===========
        SimpleDB
        ===========
        
        SimpleDB aims to provide a wrapper to make writing scripts that do basic queries
        a lot easier and faster to write.
        
        Helper functions
        =========
        
        Dicts
        -------------
        
        * query_dict
        * query_dict_row
        
        Truples
        -------------
        
        * query_tuple
        * query_tuple_row
        
        Lists
        -------------
        
        * query_list
        * query_list_row
        
        Fields
        -------------
        
        * query_fields
        * query_field
        
        Usage examples
        =========
        
        MySQLdb
        -------------
        
        from SimpleDB import MySQLdb
        
        dbh = MySQLdb(user='root', passwd='bleh')
        
        for field in dbh.query_dicts('SELECT col1, col2, col3 FROM table')():
            print field
                {'col1': 'a', 'col2': 'b', 'col3': 'c'}
                {'col1': 'd', 'col2': 'e', 'col3': 'f'}
        
        print dbh.query_dict_row('SELECT col1, col2, col3 FROM table LIMIT 1')
            {'col1': 'a', 'col2': 'b', 'col3': 'c'}
            
        for field in dbh.query_tuples('SELECT col1, col2, col3 FROM table')():
            print field
                ('a', 'b', 'c'),
                ('d', 'e', 'f'),
                
        print dbh.query_tuple_row('SELECT col1, col2, col3 FROM table LIMIT 1')
            ('a', 'b', 'c')
            
        for field in dbh.query_lists('SELECT col1, col2, col3 FROM table')():
            print field
                ['a', 'b', 'c'],
                ['d', 'e', 'f'],
            
        print dbh.query_list_row('SELECT col1, col2, col3 FROM table LIMIT 1')
            ['a', 'b', 'c']
            
        for field in dbh.query_fields('SELECT col1 FROM table')():
            print field
                'a'
                'd'
        
        print dbh.query_field('SELECT col1 FROM table LIMIT 1')
            'a'
        
Platform: UNKNOWN
