Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
October 24, 2022 22:05
October 16, 2022 05:56
October 24, 2022 22:05
October 16, 2022 05:56


Latest version released on PyPI ci Test coverage downloads

Getting Started

pyIsEmail is a no-nonsense approach for checking whether that user-supplied email address could be real. Sick of not being able to use email address tagging to sort through your Bacn? We can fix that.

Regular expressions are cheap to write, but often require maintenance when new top-level domains come out or don't conform to email addressing features that come back into vogue. pyIsEmail allows you to validate an email address -- and even check the domain, if you wish -- with one simple call, making your code more readable and faster to write. When you want to know why an email address doesn't validate, we even provide you with a diagnosis.


Install from PyPI using pip, a package manager for Python.

$ pip install pyIsEmail

Don't have pip installed? Try installing it by running this from the command line:

$ curl | python

Or you can download the source code (zip) for pyIsEmail and then run:

$ python install

You may need to run the above commands with sudo.


For the simplest usage, import and use the is_email function:

from pyisemail import is_email

address = ""
bool_result = is_email(address)
detailed_result = is_email(address, diagnose=True)

You can also check whether the domain used in the email is a valid domain and whether or not it has a valid MX record:

from pyisemail import is_email

address = ""
bool_result_with_dns = is_email(address, check_dns=True)
detailed_result_with_dns = is_email(address, check_dns=True, diagnose=True)

These are primary indicators of whether an email address can even be issued at that domain. However, a valid response here is not a guarantee that the email exists, merely that is can exist.

If you want to limit using a gTLD as the domain part of the email address, you can do so with a flag:

from pyisemail import is_email

address = "thiswont@workatall"
bool_result_with_check = is_email(address, allow_gtld=False)
detailed_result_with_check = is_email(address, allow_gtld=False, diagnose=True)

In addition to the base is_email functionality, you can also use the validators by themselves. Check the validator source doe to see how this works.


Want to get rid of pyIsEmail? Did you install with pip? Here you go:

$ pip uninstall pyIsEmail


The base ParserValidator is based off of Dominic Sayers' is_email script. I wanted the functionality in Python, so I ported it from the original PHP.


So you're interested in contributing to pyIsEmail? Check out our contributing guidelines for more information on how to do that.


This library aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs.


Copyright (c) 2015 Michael Herold. Open sourced under the terms of the MIT license.