-1

I'd like my dstabase models to contain mutable dictionaries. Is this possible with flask-sqlalchemy? If so, can you please provide a minimal example?

davidism
  • 110,080
  • 24
  • 357
  • 317
Dillon Bowen
  • 182
  • 1
  • 7

1 Answers1

0

If your database supports it, you can use JSON column type. Currently this is supported in:

  • PostgreSQL
  • MySQL as of version 5.7
  • SQLite as of version 3.9

Your dictionaries will have to be serializable, of course.

dmitrybelyakov
  • 3,249
  • 2
  • 21
  • 24