-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbFunctions.py
More file actions
59 lines (51 loc) · 1.62 KB
/
Copy pathdbFunctions.py
File metadata and controls
59 lines (51 loc) · 1.62 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from pymongo import MongoClient
client = MongoClient('mongodb+srv://astonHack2024:aStonHack24@astonhack2024.6kwduwc.mongodb.net/?retryWrites=true&w=majority&appName=AstonHack2024')
db = client["data"]
myUsers = db["myUsers"]
def insertData():
dataEx = {"name": "AstonHack2024", "password": "something"}
myUsers.insert_one(dataEx)
"""
{
#Study sets
{
"name": "set1",
"data": {
{
"question":"this is question",
"answer": {
"answer1": "this is answer",
"answer2": "this is answer",
"answer3": "this is answer",
"answer4": "this is answer"
}
},
{
"question":"this is question",
"answer":"this is answer"
},
{
"question":"this is question",
"answer":"this is answer"
}
}
}
{
"name": "set1",
"data": {
{
"question":"this is question",
"answer":"this is answer"
},
{
"question":"this is question",
"answer":"this is answer"
},
{
"question":"this is question",
"answer":"this is answer"
}
}
}
}
"""