def __init__(self, service_name, storage_name, **kwargs): path = os.path.join(kwargs["path"], service_name) os.makedirs(path, exist_ok=True) self.db = dbm.open(os.path.join(path, storage_name + ".db"), "cs")