A Command-Line Registration System that stores user data in MongoDB Atlas.
Users can register with username, email, and password or list all registered users.
- 📝 Register new users with name, username, email, and password.
- 🔐 Passwords are hidden during entry (
getpass). - 🛑 Prevents duplicate usernames or emails.
- 📜 List all registered users (without passwords).
- 🌐 Uses MongoDB Atlas cloud database as backend.
-
Clone the repository
git clone <your-repo-url> cd Project_17_Registration_Form_CLI
-
Install dependencies
pip install -r requirements.txt
-
Setup MongoDB URI in
.envfileMONGO_URI=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/
-
Run the program
python registration_cli.py --reg -n "Arjun" -u "arjun01" -e "arjun@example.com"
python registration_cli.py --reg -n "Riya" -u "riya88" -e "riya@example.com"
Password: ******
✅ Registration successful!python registration_cli.py --list
{'name': 'Riya', 'username': 'riya88', 'email': 'riya@example.com'}
{'name': 'Arjun', 'username': 'arjun01', 'email': 'arjun@example.com'}- How to build a CLI tool with
argparse. - How to use PyMongo for database operations.
- How to securely store API credentials using
.env. - How to safely hide passwords in CLI.
pymongo
python-dotenv
- Add password hashing (e.g., bcrypt) instead of storing plain text.
- Add login authentication with username + password.
- Add update/delete user functionality.
- Create a GUI version with Tkinter or Flask.