pSQL Homepage

ABSTRACT:

  • Are you using a (My)SQL database all day in your programming projects and dont want to write SQL statements again and again all over?
  • Would you like to use an SQL database in your project without needing to know much about SQL?
  • Interested in making your database access sources a bit more readable and easier to grok for other programmers?
If you can answer YES to one of these, pSQL might be of interest to you.

WHAT IT DOES:

Basically, pSQL wraps all database access and all data you get from your database into some easy-to-handle and easily usable objects that "feel" like standard python data structures. So, if you have a pSQL database object called "myDB" with a table called Address, you can find all people in that table who are living in Oklahoma by issuing a command like:

      |>>> res = myDB.Address.City["Oklahoma%"]
      |>>> len(res)
      |2
      To find out the phone numbers of those two,
      you can use e.g.:
      |>>> res.column("Phone")
      |['0405-12345', '0405-67890']
      or:
      |>>> for r in res:
      |...   print "%s: %s"%(r.Name, r.Phone)
      |John Doe: 0405-12345
      |Joe User: 0405-67890
      To change one of those numbers in the database:
      |>>> john = res[0]
      |>>> john.Phone = '0405-54321' 
      or:
      |>>> res[0]["Phone"] = '0405-54321'
      or:
      |>>> res[0].update({'Phone': '0405-54321'})  # pSQL 0.9.4 and above
      

WHAT IT DOES NOT:

pSQL currently works with MySQLdb only. This will change in a future version and an abstraction layer will be added which allows the use of any DB 2.0 API compliant SQL module, e.g. for postgres.

DOWNLOAD:

Current version:

April 25, 2017: pSQL-1.2.4.tar.gz README Examples ToDo Changes

Older versions:

February 13, 2014: pSQL-1.2.1.tar.gz
February 14, 2013: pSQL-1.2.0.tar.gz
March 29, 2007: pSQL-0.9.8.tar.gz
July 01, 2005: pSQL-0.9.6.tar.gz
August 06, 2004: pSQL-0.9.5.tar.gz
September 13, 2003: pSQL-0.9.4.tar.gz
July 30, 2003: pSQL-0.9.3.tar.gz
March 22, 2003: pSQL-0.9.2.tar.gz
May 01, 2002: pSQL-0.9.1.tar.gz
January 14, 2002: pSQL-0.9.0.tar.gz
December 11, 2001: pSQL-0.8.9.tar.gz
November 19, 2001: pSQL-0.8.8.tar.gz
October 22, 2001: pSQL-0.8.7.tar.gz
October 12, 2001: pSQL-0.8.6.tar.gz