High numerical precision floats with MySQL and the SQLAlchemy ORM

后端 未结 1 471
离开以前
离开以前 2021-01-11 14:17

I store some numbers in a MySQL using the ORM of SQLAlchemy. When I fetch them afterward, they are truncated such that only 6 significant digits are conserved, thus losing a

相关标签:
1条回答
  • 2021-01-11 14:46

    Per our discussion in the comments: sa.types.Float(precision=[precision here]) instead of sa.Float allows you to specify precision; however, sa.Float(Precision=32) has no effect. See the documentation for more information.

    0 讨论(0)
提交回复
热议问题