Is this the initial commit? I forgot

This commit is contained in:
2025-10-13 18:05:41 +01:00
parent af38770285
commit 25e0ec2c60
5 changed files with 37 additions and 7 deletions

14
data_management.py Normal file
View File

@@ -0,0 +1,14 @@
import config
import json
def get_data(data_type, key, value):
if data_type == 'users':
users_json_string = open('data/users.json', 'r').read()
json_data = json.loads(users_json_string)
for json_object in json_data:
if json_object[key] == value:
return json_object
return -1