Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install simpledb

How to install SimpleDB

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install simpledb
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
0.0.5 Available View build log
Linux (32-bit)
0.0.5 Available View build log
Linux (64-bit)
0.0.5 Available View build log
 
Author
License
LICENSE.txt
Imports
Lastest release
version 0.0.5 on Feb 23rd, 2013

SimpleDB aims to provide a wrapper to make writing scripts that do basic queries a lot easier and faster to write.

Helper functions

System Message: WARNING/2 (<string>, line 9)

Title underline too short.

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

System Message: WARNING/2 (<string>, line 36)

Title underline too short.

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'

Subscribe to package updates

Last updated Feb 23rd, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.