import sqlite3


def get_connection(blog_id):
    """Connects to a local sqlite database

    Parameters:
    ~~~~~~~~~~~
    blog_id : id
        The id of the blog whose database to connect to.

    Returns:
    ~~~~~~~~
    conn : sqlite3.Connection
        A sqlite3 Connection object, connected to a local database.
    """
    blog_id = str(blog_id)
    conn = sqlite3.connect(''.join((blog_id, '.db')))

    return conn