I am developing web framework using python. below is my database. this database name is fruit.
name price
----- -----
apple $2
pear $2
grape $4
I am using SQLAlchemy. so class name is Fruit. What should I write to make result below list ..? I want to get values from 'name' column.
['apple', 'pear', 'grape']
and is there any way to execute SQL query directly ..?
sql_query = 'SELECT name FROM Fruit'
Fruit.query.execute(<sql_query>)