-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
37 lines (29 loc) · 746 Bytes
/
main.py
File metadata and controls
37 lines (29 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
USER MANAGEMENT
"""
from crud.views import User
from services.action import actions
from services.color import change_color
while True:
print("\033[96m")
print(
"""
========= USER MANAGEMENT ==========
1. Show users list
2. Add user
3. Update user
4. Delete user
5. Quite
"""
)
try:
action = input("Enter an action to perform : ")
if action == '5':
print("==== PROGRAM ENDED ====")
break
if action.isdigit():
actions(action, User)
else:
change_color("Enter the action number.", "\033[91m")
except Exception as e:
print(str(e))