provinzio / CoinTaxman

Calculate your taxes from cryptocurrency gains
GNU Affero General Public License v3.0
141 stars 31 forks source link

Replace sqlite with Sqlalchemy #75

Open scientes opened 3 years ago

scientes commented 3 years ago

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)

provinzio commented 3 years ago

I think that this is overkill and only adds another dependency.

scientes commented 3 years ago

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

provinzio commented 3 years ago

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.

scientes commented 3 years ago

Or we i could just make a wrapper for mysql/postgresql and we don't have the Overkill anymore

scientes commented 3 years ago

But yes this is far future for me

provinzio commented 3 years ago

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