Skip to main content
Help us improve Python packaging – donate today!

Django package to detect ~890 domains used by disposable email services

Project Description


[![PyPI version](](
[![PyPI version](](
[![Requirements Status](](

Django package to detect ~890 & ~8,600 domains used by disposable email services.
You can validate any email against our internal list of ~890 domains used by
disposable email services. Optionally you can also check each domain against
the []( API. Check out
their free tier for 200 API calls a month.


Install the disposable email checker from PyPI

pip install django-disposable-email-checker

The disposable email checker comes with a list of ~890 emails. If you would like
to provide your own email list create a function which returns a list of domains
to block.

from disposable_email_checker.emails import email_domain_loader

def custom_email_domain_loader():
# Anyone still using AOL will be too much of a customer service burden
return [
] + email_domain_loader()

Then add the complete path including function name to your settings

DEC_LOADER = "my.package.custom_email_domain_loader"

If you would like to use the [BDE](
integration add your API key to your Django settings

BDEA_APIKEY = "abcnotarealkey123"

optionally you can configure the BDE API timeout in seconds (default 5)


Adding to your models

Once you have completed setup add the `DisposableEmailField` to your models.

from disposable_email_checker.fields import DisposableEmailField

class MyModel(models.Model):
email = DisposableEmailField()

The `DisposableEmailField` has a few optional arguments

* **whitelist** - A list of emails which will always be allowed. Defaults
to `[]`
* **message** - The error message used by ValidationError if validation
fails. Defaults to `_('Blocked email provider.')`
* **code** - The error code used by ValidationError if validation fails.
Defaults to "invalid".

Using the validator

If you want to use the validator by itself

from django.core.exceptions import ValidationError
from disposable_email_checker.validators import validate_disposable_email

except ValidationError:

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_disposable_email_checker-1.2.1-py2.py3-none-any.whl (14.3 kB) Copy SHA256 hash SHA256 Wheel 2.7 Nov 4, 2015
django-disposable-email-checker-1.2.1.tar.gz (13.9 kB) Copy SHA256 hash SHA256 Source None Nov 4, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page