@@ -0,0 +1,532 @@
+__author__ = 'Casey Dunham'%0A__version__ = %220.1.0%22%0A%0A%0Aimport urllib%0Aimport urllib2%0Aimport json%0A%0A%0APWNED_API_URL = %22https://haveibeenpwned.com/api/breachedaccount/%25s%22%0A%0A%0Aclass InvalidEmail(Exception):%0A    pass%0A%0A%0Adef check(email):%0A    req = urllib.Request(PWNED_API_URL %25 urllib.quote(email))%0A    try:%0A        resp = urllib.urlopen(req)%0A        return json.loads(resp.read())%0A    except urllib2.HTTPError, e:%0A        if e.code == 400:%0A            raise InvalidEmail(%22Email address does not appear to be a valid email%22)%0A        return %5B%5D%0A%0A

Check single email against api