1

From this answer and PEP-249 we can Python MySQL client libraries might support a variety of parameter styles.

In the real world, not so much.

>>> pymysql.paramstyle
'format'

>>> MySQLdb.paramstyle
'format'

>>> oursql.paramstyle
'qmark'

Are there any client libraries that support a more readable paramstyle, like named or even pyformat?

Community
  • 1
  • 1
Martin Burch
  • 2,726
  • 4
  • 31
  • 59
  • [This answer](http://stackoverflow.com/a/10986040/1487413) seems to indicate the venerable MySQLdb module supports the pyformat style. However, MySQLdb doesn't properly parameterize queries -- it does escaping in Python instead of passing the parameters to MySQL separately. – Martin Burch Apr 10 '15 at 21:04
  • So, then, why doesn't MySQLdb *say* it supports 'pyformat'? It seems to be that the paramstyle must return a string of one type, instead of a list of types. – Martin Burch Apr 10 '15 at 21:05

0 Answers0