Created new script to mass delete people. Added some notes.

This commit is contained in:
Norm Rasmussen
2024-05-01 17:28:57 -04:00
parent 8a00d21ff6
commit 1ed572ac88
8 changed files with 78 additions and 43 deletions

View File

@ -4,7 +4,7 @@ from pathlib import Path
import Apikeys
import os
basefile = "/Users/normrasmussen/Downloads/mizuno-mla.csv"
basefile = "/Users/normrasmussen/Downloads/mizuno-april-completions.csv"
api_key = Apikeys.MIZUNO
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[0]
row_dict = {"row_num": row_num}
email = email[3]
email = email[2]
url = uuid_url + f"{email}"
response = requests.get(url, headers=headers)
if response.status_code == 200:
@ -50,7 +50,7 @@ def load_file(basefile):
completions = completions[completions["userid"] != "0"]
# completions = completions.iloc[:, 0:]
completions.to_csv(
"/Users/normrasmussen/Downloads/Mizuno-March2024-with-PGAID.csv",
"/Users/normrasmussen/Downloads/Mizuno-April2024-with-PGAID.csv",
index=False,
)