https://github.com/maxmalysh/disposable-emails
Weed out disposable email providers with ease 🚀
https://github.com/maxmalysh/disposable-emails
disposable disposable-email django django-forms email flask
Last synced: 5 months ago
JSON representation
Weed out disposable email providers with ease 🚀
- Host: GitHub
- URL: https://github.com/maxmalysh/disposable-emails
- Owner: maxmalysh
- License: mit
- Created: 2017-05-04T20:15:30.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-08-08T03:43:08.000Z (almost 4 years ago)
- Last Synced: 2025-11-27T17:48:48.993Z (7 months ago)
- Topics: disposable, disposable-email, django, django-forms, email, flask
- Language: Python
- Size: 896 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# disposable-emails
Weed out disposable email providers with ease 🚀
## Installation
You can install this package using PyPI:
pip3 install disposable-emails
There are no dependencies. You don't need Django, Flask or any third-party API.
## How to use
Check an email:
>>> from disposable_emails import is_disposable_email
>>> is_disposable_email('john.smith@mailforspam.com')
True
>>> is_disposable_email('john.smith@gmail.com')
False
Check a domain:
>>> from disposable_emails import is_disposable_domain
>>> is_disposable_domain('temp-mail.com')
True
>>> is_disposable_domain('kremlin.ru')
False
**Using Django?** There is a form validator which you can use with forms:
from django import forms
from disposable_emails.contrib.django import disposable_validator
class FooForm(forms.Form):
email = forms.EmailField(
label="Email",
max_length=254,
validators=[disposable_validator]
)
And with models:
from django import models
from disposable_emails.contrib.django import disposable_validator
class FooModel(models.Model):
email = models.EmailField(validators=[disposable_validator])
## Credits
This package uses **[disposable](https://github.com/andreis/disposable-email-domains/)** by @andreis as a source of disposable email services.
## Contributions
Code contributions are welcome! Just drop a pull request.