#!/usr/bin/env python3 """Wrapper around `check_if_email_exists`.""" import json import pprint import subprocess import smolcgi if not smolcgi.query_string_dec: smolcgi.require_input("Provide an email address to check.") smolcgi.header(20, "text/plain") command = ["/usr/local/bin/check_if_email_exists", smolcgi.query_string_dec] output = subprocess.check_output(command).decode() pprint.pprint(json.loads(output)[0])