A simple Flask REST API project demonstrating CRUD operations and database management with SQLite, SQLAlchemy ORM, and Marshmallow serialization. Python Flask CRUD App | Build Full Stack Web App with SQLite https://youtu.be/6A-Et2R4lvM Flask REST API Tutorial | Step-by-Step for Beginners https://youtube.com/live/vna41vlEmqg?feature=share
- 
Flask backend API with SQLite database 
- 
SQLAlchemy ORM models for UserandStudent
- 
Database management CLI commands: - flask db_create- create database tables
- flask db_drop- drop all tables
- flask db_seed- seed database with sample data
 
- 
API endpoints with URL parameters and query parameters 
- 
JSON responses using Flask’s jsonify
- 
Input handling with Flask’s request
- 
Clone this repository git clone https://github.com/manibalasinha/PythonFlask.git cd PythonFlask
- 
(Optional but recommended) Create a virtual environment and activate it python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate 
- 
Install dependencies pip install -r requirements.txt 
- 
Create the database tables flask db_create 
- 
Seed the database with sample data flask db_seed 
- 
Run the Flask app flask run 
- 
Open your browser or API client and test the endpoints: - GET /- Welcome message
- GET /shorts- Simple JSON message
- GET /not_found- 404 JSON response
- GET /parameters?name=John&age=20- Parameterized response
- GET /url_variables/John/20- URL path variables response
- GET /students- Get all students in the database
 
PythonFlask/
├── app.py               # Main Flask application
├── requirements.txt     # Python dependencies
├── students.db          # SQLite database file (generated)
└── README.md            # This file
- Flask
- Flask-SQLAlchemy
- SQLAlchemy
- Marshmallow
- Flask-Marshmallow
- Database URI is set to a local SQLite file at C:\Users\manib\FlaskPython\students.db. Adjust path inapp.pyif needed.
- Use Flask CLI commands to manage your database easily.
This project is licensed under the MIT License.