Have you tried a conditional/try-catch block in your __init__? Something like
class MyDBConn(object):
def __init__(self, **db_kwargs):
try:
db = some_db.connect(**db_kwargs)
except some_db.ConnectionError:
db = my_fake_db()
Is there a best practice, tutorials, examples out there that demenstrates the
best ways to create an offline mode of a python app that gets and sends its
data to a remote database. I have tried creating my own via json API to mysql
and using sqlalchemy SQLite and mysql. Everything I seem to come