SQLalchemy gives me the following warning when I use a Numeric column with an SQLite database engine.
SAWarning: Dialect sqlite+pysqlite does not support Decimal objects natively
I'm trying to figure out the best way to have pkgPrice = Column(Numeric(12,2))
in SQLalchemy while still using SQLite.
This question [1] How to convert Python decimal to SQLite numeric? shows a way to use sqlite3.register_adapter(D, adapt_decimal)
to have SQLite receive and return Decimal, but store Strings, but I don't know how to dig into the SQLAlchemy core to do this yet. Type Decorators look like the right approach but I don't grok them yet.
Does anyone have a SQLAlchemy Type Decorator Recipe that will have Numeric or Decimal numbers in the SQLAlchemy model, but store them as strings in SQLite?