This project is a User Management System developed using Flask (Python), focusing on CRUD (Create, Read, Update, Delete) operations. It allows users to add, delete, modify, and retrieve user credentials like Name, Age, and City.
- Project Name: User Management System
- Developer: SRIVIKAS M
- Internship: First Internship as a Python Developer
- Database: MySQL (MySQL Workbench)
- Add User: Add new user credentials.
- Delete User: Remove existing user credentials.
- Update User: Modify existing user credentials.
- Retrieve User: View user credentials.
- Flask: Python web framework.
- MySQL Workbench: Database management.
- Python 3.x (I used 3.9.6)
- Flask
- MySQL
-
Clone the repository:
git clone https://github.com/Srivi24/User-Management-System.git cd user-management-system -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Set up the database:
- Open MySQL Workbench and execute the following commands:
SHOW DATABASES; CREATE DATABASE crud; USE crud; CREATE TABLE users ( ID INTEGER AUTO_INCREMENT PRIMARY KEY, NAME VARCHAR(25), AGE INTEGER CHECK (AGE > 12), CITY VARCHAR(50) ); SHOW TABLES; DESC users; SELECT * FROM users;
-
Run the application:
flask run
Below are the MySQL commands used to create and manage the database:
SHOW DATABASES;
CREATE DATABASE crud;
USE crud;
CREATE TABLE users (
ID INTEGER AUTO_INCREMENT PRIMARY KEY,
NAME VARCHAR(25),
AGE INTEGER CHECK (AGE > 12),
CITY VARCHAR(50)
);
SHOW TABLES;
DESC users;
SELECT * FROM users;