Skip to main content

pyIsEmail

Latest version released on PyPI travis 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

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

$ pip install pyIsEmail

Don’t have pip installed? Try installingit by running this from the command line:

$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python

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

$ python setup.py install

You may need to run the above commands with sudo.

Usage

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

from pyisemail import is_email

address = "test@example.com"
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 = "test@example.com"
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.

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.

Uninstall

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

$ pip uninstall pyIsEmail

Acknowledgements

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.

Contributing

  1. Fork it

  2. Create your feature branch (git checkout -b my-new-feature)

  3. Commit your changes (git commit -am 'Add some feature')

  4. Push to the branch (git push origin my-new-feature)

  5. Create a new Pull Request

Versioning

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

Metadata

Release files for pyIsEmail 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyIsEmail 1.3.0
File Size Uploaded Provenance Actions
pyIsEmail-1.3.0.tar.gz 19.1 kB Without provenance Details for pyIsEmail-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyIsEmail 1.3.0
File Interpreter ABI Platform Actions
pyIsEmail-1.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for pyIsEmail-1.3.0-py2.py3-none-any.whl

Total release size: 45.4 kB

Release files / pyIsEmail-1.3.0.tar.gz

Download URL pyIsEmail-1.3.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5365cc7b5dca7de06f75fc5d7622318c53af28a97d8acb99319d757f4ef4019b
BLAKE2b-256 checksum
How to use checksums
b19a834012ac626e8748688c911364efe72f2767de464018e8045645d4452a43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyIsEmail-1.3.0-py2.py3-none-any.whl

Download URL pyIsEmail-1.3.0-py2.py3-none-any.whl
Size 26.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e5a749fe735fb81fe21c4a0385d1591ac51b7d4698928253e0482bc890f43f44
BLAKE2b-256 checksum
How to use checksums
ee4b403c66fefd74edb62806adfdd970d8d7cb7b35aafe83fe1fc664ab72e7e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyIsEmail 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files No provenance

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page