Get a connection to CouchDB

def _get_conn(profile):
    '''
    Get a connection to CouchDB
    '''
    DEFAULT_BASE_URL = _construct_uri(profile) or 'http://localhost:5984'

    server = couchdb.Server()
    if profile['database'] not in server:
        server.create(profile['database'])
    return server