A simple Flask-based application that provides user authentication and student management functionalities using an SQLite database. It supports user registration, login, logout, and CRUD operations for student records.
- User authentication (register, login, logout)
- CRUD operations for student records
- Secure password hashing
- Session management with Flask
The application requires the following Python modules:
Flask
- For creating the web application.flask_sqlalchemy
- For database management.hashlib
andos
- For password hashing and verification.
To set up the application, follow these steps:
- Clone the repository
git clone https://github.com/niloy104/Flask-Curd-App-Backend.git cd flask-app
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Initialize the database:
python >>> from app import db >>> db.create_all() >>> exit()
- Run the application:
The server will start in debug mode and be accessible at
python app.py
http://127.0.0.1:5000/
.
POST /register
- Registers a new user.POST /login
- Authenticates a user and starts a session.GET /logout
- Ends the user's session.
GET /
(Login Required) - Retrieves all students.POST /create
- Adds a new student.PUT /edit/<id>
- Updates a student's information.DELETE /delete/<id>
- Removes a student from the database.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Give it a star to show your support!