(cursor, recipe_id)
return recipe
Use information from source database to more_like_this recipes from target database.
Use information from source database to more_like_this recipes from target database.
Use information from source database to more_like_this recipes from target database .
def get_recipe(cursor, recipe_id):
    """
    Use information from source database to more_like_this recipes from target database.
    """
    cursor.execute(f"SELECT * FROM engine_analysis WHERE id={recipe_id}")
    colnames = [col[0] for col in cursor.description]
    row = cursor.fetchone()
    recipe_dict = column_names(row=row, colnames=colnames)

    recipe = Analysis.objects.filter(uid=recipe_dict['uid']).first()

    return recipe
def get_recipe ( cursor , recipe_id ) : cursor . execute ( f"SELECT * FROM engine_analysis WHERE id={recipe_id}" ) colnames = [ col [ 0 ] for col in cursor . description ] row = cursor . fetchone ( ) recipe_dict = column_names ( row = row , colnames = colnames ) recipe = Analysis . objects . filter ( uid = recipe_dict [ 'uid' ] ) . first ( ) return recipe