<jupyter_start><jupyter_text>https://docs.alloy.us/api/section/Sandbox<jupyter_code>import json
import os
import requests

cred_fn = os.path.expanduser("~/.credentials/alloy-sandbox-landslide.json")
credentials = json.load(open(cred_fn))
auth=(credentials["key"], credentials["secret"])
params = {
    "first_name": "George",
    "last_name": "Washington",
    "address": "3200 Mount Vernon",
    "city": "Mount Vernon",
    "state": "VA",
    "zip": 22121,
    "birth_date": "1732-02-22"
}
params = {
    "first_name": "Reece",
    "last_name": "Hart",
    "address": "1 Sussex St.",
    "city": "San Francisco",
    "state": "CA",
    "zip": 94131,
    "birth_date": "1968-11-22"
}
# verify
res = requests.get("https://api.alloy.us/v1/verify", auth=auth, params=params)
res.raise_for_status()
res.json()
# vbm verify
res = requests.get("https://api.alloy.us/v2/vbm/verify", auth=auth, params=params)
res.raise_for_status()
res.json()
# meta data
res = requests.get("https://api.alloy.us/v1/voter-metadata", auth=auth)
res.raise_for_status()
res.json()
# get voters
res = requests.get("https://api.alloy.us/v1/voters", auth=auth)
res.raise_for_status()
res.json()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19514237855946398, 'fraction_numerical': 0.02931323283082077, 'mean_word_length': 4.717703349282297, 'pattern_counts': {'":': 14, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '81308', 'license': 'Apache-2.0', 'n_tokens_mistral': 485, 'n_tokens_neox': 454, 'n_words': 77, 'path': 'misc/Alloy.ipynb', 'repo_name': 'reece/voter-reg-check', 'size': '1194'}