Check if an email address or domain belongs to a disposable/temporary email service. Bundles 72k+ domains from disposable/disposable-email-domains.
Project description
python-disposable
A Python package to check if an email address or domain belongs to a disposable/temporary email service.
Bundles 72,000+ domains from disposable/disposable-email-domains, updated daily.
Installation
pip install python-disposable
Usage
from disposable_email import is_disposable, is_valid, domain_count
# Check by email address
is_disposable("user@mailinator.com") # True
is_disposable("user@gmail.com") # False
# Check by domain only
is_disposable("guerrillamail.com") # True
# Inverse check
is_valid("user@gmail.com") # True
is_valid("user@10minutemail.com") # False
# How many domains are bundled?
domain_count() # 72170
Django example
from django import forms
from disposable_email import is_disposable
class RegisterForm(forms.Form):
email = forms.EmailField()
def clean_email(self):
email = self.cleaned_data["email"]
if is_disposable(email):
raise forms.ValidationError("Disposable email addresses are not allowed.")
return email
Updating the domain list
The bundled domains.txt is sourced from disposable/disposable-email-domains and updated with each package release.
To update manually, run:
curl -sL https://raw.githubusercontent.com/disposable/disposable-email-domains/master/domains.txt \
-o disposable_email/domains.txt
Then bump the version in pyproject.toml and re-publish.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_disposable-0.0.2.tar.gz.
File metadata
- Download URL: python_disposable-0.0.2.tar.gz
- Upload date:
- Size: 547.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b601b354e40f6831750841995ea6a7dbe82e20e0863702b2f56464094440693
|
|
| MD5 |
c90485cc7d310a0ff5403b594d5678aa
|
|
| BLAKE2b-256 |
e74046a396cfec0f1d364d7897756d0a783a3d510cdff921594ad62e1f99e9b8
|
Provenance
The following attestation bundles were made for python_disposable-0.0.2.tar.gz:
Publisher:
publish.yml on pescheckit/python-disposable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_disposable-0.0.2.tar.gz -
Subject digest:
1b601b354e40f6831750841995ea6a7dbe82e20e0863702b2f56464094440693 - Sigstore transparency entry: 1091430269
- Sigstore integration time:
-
Permalink:
pescheckit/python-disposable@fee6aab9501367cb831f1329751be0f0e649f1f1 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/pescheckit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fee6aab9501367cb831f1329751be0f0e649f1f1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_disposable-0.0.2-py3-none-any.whl.
File metadata
- Download URL: python_disposable-0.0.2-py3-none-any.whl
- Upload date:
- Size: 547.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d063ce159954ad1a44c442b8723975b466b9e5c7c560e3262f6756e4c456fe93
|
|
| MD5 |
8151336a5bdd03649839508386f2850c
|
|
| BLAKE2b-256 |
34974a244f9bcd8c8ac66c19aa8ebecbe60d4b30311cae6b63d9d9bd056261f6
|
Provenance
The following attestation bundles were made for python_disposable-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on pescheckit/python-disposable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_disposable-0.0.2-py3-none-any.whl -
Subject digest:
d063ce159954ad1a44c442b8723975b466b9e5c7c560e3262f6756e4c456fe93 - Sigstore transparency entry: 1091430276
- Sigstore integration time:
-
Permalink:
pescheckit/python-disposable@fee6aab9501367cb831f1329751be0f0e649f1f1 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/pescheckit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fee6aab9501367cb831f1329751be0f0e649f1f1 -
Trigger Event:
release
-
Statement type: