A simple banking backend project built using Python, Flask, MySQL, and raw SQL queries.
This project provides REST APIs for basic banking operations such as:
- Account Creation
- Deposit Money
- Withdraw Money
- Transfer Funds
- Check Balance
- Python
- Flask
- MySQL
- MySQL Connector
- REST API
- Raw SQL Queries
FinTech/
│
├── app.py
├── routes.py
├── bank.py
├── db.py
├── accounts.py
├── requirements.txt
├── README.md
└── test_bank.py
Creates a new bank account.
Deposits money into an account.
Withdraws money from an account with balance validation.
Transfers money between two accounts.
Returns account details and current balance.
CREATE TABLE accounts(
acc_id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
balance FLOAT DEFAULT 0
);CREATE TABLE transactions(
trans_id INT PRIMARY KEY AUTO_INCREMENT,
trans_acc_id INT,
related_acc_id INT NULL,
type VARCHAR(20),
amount FLOAT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);git clone https://github.com/your-username/Fintech.gitcd Fintechpip install -r requirements.txtUpdate db.py with your MySQL credentials.
conn = mysql.connector.connect(
host='localhost',
user='root',
password='your_password',
database='Fintech'
)python app.pyServer runs on:
http://127.0.0.1:5000
POST /account/create{
"name": "Srushti"
}POST /account/deposit{
"acc_id": 1,
"amount": 5000
}POST /account/withdraw{
"acc_id": 1,
"amount": 1000
}POST /account/transfer{
"sender": 1,
"reciever": 2,
"amount": 500
}GET /account/check_balance/1- User Authentication
- Transaction History
- Unit Testing
- Docker Support
- SQLAlchemy Integration
- JWT Authentication
- Account Deletion
- Better Error Handling
Developed by Srushti