-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·71 lines (34 loc) · 1.16 KB
/
main.py
File metadata and controls
executable file
·71 lines (34 loc) · 1.16 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
60
61
62
63
64
65
66
67
68
69
70
71
import csv
import jpype
import openpyxl
from openpyxl import Workbook, load_workbook
import json
import os
import math
wb = load_workbook('VAccounts.xlsx')
user_id = "uuid"
role_id = "r_id"
user_name = "uid"
email_address = "email"
role_guid = "ruid"
user_type = "utype"
login_status = "log_status"
team_guid = "t_guid"
teamId = "tid"
login_enabled = "log_enable"
saml_user = "saml"
user_legacy_id = "ulegid"
s = open("users.json", "r")
x = open("AccountInfo.csv", "w")
user_res = s.read()
t = json.loads(user_res)
uid = []
for i in t['_embedded']['users']:
uid.append(i['user_id'])
print(uid)
s.close()
######################3
with open("name.csv", "w", new_line='') as file:
wr = csv.writer(file, delimiter=",")
wr.writeRow('Account', 'Login Name', 'User Name', 'Email Address', 'Custom ID', 'Title', 'Login Enabled', 'Created', 'Is Active', 'Is SAML User', 'Is Platform User', 'Has Elearning Role', 'Is Track Assigned', 'Lifetime Courses Accessed', 'Elearning Manager', 'Elearning Manager Email', 'Track', 'Last Login', 'Custom 1', 'Custom 2', 'Custom 3', 'Custom 4', 'Custom 5', 'Roles', 'Curriculum', 'Teams')
#wr.close()