Small CS Ops script to understand how many hours we have been spending on implementation.
This commit is contained in:
@ -4,7 +4,7 @@ from pathlib import Path
|
||||
import Apikeys
|
||||
import os
|
||||
|
||||
basefile = "/Users/normrasmussen/Downloads/TS1099-coursecompletions.csv"
|
||||
basefile = "/Users/normrasmussen/Downloads/ts-mca.csv"
|
||||
api_key = Apikeys.TALKSPACE_1099
|
||||
uuid_url = "https://api.northpass.com/v2/people?filter[email][eq]="
|
||||
prop_url = "https://api.northpass.com/v2/properties/people/"
|
||||
@ -26,7 +26,7 @@ def load_file(basefile):
|
||||
for email in completions.itertuples():
|
||||
row_num = email[1]
|
||||
row_dict = {"row_num": row_num}
|
||||
email = email[4]
|
||||
email = email[3]
|
||||
url = uuid_url + f"{email}"
|
||||
response = requests.get(url, headers=headers)
|
||||
if response.status_code == 200:
|
||||
@ -45,6 +45,7 @@ def load_file(basefile):
|
||||
for info in dict_list:
|
||||
row = info["row_num"]
|
||||
pid = info["userid"]
|
||||
print(f"PID IS {pid}")
|
||||
completions.loc[completions.index[row], "userid"] = pid
|
||||
completions = completions[completions["userid"] != "0"]
|
||||
# completions = completions.iloc[:, 0:]
|
||||
|
||||
4
Scripts/API_Tests/pytest.py
Normal file
4
Scripts/API_Tests/pytest.py
Normal file
@ -0,0 +1,4 @@
|
||||
string = "["33410b8a-246b-4253-9fc0-829d67fb1834", "70b43bcf-3261-49d3-8940-0c14f6445888", "5cfc2cb6-7de1-4b33-b945-65fe72a9ddd9", "3d3de462-e29c-4a89-ae60-3a70ec1643a9","1188e41f-b4ac-4b04-9fe5-1bc87883f58b", "9de55b7b-cb41-408e-a6f5-e28d34e4815c", "09354d84-743b-44ea-a4a5-c24697170036", "8c71009d-3210-4897-92f0-cb44b6025343","6b58f46b-1191-4436-aced-67e8d7515e74", "4ea5234d-70a2-46ed-a9aa-f4bc4dfc0769"]"
|
||||
|
||||
response = string.replace('"', "'")
|
||||
print(response)
|
||||
Reference in New Issue
Block a user