How to write a Python Flask REST API and use Sqlite Database as a data store in less than 100 lines

Would love your feedback on this 20min Youtube video - "**How to write a Python Flask REST API and use Sqlite Database as a data store in less than 100 lines**". The Books API will implement CRUD : Create, Retrieve, Update and Delete. The example shown in this video is a fully functional REST API.

Link to video - [https://www.youtube.com/watch?v=Sf-7zXBB\_mg](https://www.youtube.com/watch?v=Sf-7zXBB_mg)

[**#flask**](https://www.facebook.com/hashtag/flask?__eep__=6&__cft__[0]=AZUrNZMKCU7b8czlnD4aBZKCm7jSKP71qaSfOCVXUEFTqJhU-3cOiAdIwAGSzKcrGBLBfFyKo3JK5W-CT8zthY4n2it2ceoqgWsvgs-g17ERhbVpStXVmZI3Zg4AFBPoxdk5jHmTZCxs5BVTZRbMTaueX2aOtEz-PfLqHQRMVvABbw&__tn__=*NK-R) [**#sqlite**](https://www.facebook.com/hashtag/sqlite?__eep__=6&__cft__[0]=AZUrNZMKCU7b8czlnD4aBZKCm7jSKP71qaSfOCVXUEFTqJhU-3cOiAdIwAGSzKcrGBLBfFyKo3JK5W-CT8zthY4n2it2ceoqgWsvgs-g17ERhbVpStXVmZI3Zg4AFBPoxdk5jHmTZCxs5BVTZRbMTaueX2aOtEz-PfLqHQRMVvABbw&__tn__=*NK-R) [**#api**](https://www.facebook.com/hashtag/api?__eep__=6&__cft__[0]=AZUrNZMKCU7b8czlnD4aBZKCm7jSKP71qaSfOCVXUEFTqJhU-3cOiAdIwAGSzKcrGBLBfFyKo3JK5W-CT8zthY4n2it2ceoqgWsvgs-g17ERhbVpStXVmZI3Zg4AFBPoxdk5jHmTZCxs5BVTZRbMTaueX2aOtEz-PfLqHQRMVvABbw&__tn__=*NK-R) [**#python3**](https://www.facebook.com/hashtag/python3?__eep__=6&__cft__[0]=AZUrNZMKCU7b8czlnD4aBZKCm7jSKP71qaSfOCVXUEFTqJhU-3cOiAdIwAGSzKcrGBLBfFyKo3JK5W-CT8zthY4n2it2ceoqgWsvgs-g17ERhbVpStXVmZI3Zg4AFBPoxdk5jHmTZCxs5BVTZRbMTaueX2aOtEz-PfLqHQRMVvABbw&__tn__=*NK-R)

https://preview.redd.it/vp88fcsfcny41.png?width=1920&format=png&auto=webp&s=536e491530250b4c939fb7498bfc983d11fdc6c1

7 thoughts on “How to write a Python Flask REST API and use Sqlite Database as a data store in less than 100 lines”

  1. As someone who hosts an API that receives 5-10 requests/second I regret using SQLite. Seriously: think twice before picking your database or even better: pick an abstraction where you can change the implementation later

    Reply
  2. It’s good so far. It would be nice if we could get the code so we don’t have to type all the data as variables.

    Reply
  3. I followed everything. There are some parts were you just do things so fast without that I had to go back 4 or 5 times per part.

    My other issue is I am on windows and have no way to test the post , delete, push. I used powershell invoke-webrequest for the GET not sure if you know another way on windows.

    Reply

Leave a Comment