π Flask SQLite CRUD API
This is a simple Flask + SQLite API project that demonstrates how to perform basic CRUD (Create, Read, Update, Delete) operations. The project is designed to be tested using Postman (no frontend/webpage).
π Features
Create an item (Name, Email)
Read all items
Update an item by ID
Delete an item by ID
SQLite database (my_database.db) for persistence
ποΈ Project Structure
βββ app.py # Main Flask app (routes)
βββ databaseconnection.py # Database connection helper
βββ models.py # Database operations (CRUD logic)
βββ my_database.db # SQLite database (auto-created)
βββ README.md # Project documentation
βοΈ Installation & Setup
- Clone this repository
git clone <repo_url>
cd flask-crud-api
- Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
- Run the server
python app.py
π οΈ Testing with Postman
Test endpoints:
POST /items β Add data
GET /items β View all data
PUT /items/ β Update data
DELETE /items/ β Delete data