一首诗 schrieb:
Hi all,

Recently I am studying some python ORM libraries, such as sqlalchemy.

These are very powerful technologies to handle database.  But I think
my project are not complicated to enough to benefit from a complete
ORM system.

What I really want, is some easy ways to load data from database, and
change rows of data to list of named tuple, then I could send these
data to my client application.

I don't think I want these subtle behavior such as lazy load, auto
update, ect. in ORM.

So is there some libraries like that?

Or is there some tools that could generate code from database scheme
as I want?


Sqlalchemy. You don't need to use the ORM-layer, and you can use reflection to create schema-objects like tables.

Then you can use that to create SQL-queries simple & powerful, whilst being DB-agnostic and having a road to start using the ORM if you discover it is useful for you.

To be honest: if you can control the schema, I'd still go for an orm. I for example use elixir. It makes the easy things *really* easy, and the complicated ones ar still possible.


Diez
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to