pytech-django-emails 0.0.1__tar.gz

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,22 @@
1
+ .idea
2
+ .py[oc]
3
+ __pycache__/
4
+ venv/
5
+ .venv/
6
+
7
+ # configurations
8
+ *.env
9
+ !template*.env
10
+ *.ini
11
+ !template*.ini
12
+ *.toml
13
+ !pyproject.toml
14
+ !interrogate.toml
15
+ !ruff.toml
16
+ !template*.toml
17
+
18
+ # unittest and cobertura
19
+ !pytest.ini
20
+ .coverage
21
+ coverage.xml
22
+ report.xml
@@ -0,0 +1,14 @@
1
+ Copyright (C) 2026 PyTech srl
2
+
3
+ This program is free software: you can redistribute it and/or modify
4
+ it under the terms of the GNU Affero General Public License as
5
+ published by the Free Software Foundation, either version 3 of the
6
+ License, or (at your option) any later version.
7
+
8
+ This program is distributed in the hope that it will be useful,
9
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ GNU Affero General Public License for more details.
12
+
13
+ You should have received a copy of the GNU Affero General Public License
14
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.4
2
+ Name: pytech-django-emails
3
+ Version: 0.0.1
4
+ Summary: PyTech Django Emails Project
5
+ Project-URL: Homepage, https://gitlab.com/pytech-srl/resources/pytech-django-emails
6
+ Project-URL: Bug Tracker, https://gitlab.com/pytech-srl/resources/pytech-django-emails/-/work_items
7
+ Project-URL: Documentation, https://pytech-srl.gitlab.io/resources/pytech-django-emails/
8
+ Author-email: Alessandro Grandi <alessandro.grandi@pytech.it>
9
+ License-File: LICENCE
10
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.8
15
+ Requires-Dist: django>=4
16
+ Description-Content-Type: text/markdown
17
+
18
+ # PyTech Django Emails
19
+
20
+ ## Description
21
+ This project aims to provide an Email model to be used in django projects.
22
+
23
+ ## Roadmap
24
+ You may find some new features coming in the [Work items section](https://gitlab.com/pytech-srl/resources/pytech-django-emails/-/work_items)
25
+
26
+ ## License
27
+
28
+ This project is licensed under the [GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.html).
29
+ See the [LICENSE](./LICENSE) file for more details.
30
+
31
+ ## Authors and acknowledgment
32
+ This package is provided thanks to:
33
+
34
+ - Alessandro Grandi (PyTech srl)
@@ -0,0 +1,17 @@
1
+ # PyTech Django Emails
2
+
3
+ ## Description
4
+ This project aims to provide an Email model to be used in django projects.
5
+
6
+ ## Roadmap
7
+ You may find some new features coming in the [Work items section](https://gitlab.com/pytech-srl/resources/pytech-django-emails/-/work_items)
8
+
9
+ ## License
10
+
11
+ This project is licensed under the [GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.html).
12
+ See the [LICENSE](./LICENSE) file for more details.
13
+
14
+ ## Authors and acknowledgment
15
+ This package is provided thanks to:
16
+
17
+ - Alessandro Grandi (PyTech srl)
File without changes
@@ -0,0 +1,7 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class EmailsConfig(AppConfig):
5
+ """Email app configuration"""
6
+
7
+ name = "emails"
@@ -0,0 +1,32 @@
1
+ from django.conf import settings
2
+ from django.core.exceptions import ValidationError
3
+ from django.core.validators import EmailValidator
4
+ from django.utils.deconstruct import deconstructible
5
+ from django.utils.translation import gettext_lazy as _
6
+
7
+ __all__ = ["CommaSeparatedEmailValidator"]
8
+
9
+
10
+ @deconstructible
11
+ class CommaSeparatedEmailValidator:
12
+ """
13
+ Custom email validator that uses a 'separator' character
14
+ to separate the various email addresses.
15
+ """
16
+
17
+ _separator = settings.EMAIL_SEPARATOR or ","
18
+
19
+ message = _("Enter a valid list of email address.")
20
+ code = "invalid"
21
+
22
+ validate_email = EmailValidator()
23
+
24
+ def __call__(self, value):
25
+ if not value:
26
+ raise ValidationError(self.message, code=self.code)
27
+
28
+ for v in value.split(self._separator):
29
+ try:
30
+ self.validate_email(v)
31
+ except ValidationError as e:
32
+ raise ValidationError(self.message, code=self.code) from e
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "pytech-django-emails"
7
+ version = "0.0.1"
8
+ authors = [
9
+ { name="Alessandro Grandi", email="alessandro.grandi@pytech.it" },
10
+ ]
11
+ description = "PyTech Django Emails Project"
12
+ readme = "README.md"
13
+ dependencies = [
14
+ "django>=4",
15
+ ]
16
+ requires-python = ">=3.8"
17
+ classifiers = [
18
+ "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
19
+ "Programming Language :: Python",
20
+ "Programming Language :: Python :: 3",
21
+ "Operating System :: OS Independent",
22
+ ]
23
+
24
+ [project.urls]
25
+ "Homepage" = "https://gitlab.com/pytech-srl/resources/pytech-django-emails"
26
+ "Bug Tracker" = "https://gitlab.com/pytech-srl/resources/pytech-django-emails/-/work_items"
27
+ "Documentation" = "https://pytech-srl.gitlab.io/resources/pytech-django-emails/"
28
+
29
+ [tool.hatch.build.targets.wheel]
30
+ packages = [
31
+ "src/emails",
32
+ ]