Registry / data / free-email-domains

free-email-domains

JSON →
library1.0.2pypypi✓ verified 28d ago

The `free-email-domains` package provides a comprehensive, curated list of free email domains from around the world, designed to simplify checking if an email address belongs to a free email provider. The current version, 1.0.2, was released on February 23, 2026, and is actively maintained with updates based on data from sources like HubSpot.

pip install free-email-domains
INSTALL
IMPORT
SIG · FREE-EMAIL-DOMAINS
F
free-email-domains
datapythonv1.0.2
Install
1.5s avg
Import
—
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

whitelist
✓ from free_email_domains import whitelist
The primary data structure is 'whitelist', a set of free email domains.

Import the `whitelist` set and check if a given email's domain exists within it.

from free_email_domains import whitelist def check_email_domain(email_address): try: domain = email_address.split('@')[1] if domain in whitelist: print(f"'{domain}' is a free email domain.") else: print(f"'{domain}' is NOT a free email domain.") except IndexError: print(f"Invalid email address format: {email_address}") check_email_domain("user@gmail.com") check_email_domain("info@example.com") check_email_domain("invalid-email")
Debug
Known issues
gotchaThis library only provides a list of common free email domains. It does NOT perform email address validation (e.g., checking for valid format, existence of domain, or deliverability) nor does it detect disposable/temporary email addresses, which are a different category of service.
fix
Combine with a dedicated email validation library for robust checks, and consider a separate disposable email domain list if that functionality is required.
affects: All versions
gotchaThe `whitelist` is a curated list, primarily leveraging data from HubSpot. While comprehensive, it may not include every single free email provider globally, and new providers may emerge faster than the list is updated.
fix
Review the source list if absolute comprehensiveness is critical. Contributions to update the list are welcomed by the maintainers.
affects: All versions
gotchaFor applications with high security requirements (e.g., user account systems), simply identifying a domain as 'not free' is insufficient for security. Domains can expire and be re-registered by malicious actors ('domain resurrection attacks'), potentially leading to account takeovers, as highlighted by PyPI's own security measures.
fix
Implement multi-factor authentication (MFA) and consider additional security measures like verifying email deliverability or restricting registration from certain domains, regardless of their 'free' status.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'free_email_domains'
The 'free_email_domains' package is not installed in the Python environment.
fix
Install the package using pip: 'pip install free-email-domains'.
ImportError: cannot import name 'whitelist' from 'free_email_domains'
The 'whitelist' attribute does not exist in the 'free_email_domains' package.
fix
Use the correct import statement: 'from free_email_domains import free_email_domains'.
TypeError: 'module' object is not iterable
Attempting to iterate over the 'free_email_domains' module instead of its contents.
fix
Access the list of domains correctly: 'from free_email_domains import free_email_domains; domains = free_email_domains.free_email_domains'.
AttributeError: module 'free_email_domains' has no attribute 'is_free'
The 'free_email_domains' package does not have an 'is_free' function.
fix
Manually check if a domain is in the list: 'if domain in free_email_domains.free_email_domains:'.
SyntaxError: invalid syntax
Using incorrect syntax when importing or accessing the 'free_email_domains' package.
fix
Ensure correct syntax: 'from free_email_domains import free_email_domains'.
Upgrade
Version history
1.0.2latest on PyPI · released Feb 23, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
free-email-domains — pip install free-email-domains · libregistry