[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Querying MariaDB from python

On 02/10/18 16:47, Ervin Heged?s wrote:
> hi,
> now rows will looks like this:
> ({'id':...,...},{'id':...,}...)

Thanks Ervin, but:

   cursor = cnx.cursor(pymysql.cursors.DictCursor)
NameError: name 'pymysql' is not defined

I have been using the mysql.connector module, which seems to be the
"official" python interface. I hadn't spotted the pymysql module. Is the
consensus here that pymysql is the preferred connector?


Tony van der Hoff        | mailto:tony at vanderhoff.org
Buckinghamshire, England |