A terminal-based banking management system built with Python. Supports full customer lifecycle management — from account creation and PIN security to deposits, withdrawals, and record browsing — all backed by persistent binary file storage using Python's pickle module.
| Feature | Description |
|---|---|
| 🆕 Open Account | Create a new customer account with validated name and unique account number |
| ❌ Close Account | Permanently delete a customer's account and all associated records |
| 💰 Deposit | Credit funds to any existing account instantly |
| 💸 Withdraw | Debit funds with PIN verification and minimum balance enforcement |
| 👤 View Customer | Look up a single customer's full account details |
| 📋 View All Customers | Display a table of all registered customers |
| 🔍 Search Customer | Check if an account number exists in the system |
| 🔐 Generate PIN | Set a 6-digit security PIN for a new account |
| 🔄 Update PIN | Replace an existing PIN with a new one |
Banking-Information-System/
│
├── Main_file.py # Entry point — runs the main menu loop
├── Menu.py # Displays the main menu
├── Opening_ac.py # Account creation logic
├── Closing_ac.py # Account deletion logic
├── Balance_Update.py # Deposit and withdraw operations
├── Balance_Exception.py # Custom exceptions for balance operations
├── view_all_Customer.py # View single or all customer records
├── Search_Customer.py # Search account by account number
├── Pin.py # PIN generation and update
├── Customer.data # Binary data file (auto-created on first run)
│
└── NameValidation/ # Package for name validation
├── NameValidException.py # Custom exceptions: ZeroNameLengthError, SpaceError, InvalidNameError
└── NameValidateOperation.py # name_validate() function
- Python 3.10+ (required for
match/casesyntax) - No external libraries — uses only Python's standard library (
pickle,sys)
1. Clone the repository
git clone https://github.com/your-username/pybank-banking-system.git
cd pybank-banking-system2. Update the import path in Opening_ac.py
Open Opening_ac.py and update this line to match your local path:
sys.path.append("path/to/your/NameValidation/folder")3. Run the application
python Main_file.py
Customer.datawill be created automatically on the first account entry.
On launch, you'll see the main menu:
======================================================================
Banking Information System
======================================================================
1. Add New Customer(Opening An Account)
2. Delete Customer(Closing An Account)
3. WithDraw
4. Deposit
5. View Customer Details
6. View All Customers Details
7. Search Customer
8. Pin Generate
9. Pin Update
10. Exit
======================================================================
Enter a number (1–10) to navigate. Each operation guides you with prompts.
- Minimum balance: Every account maintains a minimum balance of ₹500. Withdrawals that would drop the balance below this threshold are blocked.
- Starting balance: All new accounts begin with ₹500.
- Unique account numbers: Duplicate account numbers are rejected at creation.
- PIN security: Withdrawals require a valid PIN. PINs must be exactly 6 digits and cannot be the same as the previous PIN on update.
- Name validation: Customer names cannot be empty, contain only spaces, or include invalid characters.
The system handles the following custom exceptions:
| Exception | Trigger |
|---|---|
ZeroNameLengthError |
Name field is empty |
SpaceError |
Name contains only whitespace |
InvalidNameError |
Name contains invalid characters |
DepositError |
Deposit amount is zero or negative |
WithdrawError |
Withdrawal amount is zero or negative |
InsufficientAmountError |
Withdrawal would breach minimum balance |
- No database: Records are stored in a binary
picklefile. Not suitable for concurrent access or large-scale use. - Plain-text PIN storage: PINs are stored unencrypted. A future version should use hashing (e.g.,
bcrypt). - Hardcoded path:
sys.path.append(...)inOpening_ac.pyrequires manual update per machine. Refactoring into a proper package resolves this. - No transaction history: Deposits and withdrawals are not logged. An audit trail would improve the system significantly.
Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.
This project is open source and available under the MIT License.