def __init__(self, dbpath=None, maxsize=<NUM_LIT>, readonly=False, sync=True, open=True, log=None):
assert dbpath is None or type(dbpath) == str<EOL>assert type(maxsize) in six.integer_types<EOL>assert type(readonly) == bool<EOL>assert type(sync) == bool<EOL>if log:<EOL><INDENT>self.log = log<EOL><DEDENT>else:<EOL><INDENT>if not txaio._explicit_framework:<EOL><INDENT>txaio.use_asyncio()<EOL><DEDENT>self.log = txaio.make_logger()<EOL><DEDENT>if dbpath:<EOL><INDENT>self._is_temp = False<EOL>self._dbpath = dbpath<EOL><DEDENT>else:<EOL><INDENT>self._is_temp = True<EOL>self._tempdir = tempfile.TemporaryDirectory()<EOL>self._dbpath = self._tempdir.name<EOL><DEDENT>self._maxsize = maxsize<EOL>self._readonly = readonly<EOL>self._sync = sync<EOL>self._slots = None<EOL>self._slots_by_index = None<EOL>self._env = None<EOL>if open:<EOL><INDENT>self.__enter__()<EOL><DEDENT>
:param dbpath: LMDB database path: a directory with (at least) 2 files, a ``data.mdb`` and a ``lock.mdb``.
    If no database exists at the given path, create a new one.
:type dbpath: str

:param maxsize: Database size limit in bytes, with a default of 1MB.
:type maxsize: int

:param read_only: Open database read-only. When ``True``, deny any modifying database operations.
    Note that the LMDB lock file (``lock.mdb``) still needs to be written (by readers also),
    and hence at the filesystem level, a LMDB database directory must be writable.
:type read_only: bool

:param sync: Open database with sync on commit.
:type sync: bool