mailgun 1.3.0rc1__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.
Files changed (67) hide show
  1. mailgun-1.3.0rc1/.editorconfig +28 -0
  2. mailgun-1.3.0rc1/.pre-commit-config.yaml +176 -0
  3. mailgun-1.3.0rc1/.pylintrc +644 -0
  4. mailgun-1.3.0rc1/CHANGELOG.md +145 -0
  5. mailgun-1.3.0rc1/LICENSE +202 -0
  6. mailgun-1.3.0rc1/Makefile +164 -0
  7. mailgun-1.3.0rc1/PKG-INFO +1319 -0
  8. mailgun-1.3.0rc1/README.md +1235 -0
  9. mailgun-1.3.0rc1/SECURITY.md +63 -0
  10. mailgun-1.3.0rc1/conda.recipe/meta.yaml +59 -0
  11. mailgun-1.3.0rc1/environment-dev.yaml +61 -0
  12. mailgun-1.3.0rc1/environment.yaml +15 -0
  13. mailgun-1.3.0rc1/mailgun/__init__.py +10 -0
  14. mailgun-1.3.0rc1/mailgun/_version.py +1 -0
  15. mailgun-1.3.0rc1/mailgun/client.py +527 -0
  16. mailgun-1.3.0rc1/mailgun/doc_tests/files/data.csv +5 -0
  17. mailgun-1.3.0rc1/mailgun/doc_tests/files/email_previews.csv +18 -0
  18. mailgun-1.3.0rc1/mailgun/doc_tests/files/email_validation.csv +5 -0
  19. mailgun-1.3.0rc1/mailgun/doc_tests/files/mailgun_bounces_test.csv +5 -0
  20. mailgun-1.3.0rc1/mailgun/doc_tests/files/mailgun_complaints.csv +4 -0
  21. mailgun-1.3.0rc1/mailgun/doc_tests/files/mailgun_unsubscribes.csv +5 -0
  22. mailgun-1.3.0rc1/mailgun/doc_tests/files/mailgun_whitelists.csv +4 -0
  23. mailgun-1.3.0rc1/mailgun/doc_tests/files/test1.txt +1 -0
  24. mailgun-1.3.0rc1/mailgun/doc_tests/files/test2.txt +1 -0
  25. mailgun-1.3.0rc1/mailgun/doc_tests/files/test_mime.mime +7 -0
  26. mailgun-1.3.0rc1/mailgun/examples/__init__.py +0 -0
  27. mailgun-1.3.0rc1/mailgun/examples/domain_examples.py +241 -0
  28. mailgun-1.3.0rc1/mailgun/examples/email_validation_examples.py +109 -0
  29. mailgun-1.3.0rc1/mailgun/examples/events_examples.py +62 -0
  30. mailgun-1.3.0rc1/mailgun/examples/inbox_placement_examples.py +88 -0
  31. mailgun-1.3.0rc1/mailgun/examples/ip_pools_examples.py +75 -0
  32. mailgun-1.3.0rc1/mailgun/examples/ips_examples.py +59 -0
  33. mailgun-1.3.0rc1/mailgun/examples/logs_examples.py +42 -0
  34. mailgun-1.3.0rc1/mailgun/examples/mailing_lists_examples.py +209 -0
  35. mailgun-1.3.0rc1/mailgun/examples/messages_examples.py +135 -0
  36. mailgun-1.3.0rc1/mailgun/examples/metrics_examples.py +86 -0
  37. mailgun-1.3.0rc1/mailgun/examples/routes_examples.py +71 -0
  38. mailgun-1.3.0rc1/mailgun/examples/suppressions_examples.py +337 -0
  39. mailgun-1.3.0rc1/mailgun/examples/tags_examples.py +88 -0
  40. mailgun-1.3.0rc1/mailgun/examples/tags_new_examples.py +71 -0
  41. mailgun-1.3.0rc1/mailgun/examples/templates_examples.py +145 -0
  42. mailgun-1.3.0rc1/mailgun/examples/webhooks_examples.py +64 -0
  43. mailgun-1.3.0rc1/mailgun/handlers/__init__.py +1 -0
  44. mailgun-1.3.0rc1/mailgun/handlers/default_handler.py +38 -0
  45. mailgun-1.3.0rc1/mailgun/handlers/domains_handler.py +99 -0
  46. mailgun-1.3.0rc1/mailgun/handlers/email_validation_handler.py +35 -0
  47. mailgun-1.3.0rc1/mailgun/handlers/error_handler.py +14 -0
  48. mailgun-1.3.0rc1/mailgun/handlers/inbox_placement_handler.py +59 -0
  49. mailgun-1.3.0rc1/mailgun/handlers/ip_pools_handler.py +43 -0
  50. mailgun-1.3.0rc1/mailgun/handlers/ips_handler.py +35 -0
  51. mailgun-1.3.0rc1/mailgun/handlers/mailinglists_handler.py +54 -0
  52. mailgun-1.3.0rc1/mailgun/handlers/messages_handler.py +33 -0
  53. mailgun-1.3.0rc1/mailgun/handlers/metrics_handler.py +37 -0
  54. mailgun-1.3.0rc1/mailgun/handlers/routes_handler.py +35 -0
  55. mailgun-1.3.0rc1/mailgun/handlers/suppressions_handler.py +110 -0
  56. mailgun-1.3.0rc1/mailgun/handlers/tags_handler.py +41 -0
  57. mailgun-1.3.0rc1/mailgun/handlers/templates_handler.py +62 -0
  58. mailgun-1.3.0rc1/mailgun.egg-info/PKG-INFO +1319 -0
  59. mailgun-1.3.0rc1/mailgun.egg-info/SOURCES.txt +65 -0
  60. mailgun-1.3.0rc1/mailgun.egg-info/dependency_links.txt +1 -0
  61. mailgun-1.3.0rc1/mailgun.egg-info/requires.txt +60 -0
  62. mailgun-1.3.0rc1/mailgun.egg-info/top_level.txt +2 -0
  63. mailgun-1.3.0rc1/py.typed +0 -0
  64. mailgun-1.3.0rc1/pyproject.toml +441 -0
  65. mailgun-1.3.0rc1/setup.cfg +4 -0
  66. mailgun-1.3.0rc1/tests/__init__.py +6 -0
  67. mailgun-1.3.0rc1/tests/tests.py +2077 -0
