ORM layer

D

David

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
 
B

Bruno Desthuilliers

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.
 
B

Ben Finney

David said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top