import sqlite3


def connect_sqlite(db_file):
    """Creates and returns a db connection and cursor."""

    connection = sqlite3.connect(db_file, timeout=30)
    cursor = connection.cursor()
    return connection, cursor