CoinTaxman
CoinTaxman copied to clipboard
Replace sqlite with Sqlalchemy
This allows us database agnostic SQL programming and enables us to Support multiple SQL flavors out of the Box (sqlite, MySQL,postgresql are the ones i know that are defintively supported)
I think that this is overkill and only adds another dependency.
could we make it optional? like: if sqlalchemy is not found use sqlite this would need that we make a database class for all operations (_get_price_db etc) which we could switch depending on if sqlalchemy is installed or not:
try:
import sqlalchemy
database=alchemyDB(path)
except ImportError:
import sqllite3
database=sqliteDB(path)
i'd someday like to make a small web app out of this and for that an actual db server would be nice, so i do not have the hassle of making sqlite concurrent
but WAL could be a fix for that
A wrapper for sqlalchemy is definitely an over-overkill. If it's important for you, we can change to sqlalchemy, but this issue should be our lowest priority.
Or we i could just make a wrapper for mysql/postgresql and we don't have the Overkill anymore
But yes this is far future for me
Or we i could just make a wrapper for mysql/postgresql and we don't have the Overkill anymore
Sqlalchemy is exactly what you use in that case