@@ -0,0 +1,28 @@
1
+ # http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ indent_style = space
7
+ indent_size = 4
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+ charset = utf-8
11
+ end_of_line = lf
12
+
13
+ [*.md]
14
+ trim_trailing_whitespace = false
15
+
16
+ [*.bat]
17
+ indent_style = tab
18
+ end_of_line = crlf
19
+
20
+ [LICENSE]
21
+ insert_final_newline = false
22
+
23
+ [Makefile]
24
+ indent_style = tab
25
+ trim_trailing_whitespace = false
26
+
27
+ [*.{yaml,yml}]
28
+ indent_size = 2
@@ -0,0 +1,176 @@
1
+ ---
2
+ # Apply to all files without committing:
3
+ # pre-commit run --all-files
4
+ # Update this file:
5
+ # pre-commit autoupdate
6
+ default_language_version:
7
+ python: python3
8
+ exclude: ^(.*/versioneer\.py|.*/_version\.py|.*/.*\.svg)
9
+
10
+ ci:
11
+ autofix_commit_msg: |
12
+ [pre-commit.ci] auto fixes from pre-commit.com hooks
13
+
14
+ for more information, see https://pre-commit.ci
15
+ autofix_prs: true
16
+ autoupdate_branch: ''
17
+ autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
18
+ autoupdate_schedule: weekly
19
+ skip: []
20
+ submodules: false
21
+
22
+ repos:
23
+ - repo: https://github.com/pre-commit/pre-commit-hooks
24
+ rev: v6.0.0
25
+ hooks:
26
+ - id: check-ast
27
+ - id: check-builtin-literals
28
+ - id: fix-byte-order-marker
29
+ - id: check-case-conflict
30
+ - id: check-docstring-first
31
+ - id: check-vcs-permalinks
32
+ # Fail if staged files are above a certain size.
33
+ # To add a large file, use 'git lfs track <file>; git add <file> to track large files with
34
+ # git-lfs rather than committing them directly to the git history
35
+ - id: check-added-large-files
36
+ args: [ "--maxkb=500" ]
37
+ # Fails if there are any ">>>>>" lines in files due to merge conflicts.
38
+ - id: check-merge-conflict
39
+ # ensure syntaxes are valid
40
+ - id: check-toml
41
+ - id: debug-statements
42
+ # Makes sure files end in a newline and only a newline;
43
+ - id: end-of-file-fixer
44
+ - id: mixed-line-ending
45
+ # Trims trailing whitespace. Allow a single space on the end of .md lines for hard line breaks.
46
+ - id: trailing-whitespace
47
+ args: [ --markdown-linebreak-ext=md ]
48
+ # Sort requirements in requirements.txt files.
49
+ - id: requirements-txt-fixer
50
+ # Prevent committing directly to trunk
51
+ - id: no-commit-to-branch
52
+ args: [ "--branch=master" ]
53
+ # Detects the presence of private keys
54
+ - id: detect-private-key
55
+
56
+ - repo: https://github.com/jorisroovers/gitlint
57
+ rev: v0.19.1
58
+ hooks:
59
+ - id: gitlint
60
+
61
+ - repo: https://github.com/Yelp/detect-secrets
62
+ rev: v1.5.0
63
+ hooks:
64
+ - id: detect-secrets # Detect accidentally committed secrets
65
+
66
+ - repo: https://github.com/codespell-project/codespell
67
+ rev: v2.4.1
68
+ hooks:
69
+ - id: codespell
70
+ args: [--write]
71
+ exclude: ^tests
72
+
73
+ - repo: https://github.com/python-jsonschema/check-jsonschema
74
+ rev: 0.34.1
75
+ hooks:
76
+ - id: check-github-workflows
77
+ files: ^\.github/workflows/.*\.ya?ml$
78
+
79
+ - repo: https://github.com/akaihola/darker
80
+ rev: v3.0.0
81
+ hooks:
82
+ - id: darker
83
+ additional_dependencies: [black]
84
+
85
+ - repo: https://github.com/PyCQA/autoflake
86
+ rev: v2.3.1
87
+ hooks:
88
+ - id: autoflake
89
+ args:
90
+ - --in-place
91
+ - --remove-all-unused-imports
92
+ - --remove-unused-variable
93
+ - --ignore-init-module-imports
94
+
95
+ - repo: https://github.com/pycqa/flake8
96
+ rev: 7.3.0
97
+ hooks:
98
+ - id: flake8
99
+ additional_dependencies:
100
+ - radon
101
+ - flake8-docstrings
102
+ - Flake8-pyproject
103
+ # TODO: Remove tests when we will be ready to process tests
104
+ exclude: ^tests
105
+
106
+ - repo: https://github.com/PyCQA/pylint
107
+ rev: v4.0.2
108
+ hooks:
109
+ - id: pylint
110
+ args:
111
+ - --exit-zero
112
+
113
+ - repo: https://github.com/asottile/pyupgrade
114
+ rev: v3.21.0
115
+ hooks:
116
+ - id: pyupgrade
117
+ args: [--py310-plus, --keep-runtime-typing]
118
+
119
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
120
+ # Ruff version.
121
+ rev: v0.14.2
122
+ hooks:
123
+ # Run the linter.
124
+ - id: ruff
125
+ args: [--fix, --preview, --exit-non-zero-on-fix]
126
+ # Run the formatter.
127
+ - id: ruff-format
128
+
129
+ - repo: https://github.com/pycqa/pydocstyle
130
+ rev: 6.3.0
131
+ hooks:
132
+ - id: pydocstyle
133
+ args: [--select=D200,D213,D400,D415]
134
+ additional_dependencies: [tomli]
135
+
136
+ - repo: https://github.com/dosisod/refurb
137
+ rev: v2.2.0
138
+ hooks:
139
+ - id: refurb
140
+
141
+ - repo: https://github.com/pre-commit/mirrors-mypy
142
+ rev: v1.18.2
143
+ hooks:
144
+ - id: mypy
145
+ args: [--config-file=./pyproject.toml]
146
+ additional_dependencies:
147
+ - types-requests
148
+ exclude: ^mailgun/examples/
149
+
150
+ - repo: https://github.com/RobertCraigie/pyright-python
151
+ rev: v1.1.407
152
+ hooks:
153
+ - id: pyright
154
+
155
+ - repo: https://github.com/PyCQA/bandit
156
+ rev: 1.8.6
157
+ hooks:
158
+ - id: bandit
159
+ args: ["-c", "pyproject.toml", "-r", "."]
160
+ # ignore all tests, not just tests data
161
+ exclude: ^tests/
162
+ additional_dependencies: [".[toml]"]
163
+
164
+ - repo: https://github.com/crate-ci/typos
165
+ rev: v1.38.1
166
+ hooks:
167
+ - id: typos
168
+
169
+ - repo: https://github.com/executablebooks/mdformat
170
+ rev: 1.0.0
171
+ hooks:
172
+ - id: mdformat
173
+ additional_dependencies:
174
+ # gfm = GitHub Flavored Markdown
175
+ - mdformat-gfm
176
+ - mdformat-black