GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - JHei/DisposableEmailChecker: Python class for use with Django to detect Disposable Emails

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
disposable_email_checker
disposable_email_checker
 
 
.gitignore
.gitignore
 
 
README.rst
README.rst
 
 
disposable_email_domains.txt
disposable_email_domains.txt
 
 
setup.py
setup.py
 
 

Repository files navigation

DisposableEmailChecker

Python class for use with Django to detect Disposable Emails. Checks each email against a blacklist of ~890 domains used by various disposable email services.

Installation

It's an ordinary Python package, just install via pip:

$ pip install django-disposable-email-checker

Download the example disposable email domains list or create your own and update settings.py:

$ cd /usr/share/
$ wget https://raw.github.com/aaronbassett/DisposableEmailChecker/master/disposable_email_domains.txt

Required Setting

Add the following setting to your Django settings.py:

DISPOSABLE_EMAIL_DOMAINS = "/usr/share/disposable_email_domains.txt"

Usage

To use the checker in your own scripts:

>>> from disposable_email_checker import DisposableEmailChecker

>>> email_checker = DisposableEmailChecker()
>>> email_checker.is_disposable("[email protected]")
True

Using with Django

To use the checker during form validation, normally in forms.py:

from django import forms
from django.utils.translation import ugettext_lazy as _
from disposable_email_checker import DisposableEmailChecker


class MyForm(forms.Form):
    email = forms.EmailField(label=_('Email'))

    def clean_email(self):
        email_checker = DisposableEmailChecker()
        if email_checker.is_disposable(email):
            raise forms.ValidationError(_('Please use a different email address provider.'))

        return email

License

MIT: http://aaron.mit-license.org

About

Python class for use with Django to detect Disposable Emails

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

23 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.