Lấy dữ liệu trong sqlite trong flask python

Cho em hỏi một chút ạ:
Em có một bảng như sau:

CREATE TABLE todo (id INTEGER PRIMARY KEY, description TEXT NOT 
 NULL, status TEXT NOT NULL)
 INSERT INTO todo (description, status) VALUES ('SS1 Assignment 1', 'Done')
 INSERT INTO todo (description, status) VALUES ('SS1 Assignment 2', 'Doing')
 INSERT INTO todo (description, status) VALUES ('SS1 Final', 'Doing') 

Làm thế nào để có thể return dữ liệu trong sqlite dưới dạng json không ạ Cụ thể là khi request.method==“POST” thì sẽ return all the items in json format. Em xin cảm ơn.

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?