This commit is contained in:
parent
a4af6b4e31
commit
2c59052ed6
1
json_reader.py
Normal file
1
json_reader.py
Normal file
|
@ -0,0 +1 @@
|
|||
# TODO: einlsen der berreits vorhanden Daten im JSON File
|
25
main.py
25
main.py
|
@ -4,15 +4,34 @@
|
|||
|
||||
import config
|
||||
import database_connection
|
||||
import database
|
||||
|
||||
cursor = database_connection.db_connection(config.user, config.password, config.host)
|
||||
|
||||
|
||||
def menue():
|
||||
def menu():
|
||||
enable_menu = True
|
||||
selection = {1: 'Datenbank erstellen', 2: 'Datenbank löschen', 3: 'Datenbank umbenennen', 4: 'Datenbank auselsen',
|
||||
5: 'Tabelle erstellen'}
|
||||
# TODO Menü erstellen
|
||||
return
|
||||
|
||||
print('Was möchtest du tun?')
|
||||
while enable_menu:
|
||||
for key, value in selection.items():
|
||||
print(key, value)
|
||||
selection_number = int(input('Bitte Auswahl treffen'))
|
||||
|
||||
match selection_number:
|
||||
case 1:
|
||||
print('Datenbank erstellen') # Platzhalter für die Funktion
|
||||
database.create_database(cursor)
|
||||
case 2:
|
||||
print('Datenbank löschen') # Platzhalter für die Funktion
|
||||
break
|
||||
|
||||
|
||||
def main():
|
||||
database_connection.db_connection(config.user, config.password, config.host)
|
||||
menu()
|
||||
|
||||
|
||||
main()
|
63
questions_answer.json
Normal file
63
questions_answer.json
Normal file
|
@ -0,0 +1,63 @@
|
|||
[
|
||||
{
|
||||
"#1": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#2": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#3": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#4": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#5": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#6": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#7": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#8": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#9": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"#10": {
|
||||
"question": " ",
|
||||
"answer": " "
|
||||
}
|
||||
}
|
||||
|
||||
]
|
Loading…
Reference in New Issue
Block a user