Small Luminate templates.

This commit is contained in:
Norm Rasmussen
2024-06-20 16:40:18 -04:00
parent 06af9a492e
commit 2e82486eb8
3 changed files with 15 additions and 9 deletions

View File

@ -6,13 +6,13 @@ import pandas as pd
import Apikeys
pp = pprint.PrettyPrinter(indent=4)
APIKEY = Apikeys.SANDATA
APIKEY = Apikeys.CHUBB
HEADERS = {
"accept": "application/json",
"X-Api-Key": APIKEY,
}
BASEURL = "https://api.northpass.com/v2/"
IMPORTFILE = "/Users/normrasmussen/Downloads/sandata-employees.csv"
IMPORTFILE = "/Users/normrasmussen/Downloads/chubb.csv"
def bulk_invite_and_group():
@ -66,9 +66,9 @@ def add_props():
df = pd.DataFrame()
data = pd.read_csv(IMPORTFILE)
for dat in data.iterrows():
# agency_name = dat[1][3]
agency_name = "EMPLOYEE"
learner_email = dat[1][1]
agency_name = dat[1][3]
# agency_name = "EMPLOYEE"
learner_email = dat[1][2]
print(learner_email)
ppl_search = f"{BASEURL}people?filter[email][eq]={learner_email}"
ppl_response = requests.get(ppl_search, headers=HEADERS)
@ -82,7 +82,7 @@ def add_props():
payload = {
"data": [
{
"attributes": {"properties": {"medicaid_id": agency_name }},
"attributes": {"properties": {"agency_name": agency_name }},
"id": learner_uuid,
"type": "person_properties",
}