Python Backend #3: Connect Flask to a Database (SQLite CRUD Tutorial)

Published: 12 May 2025
on channel: NDC
1,382
31

📦 Persist your data with SQLite!
In this video, we connect our Flask API to a real database using SQLite. You’ll learn how to create a products.db file, write SQL queries with Python, and replace your in-memory lists with persistent storage — perfect for real-world apps!
Previous Project files: https://github.com/NDCSwift/Swift-Pro...

🔧 What You’ll Learn:
✅ How to create and connect to a SQLite database
✅ How to create tables using raw SQL
✅ How to replace in-memory storage with real persistence
✅ How to use Postman to test your API

🛠 Tools Used:
Python 3
Flask
SQLite (built-in)
VS Code
DB Browser for SQLite https://sqlitebrowser.org/

Postman or curl🔥 Download My Project Files
👉 Get the source code here:
🔗 https://ndcswift.github.io/Swift-Proj...

⏱️ Timestamps:
00:00 – Intro
01:12 – SQLite
01:31 – Creating a database connection
02:51 – Defining our product table
06:33 – Rewriting the POST route
08:55 – Rewriting the GET route
10:14 – Testing everything with Postman
15:00 – Moving your Data base
16:02 – SQLite browser
16:28 – Updating database connection (After moving file)
18:05 – Recap & what’s next


On this page of the site you can watch the video online Python Backend #3: Connect Flask to a Database (SQLite CRUD Tutorial) with a duration of hours minute second in good quality, which was uploaded by the user NDC 12 May 2025, share the link with friends and acquaintances, this video has already been watched 1,382 times on youtube and it was liked by 31 viewers. Enjoy your viewing!