A lightweight Command Line Interface (CLI) application built with Python to manage user records using CRUD (Create, Read, Update, Delete) operations. This project features a dynamic typewriter effect with ANSI color support for enhanced user experience.
- Full CRUD Operations: View, Add, Update, and Delete users.
- Dynamic UI: Includes a "typewriter" animation effect for console output.
- Color-Coded Feedback:
- 🟢 Green: Success messages.
- 🔴 Red: Error messages and exit alerts.
- Input Validation: Ensures only numeric inputs are processed for actions.
- Error Handling: Robust
try-exceptblocks to prevent crashes during runtime.
├── main.py # Entry point of the application
├── crud/
│ └── views.py # User model and view logic
└── services/
└── action.py # Logic mapping inputs to CRUD functions
- Clone the repository:
git clone [https://github.com/yourusername/user-management-python.git](https://github.com/yourusername/user-management-python.git)
cd user-management-python
- Run the application:
python main.py
Upon launching, select an option by typing the corresponding number:
| Option | Action | Description |
|---|---|---|
| 1 | Show users list | Displays all registered users. |
| 2 | Add user | Opens a prompt to create a new user profile. |
| 3 | Update user | Modifies existing user details. |
| 4 | Delete user | Removes a user from the system. |
| 5 | Quit | Safely closes the application. |
The system uses the sys.stdout buffer to print characters one by one for a typewriter effect, combined with ANSI escape codes for coloring:
- Green (
\033[92m): Used for successful operations. - Red (
\033[91m): Used for errors and exit messages.
The program verifies that the input is a digit before processing, preventing common input errors.
if action.isdigit():
actions(action, User)
else:
print("Enter the action number.")This project is open-source and available under the MIT License.