Weed out disposable email providers with ease
Project description
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 by @andreis as a source of disposable email services.
Contributions
Code contributions are welcome! Just drop a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
disposable-emails-1.0.0.tar.gz
(110.4 kB
view hashes)
Built Distribution
Close
Hashes for disposable_emails-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be001e39f258768a62f630cb9e224a3c67fe368e45bac110ef6d803ef2586eb5 |
|
MD5 | 53b138db5d7a23142212f6c8fe701231 |
|
BLAKE2b-256 | 752905a9f92e9efc2e23039df5e84df3bcd69150d040ef164509c6f979d163cc |