Skip to main content

python-disposable

A lightweight Python package to detect disposable/temporary email addresses. Bundles 72,000+ domains from disposable/disposable-email-domains, updated daily — no network calls at runtime.

Installation

pip install python-disposable

Usage

Basic check

from disposable_email import is_disposable, is_valid

is_disposable("user@mailinator.com")  # True
is_disposable("user@gmail.com")       # False

# Works with bare domains too
is_disposable("guerrillamail.com")    # True

# Inverse
is_valid("user@gmail.com")            # True

Strict mode

Strict mode also flags greylisted domains — services that allow anonymous signups but aren't purely disposable (e.g. some free email providers).

is_disposable("example.com", strict=True)
is_valid("example.com", strict=True)

Subdomain handling

Subdomains are automatically resolved to their parent domain.

is_disposable("mail.mailinator.com")     # True
is_disposable("a.b.guerrillamail.com")   # True

Get the full domain set

from disposable_email import get_domains

domains = get_domains()              # frozenset of 72k+ domains
domains_strict = get_domains(strict=True)  # frozenset of strict list

Domain count

from disposable_email import domain_count

domain_count()              # 72170
domain_count(strict=True)   # 26468

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

API reference

Function Description
is_disposable(email_or_domain, strict=False) Returns True if the email/domain is disposable
is_valid(email_or_domain, strict=False) Returns True if the email/domain is not disposable
get_domains(strict=False) Returns the full frozenset of known disposable domains
domain_count(strict=False) Returns the number of bundled domains

Data source

Domain lists are sourced from disposable/disposable-email-domains and bundled at release time. The upstream list is updated daily via automated scraping of 40+ sources.

This package checks for upstream updates every 4 hours and automatically publishes a new version to PyPI when changes are detected.

License

MIT — see LICENSE.

Release files for python-disposable 0.0.106

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-disposable 0.0.106
File Size Uploaded
python_disposable-0.0.106.tar.gz 852.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-disposable 0.0.106
File Interpreter ABI Platform
python_disposable-0.0.106-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / python_disposable-0.0.106.tar.gz

Download URL python_disposable-0.0.106.tar.gz
Size 852.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eaa277b2d07b53330f9a9855ebf032ac4d60b687cc2107065645fe074c7c2bd7
BLAKE2b-256 checksum
How to use checksums
2e211b1302490378bda8b686c90941bb58035401eef3c4b1f519c7d6e7a0a87c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log

Release files / python_disposable-0.0.106-py3-none-any.whl

Download URL python_disposable-0.0.106-py3-none-any.whl
Size 843.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eaaa3c94ed165aa07d88be6080388512a73ea480da6bc0ce0fc38bb40aaa919a
BLAKE2b-256 checksum
How to use checksums
6db8645af209401dd20d759b56f59586aa11f5c11b01e6a0b615a455529ddb69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.106 This release

2 release files

0.0.11

2 release files

0.0.4

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page