import sqlite3
class Db(object):
def __new__(cls, *args, **kwargs):
if not hasattr(cls, 'instance') or not cls.instance:
cls.instance = super().__new__(cls)
return cls.instance
def __init__(self, connection_args):
self.connector = sqlite3.connect(connection_args)