import sqlite3


def connect_evals(fname):
    """Opens exclusive connection to a sqlite3 database.

    Parameters
    ----------
    fname : `str`
        file name of sqlite3 database

    Returns
    -------
    connection : `sqlite3.Connection`
        Connection object to a sqlite database
    """
    conn = sqlite3.connect(fname, isolation_level = 'EXCLUSIVE')
    conn.execute('BEGIN EXCLUSIVE')

    return conn