Database Module in a Web Application

Fredrik Lundh fredrik at pythonware.com
Thu Dec 1 08:12:51 EST 2005


Peter Hansen wrote:

> mohammad babaei wrote:
>
>> I'm going to write my first web application in Python,
>> is it an good idea to write a database module that handles the
>> connection to database & executing queries ?
>
> No, it's not a good idea to "reinvent the wheel" if someone else has
> already done the work for you.  All databases which you would probably
> want to use for this already have Python wrappers which will do the job.

unless you interpret "database module" as "a database abstraction layer for
my application", in which case it's a good idea -- unless you prefer to use a
ready-made ORM:

    http://projects.amor.org/dejavu
    http://skunkweb.sourceforge.net/pydo.html
    http://sqlobject.org/
    (etc)

or a web framework that contains an ORM:

    http://www.djangoproject.com/
    http://www.turbogears.org/
    (etc)

</F> 






More information about the Python-list mailing list