[Twisted-Python] How to properly return a dict from adbapi

Phil Mayers p.mayers at imperial.ac.uk
Tue Feb 20 06:40:17 EST 2007

Einar S. Idsø wrote:
> Itamar Shtull-Trauring wrote:
>> Some database adapters will return objects that act like dictionaries,
>> or have an extra method that does so. adabpi itself doesn't really
>> provide any extra infrastructure for doing so since it's intended as a
>> thin layer wrapping db-api.
> So in other words: The technique I am using is okay? Or should I be


> using one of the other adapters? If so, would you mind pointing me to

only if it provides dictfetchall() support

> some of my options as I haven't been able to find any simple
> alternatives to adbapi?

You misunderstand - you have to use adbapi. The choice is which python 
DB-API adapter the adbapi connection will "wrap".

I'm afraid I don't use MySQL so I don't know if any have dict* support.

More information about the Twisted-Python mailing list