DB access without object-relation mapping?
bignose+hates-spam at benfinney.id.au
Wed Jul 30 01:14:56 CEST 2008
kj <socyl at 987jk.com.invalid> writes:
> The word on the street is to use something like SQLAlchemy for
> database access in Python, but my experience in the past with
> packages that perform automated SQL generation has been awful, so I
> always return to lighter-weight solutions that allow me to write my
> own SQL.
Using SQLAlchemy, you *can* write your own SQL (with its 'text' query
type to feed explicit SQL text on the connection); you just don't
*need* to for the majority of simple and not-so-simple cases.
I've been using SQLAlchemy for some time and have found its
combination of "make the simple cases simple" and "allow full control
when needed" to be close to ideal. I can use exactly the same
interface to leverage the SQL generation for mundane tasks and to
craft custom weird SQL that I need.
Combine that with active, level-headed maintenance, and comprehensive
documentation, and I don't even need to consider using the ORM layer
\ “Know what I hate most? Rhetorical questions.” —Henry N. Camp |
More information about the Python-list