473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Pygresql classic vs DB-API interface

I am relatively new to python and am developing an application using
mod_python/pygresql/postgresql.

Being attracted to the idea of database portability, I started out using
the DB-API 2.0 compliant pgdb module. However, I am finding it to be
pretty clunky compared to the classic pg interface.
It just doesn't seem "pythonic" to me. Chief among my concerns is the
way it won't return results as a dictionary, so I have to address the
data using cryptic numeric indeces. To be fair, the 3rd party dtuple
module lets me use dictionaries, but it still seems a bit clunky. Also,
insertion into a table seems unnecessarily ugly. With the classic
interface, I just pass a tablename and a dictionary and let the
interface deal with it. With pgdb, if I want to do something like that
I've got to write my own code to do it. Or does DB-API and pyformat
allow me to do this in a more elegant way of which I am unaware?

I still like the portability of pgdb though. So, does anyone have any
recommendations? Perhaps a module that does for inserts and updates
kind of what dtuple does for selects?

Thank you for any guidance.

Steve Bergman
Sep 19 '05 #1
0 968

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: trewornan | last post by:
I'm trying to install pygresql on mandrake 9.1 but when I try "python setup.py build" I get the error - "cannot find /usr/lib/python2.2/config/makefile" I don't have this makefile - is it...
1
by: Radu Stanciu | last post by:
Hi, I want to use the PygreSQL modules on a Windows machine (more exactly a WinXP one). I've downloaded the latest version (3.4 so far) and I am required to build the pgmodule C library. Is...
4
by: Chuck Amadi | last post by:
Hi all Anyone know a good Pygresql Tutorial for Interfacing between Python & Postgresql . Cheers Chuck
2
by: Neil Zanella | last post by:
Hello, I am using the following with python: The PyQt python bindings: http://www.riverbankcomputing.co.uk/pyqt/ based on the Qt GUI Application Framework:
3
by: bill | last post by:
I need to open a asp.net web form from a classic asp page, and pass a username and password to the asp.net page. The username and password exist as session variables in the classic asp...
1
by: Jan Danielsson | last post by:
Hello all, I'm trying to use pygresql to insert binary data (type: bytea) into a column (using postgresql, obviously). To make a long story short: I can't get it to work. Not even by cutting...
3
by: Keen Anthony | last post by:
Hello, I am currently using psycopg 2 as my db adapter for a mod_python & PostgreSQL web app. It's works fine, and I haven't any complaints. I would appreciate some input on what other...
0
by: h112211 | last post by:
Hi all, I'm using the Windows version of Python 2.4.3 and everything worked okay until I installed PyGreSQL. Well, in fact the installation went fine, but when I try to run my script from IDLE I...
2
by: goodepic | last post by:
I successfully installed postgresql and pygresql from source on my MacBook 2ghz Intel core duo running os x 10.4.8. However, pygresql installed under the defualt python 2.3 installation, while...
0
by: D'Arcy J.M. Cain | last post by:
On Mon, 19 May 2008 18:00:30 +0200 <ervin.ramonllari@hotmail.comwrote: I assume that you got the installer from http://www.PyGreSQL.org/. If so, please join the PyGreSQL list (see above URL)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.