Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ORM layer

2 views
Skip to first unread message

David

unread,
Jun 29, 2007, 3:40:25 PM6/29/07
to pytho...@python.org
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

Bruno Desthuilliers

unread,
Jun 30, 2007, 1:06:12 AM6/30/07
to
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

EuGeNe Van den Bulke

unread,
Jun 30, 2007, 1:20:47 AM6/30/07
to
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

Ben Finney

unread,
Jun 30, 2007, 4:16:47 AM6/30/07
to
David <li...@edeca.net> 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

0 new messages