python-disposable 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-disposable
3
+ Version: 0.0.1
4
+ Summary: Check if an email address or domain belongs to a disposable/temporary email service. Bundles 72k+ domains from disposable/disposable-email-domains.
5
+ Project-URL: Source, https://github.com/disposable/disposable-email-domains
6
+ License: MIT
7
+ License-File: LICENSE
8
+ Keywords: disposable,email,spam,validation
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Communications :: Email
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Requires-Python: >=3.9
20
+ Provides-Extra: test
21
+ Requires-Dist: pytest>=7; extra == 'test'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # python-disposable
25
+
26
+ A Python package to check if an email address or domain belongs to a disposable/temporary email service.
27
+
28
+ Bundles **72,000+ domains** from [disposable/disposable-email-domains](https://github.com/disposable/disposable-email-domains), updated daily.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install disposable-email-check
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ from disposable_email import is_disposable, is_valid, domain_count
40
+
41
+ # Check by email address
42
+ is_disposable("user@mailinator.com") # True
43
+ is_disposable("user@gmail.com") # False
44
+
45
+ # Check by domain only
46
+ is_disposable("guerrillamail.com") # True
47
+
48
+ # Inverse check
49
+ is_valid("user@gmail.com") # True
50
+ is_valid("user@10minutemail.com") # False
51
+
52
+ # How many domains are bundled?
53
+ domain_count() # 72170
54
+ ```
55
+
56
+ ## Django example
57
+
58
+ ```python
59
+ from django import forms
60
+ from disposable_email import is_disposable
61
+
62
+ class RegisterForm(forms.Form):
63
+ email = forms.EmailField()
64
+
65
+ def clean_email(self):
66
+ email = self.cleaned_data["email"]
67
+ if is_disposable(email):
68
+ raise forms.ValidationError("Disposable email addresses are not allowed.")
69
+ return email
70
+ ```
71
+
72
+ ## Updating the domain list
73
+
74
+ The bundled `domains.txt` is sourced from [disposable/disposable-email-domains](https://github.com/disposable/disposable-email-domains) and updated with each package release.
75
+
76
+ To update manually, run:
77
+
78
+ ```bash
79
+ curl -sL https://raw.githubusercontent.com/disposable/disposable-email-domains/master/domains.txt \
80
+ -o disposable_email/domains.txt
81
+ ```
82
+
83
+ Then bump the version in `pyproject.toml` and re-publish.
@@ -0,0 +1,8 @@
1
+ disposable_email/__init__.py,sha256=DuXCxE_v6huvDitkFAj9H7LmTSl_N0n8Pu63wSPaZes,2902
2
+ disposable_email/_version.py,sha256=qf6R-J7-UyuABBo8c0HgaquJ8bejVbf07HodXgwAwgQ,704
3
+ disposable_email/domains.txt,sha256=yJfrvYQpcIkeGDRpQ_6vbiNzmsiy1iAGvoFh1YxwXqM,1100494
4
+ disposable_email/domains_strict.txt,sha256=3mvYzOMEHjPxClCXbg-2VLLh8r7KOIW1QanL5xjUvMo,378877
5
+ python_disposable-0.0.1.dist-info/METADATA,sha256=Sb-2Gl5qni2Haftnxr__kk_OcPK3DCZBOzHy6qJ0Ibc,2612
6
+ python_disposable-0.0.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
7
+ python_disposable-0.0.1.dist-info/licenses/LICENSE,sha256=kNxBn8lFmkHb4zIM4CKOI7qQRbZ2mBD66jr48Bhu16w,1157
8
+ python_disposable-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pescheck B.V.
4
+ Copyright (c) 2017 Andrei Simionescu
5
+ Copyright (c) 2017 Stefan Meinecke, greenSec GmbH
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.