Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Python and databases

Name: Anonymous 2008-01-15 6:27

Why does Python not have a standardised database API, like Perl's DBI? I want my database code to be as generic as possible in case I change the RDBMS later. Any tips?

Name: Anonymous 2008-01-15 6:30

Because Python is immature

Name: Anonymous 2008-01-15 6:37

Because Python as a language does not support the construction of well-defined frameworks.

Name: Anonymous 2008-01-15 6:42

It does: http://www.python.org/dev/peps/pep-0249/

See also: http://initd.org/pub/software/psycopg/dbapi20programming.pdf

And to make it generic, use import [i]<name of database module>[/i] as db and reference db instead of the module name.

Name: Anonymous 2008-01-15 6:43

>>4
Fuck, I forgot you can't nest other tags in [code].

Name: Anonymous 2008-01-15 7:03

>>5
That's why you use Python.

Name: Anonymous 2008-01-15 7:05

>>5
you can if you are EXPERT enough

Name: Anonymous 2008-01-15 7:16

>>7
That's nesting [code] within other tages.

Name: Anonymous 2008-01-15 7:17

>>8
tages

Name: Anonymous 2008-01-15 8:14

Name: Anonymous 2008-01-15 12:46

>>1
I'm not sure if you can get it separately, but Django's model framework is made of win, abstraction and the BSD license.
Changing over from SQLite to Oracle with a couple of configuration settings is damn handy for development.

>>10
Oh my, enterprise-level you say?

Name: Anonymous 2008-01-15 23:39

>>10,11
SQLAlchemy is friggin' wizardry. One line of code can crank out a complicated query with six join tables and a ton of stacked together where/group by/having clauses, and it's lazy evaluated so if it can give you all the information you want without actually *running* the query, it does. Sometimes you don't even need to connect to the db.

Name: Anonymous 2009-03-18 3:51

I feel the need, the need for weed!

Marijuana MUST be legalized.

Name: Anonymous 2010-12-17 1:41

This post brought to you by the Gay Nigger Association of America

Name: Anonymous 2010-12-26 9:07


Don't change these.
Name: Email:
Entire Thread Thread List