+ @staticmethod
+ def _cfg_path_encode(path):
+ if isinstance(path,ConfigFile):
+ path = path.value
+ elif path is None:
+ path = capi.ffi.NULL
+ elif not hasattr(os, 'PathLike') and isinstance(path, pathlib.Path):
+ path = bytes(path)
+ else:
+ path = os.fsencode(path)
+ return path
+
+ @staticmethod
+ def _db_path_encode(path):
+ if path is None:
+ path = capi.ffi.NULL
+ elif not hasattr(os, 'PathLike') and isinstance(path, pathlib.Path):
+ path = bytes(path)
+ else:
+ path = os.fsencode(path)
+ return path
+
+ def __init__(self, path=None, mode=MODE.READ_ONLY, config=CONFIG.EMPTY):