ORM layer

Discussion in 'Python' started by David, Jun 29, 2007.

  1. David

    David Guest

    I am looking for an ORM for Python that fulfills a few simple needs.

    - ability to support a number of backends (probably mysql and sqlite  
    at present, csv a bonus)
    - ability to be used easily from console python scripts, a bonus if I  
    can add a simple web GUI later using some framework
    - decent documentation a definite plus

    I do not need:

    - massively complex joins (I could write these myself if needed)
    - something engineered for hundreds of tables, I have only a few and  
    don't need overkill

    Any recommendations?

    David
    David, Jun 29, 2007
    #1
    1. Advertising

  2. David a écrit :
    > I am looking for an ORM for Python that fulfills a few simple needs.
    >
    > - ability to support a number of backends (probably mysql and sqlite
    > at present, csv a bonus)


    I didn't knew csv was a relational database.

    > - ability to be used easily from console python scripts, a bonus if I
    > can add a simple web GUI later using some framework
    > - decent documentation a definite plus
    >
    > I do not need:
    >
    > - massively complex joins (I could write these myself if needed)
    > - something engineered for hundreds of tables, I have only a few and
    > don't need overkill
    >
    > Any recommendations?


    The best hi-level RDBMS integration package in Python is probably
    SQLAlchemy. I say "hi-level RDBMS integration" because it's much more
    than an ORM. It's already used by some web applications (Trac amongst
    other) and frameworks (Pylons, Turbogears, ...) and the documentation is
    more than correct. So it matches most of your specs. OTHO, while fairly
    usable, it's not the simplest system around - even if some extensions
    like Elixir try to make things simpler-, so you may also want to have a
    look at other packages like SQLObject.

    > David
    Bruno Desthuilliers, Jun 30, 2007
    #2
    1. Advertising

  3. David wrote:
    > I am looking for an ORM for Python that fulfills a few simple needs.


    * SQLObject
    * SQLAlchemy (+Elixir)
    * DejaVu

    There are probably others but these are the most commonly used AFAIK.

    EuGeNe -- http://www.3kwa.com
    EuGeNe Van den Bulke, Jun 30, 2007
    #3
  4. David

    Ben Finney Guest

    David <> writes:

    > I am looking for an ORM for Python that fulfills a few simple needs.
    >
    > - ability to support a number of backends (probably mysql and sqlite  
    > at present, csv a bonus)
    > - ability to be used easily from console python scripts, a bonus if I  
    > can add a simple web GUI later using some framework
    > - decent documentation a definite plus


    I second the recommendation for SQLAlchemy. I've not used Elixir, but
    that's a way to abstract SQLAlchemy further, if you want to work at an
    even higher level of abstraction.

    The documentation for SQLAlchemy is very good, in my experience. The
    library allows one to work entirely with the object system (using it
    as an ORM), or dynamically build SQL statements, or combine the two
    methods.

    --
    \ "I think there is a world market for maybe five computers." -- |
    `\ Thomas Watson, chairman of IBM, 1943 |
    _o__) |
    Ben Finney
    Ben Finney, Jun 30, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YzY3NjIyOA==?=

    do it in database layer or application layer

    =?Utf-8?B?YzY3NjIyOA==?=, Jan 26, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    431
    Karl Seguin [MVP]
    Jan 27, 2006
  2. et
    Replies:
    2
    Views:
    1,912
  3. dan
    Replies:
    25
    Views:
    1,334
    Uncle Bob (Robert C. Martin)
    Oct 28, 2003
  4. Dhananjay
    Replies:
    1
    Views:
    1,112
    sloan
    Dec 18, 2006
  5. BJ Dierkes

    Database Abstraction Layer And/Or ORM

    BJ Dierkes, Sep 24, 2007, in forum: Python
    Replies:
    1
    Views:
    316
    Bruno Desthuilliers
    Sep 24, 2007
Loading...

Share This Page