open-api-framework 0.13.4__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 (37) hide show
  1. open_api_framework-0.13.4/CHANGELOG.rst +402 -0
  2. open_api_framework-0.13.4/LICENSE +7 -0
  3. open_api_framework-0.13.4/MANIFEST.in +10 -0
  4. open_api_framework-0.13.4/PKG-INFO +163 -0
  5. open_api_framework-0.13.4/README.rst +68 -0
  6. open_api_framework-0.13.4/open_api_framework/__init__.py +0 -0
  7. open_api_framework-0.13.4/open_api_framework/admin.py +38 -0
  8. open_api_framework-0.13.4/open_api_framework/apps.py +5 -0
  9. open_api_framework-0.13.4/open_api_framework/conf/__init__.py +0 -0
  10. open_api_framework-0.13.4/open_api_framework/conf/base.py +1516 -0
  11. open_api_framework-0.13.4/open_api_framework/conf/utils.py +188 -0
  12. open_api_framework-0.13.4/open_api_framework/context_processors.py +14 -0
  13. open_api_framework-0.13.4/open_api_framework/management/__init__.py +0 -0
  14. open_api_framework-0.13.4/open_api_framework/management/commands/__init__.py +0 -0
  15. open_api_framework-0.13.4/open_api_framework/management/commands/generate_envvar_docs.py +58 -0
  16. open_api_framework-0.13.4/open_api_framework/py.typed +0 -0
  17. open_api_framework-0.13.4/open_api_framework/static/open_api_framework/css/admin.css +39 -0
  18. open_api_framework-0.13.4/open_api_framework/templates/open_api_framework/admin/base_site.html +22 -0
  19. open_api_framework-0.13.4/open_api_framework/templates/open_api_framework/components/environment.html +1 -0
  20. open_api_framework-0.13.4/open_api_framework/templates/open_api_framework/components/version.html +5 -0
  21. open_api_framework-0.13.4/open_api_framework/templates/open_api_framework/env_config.rst +50 -0
  22. open_api_framework-0.13.4/open_api_framework/templatetags/__init__.py +0 -0
  23. open_api_framework-0.13.4/open_api_framework/templatetags/doc_tags.py +35 -0
  24. open_api_framework-0.13.4/open_api_framework/templatetags/open_api_framework.py +19 -0
  25. open_api_framework-0.13.4/open_api_framework/utils.py +8 -0
  26. open_api_framework-0.13.4/open_api_framework.egg-info/PKG-INFO +163 -0
  27. open_api_framework-0.13.4/open_api_framework.egg-info/SOURCES.txt +35 -0
  28. open_api_framework-0.13.4/open_api_framework.egg-info/dependency_links.txt +1 -0
  29. open_api_framework-0.13.4/open_api_framework.egg-info/requires.txt +79 -0
  30. open_api_framework-0.13.4/open_api_framework.egg-info/top_level.txt +1 -0
  31. open_api_framework-0.13.4/pyproject.toml +148 -0
  32. open_api_framework-0.13.4/setup.cfg +4 -0
  33. open_api_framework-0.13.4/tests/test_admin.py +194 -0
  34. open_api_framework-0.13.4/tests/test_config_helpers.py +63 -0
  35. open_api_framework-0.13.4/tests/test_csp.py +73 -0
  36. open_api_framework-0.13.4/tests/test_generate_envvar_docs.py +184 -0
  37. open_api_framework-0.13.4/tests/test_settings.py +28 -0
@@ -0,0 +1,402 @@
1
+ Changelog
2
+ =========
3
+
4
+ 0.13.4 (2026-02-02)
5
+ -------------------
6
+
7
+ **Bugfixes**
8
+
9
+ * [#201] Fix warnings and errors when trying to load envvars from non-installed optional libraries
10
+ * [#201] Properly handle envvars without defaults for optional extras
11
+
12
+
13
+ 0.13.3 (2026-01-28)
14
+ -------------------
15
+
16
+ **Bugfixes**
17
+
18
+ * [#196] Fix errors raised when using ``open-api-framework`` without optional dependencies
19
+
20
+ **Project maintenance**
21
+
22
+ * Remove Django 4.2 from CI (pyproject.toml enforces >=5.2)
23
+
24
+ 0.13.2 (2025-11-13)
25
+ -------------------
26
+
27
+ **Documentation**
28
+
29
+ * Updated the help text of ``DB_POOL_ENABLED`` to indicate that connection pooling is experimental and not recommended for production use.
30
+ * Added a reference to the connection pooling documentation.
31
+
32
+ 0.13.1 (2025-10-03)
33
+ -------------------
34
+
35
+ **Bugfixes**
36
+
37
+ * Avoid duplicate ``commonground_api_common`` logs by setting propagate to ``False`` and
38
+ use the correct handlers for this logger
39
+
40
+ 0.13.0 (2025-09-18)
41
+ -------------------
42
+
43
+ **New features**
44
+
45
+ * [#178] Add logging envvars:
46
+
47
+ * ``LOG_FORMAT_CONSOLE``
48
+ * ``ENABLE_STRUCTLOG_REQUESTS``
49
+
50
+ * [#178] Specify optional dependency groups:
51
+
52
+ * **structlog**: ``structlog``, ``django-structlog``
53
+ * **structlog-celery**: ``structlog``, ``django-structlog[celery]``
54
+
55
+ * [#178] Add option to configure whether to use structlog or standard logging (default: stdlib logging).
56
+ To enable structlog, downstream projects can do the following in their base settings:
57
+
58
+ .. code-block:: python
59
+
60
+ os.environ["_USE_STRUCTLOG"] = "True"
61
+
62
+ from open_api_framework.conf.base import * # noqa
63
+
64
+ **Bugfixes/QOL**
65
+
66
+ * Fix casting DB_PORT "" to int
67
+
68
+ **Maintenance**
69
+
70
+ * Pin ```django-csp``` to 4.0 or higher.
71
+
72
+ .. warning::
73
+
74
+ The CSP environment variables function the same as with 3.8, but if any changes are made to
75
+ CSP settings for downstream projects (like adding extra values to directives via the old 3.8 settings),
76
+ manual action is needed to make sure it works with 4.0
77
+ (`see documentation <https://django-csp.readthedocs.io/en/latest/configuration.html#migrating-from-django-csp-3-8>`_)
78
+
79
+ **Documentation**
80
+
81
+ * [#171] Add documentation for connection pooling behaviour.
82
+
83
+ 0.12.0 (2025-07-15)
84
+ -------------------
85
+
86
+ **💥 Breaking changes**
87
+
88
+ * Specify optional dependency groups:
89
+
90
+ * **celery**: ``celery``, ``flower``
91
+ * **cors**: ``django-cors-headers``
92
+ * **markup**: ``django-markup``
93
+ * **geo**: ``djangorestframework-gis``
94
+ * **csp**: ``django-csp``
95
+ * **commonground**: ``commonground-api-common``
96
+ * **inclusions**: ``djangorestframework-inclusions``
97
+ * **sanitization**: ``bleach``
98
+ * **server**: ``uwsgi``
99
+ * **redis**: ``django-redis``
100
+
101
+ **New features**
102
+
103
+ * Add DB connection pooling envvars + configuration (with workaround to make sure it works with APM)
104
+
105
+ * ``DB_POOL_ENABLED``
106
+ * ``DB_POOL_MIN_SIZE``
107
+ * ``DB_POOL_MAX_SIZE``
108
+ * ``DB_POOL_TIMEOUT``
109
+ * ``DB_POOL_MAX_WAITING``
110
+ * ``DB_POOL_MAX_LIFETIME``
111
+ * ``DB_POOL_MAX_IDLE``
112
+ * ``DB_POOL_RECONNECT_TIMEOUT``
113
+ * ``DB_POOL_NUM_WORKERS``
114
+
115
+ * Add ``DB_CONN_MAX_AGE`` envvar (automatically set to 0 if connection pooling is enabled)
116
+
117
+ **Maintenance**
118
+
119
+ * Pin ```commonground-api-common``` to 2.7.0 or higher
120
+
121
+ 0.11.0 (2025-07-03)
122
+ -------------------
123
+
124
+ **New features**
125
+
126
+ * Replace ``psycopg2`` with ``psycopg[binary]`` to support connection pooling
127
+
128
+ 0.10.3 (2025-06-17)
129
+ -------------------
130
+
131
+ **Bugfixes**
132
+
133
+ * [maykinmedia/objects-api#620] Change ``LOG_LEVEL`` environment variable default value from ``WARNING`` to ``INFO``
134
+
135
+ 0.10.2 (2025-06-11)
136
+ -------------------
137
+
138
+ **New features**
139
+
140
+ * [#139] Add ``django-upgrade-check`` dependency and set Python 3.12 as the minimum required version
141
+
142
+ 0.10.1 (2025-05-26)
143
+ -------------------
144
+
145
+ **Bugfixes**
146
+
147
+ * Do not use ``save_outgoing_requests`` log handler if ``LOG_REQUESTS`` is set to false
148
+
149
+ **Maintenance**
150
+
151
+ * [#132] Replace ``check_sphinx.py`` with ``make``
152
+ * [#133] Replace ``black``, ``isort`` and ``flake8`` with ``ruff`` and update code-quality workflow
153
+ * [#140] Upgrade python to 3.12
154
+ * Upgrade codecov action to v4
155
+
156
+
157
+ 0.10.0 (2025-05-19)
158
+ -------------------
159
+
160
+ **New features**
161
+
162
+ * Add separate "Logging" group for logging related environment variables in docs
163
+ * Add ``open_api_framework.conf.utils.mute_logging`` util to silence logging in CI
164
+ * [maykinmedia/objects-api#592] Silence log events in Sentry if structlog is used
165
+
166
+ **Bugfixes**
167
+
168
+ * [#127] Make ``LOGIN_URL`` non-lazy to avoid errors when using ``django-rosetta``
169
+
170
+ 0.9.6 (2025-03-28)
171
+ ------------------
172
+
173
+ **Maintenance**
174
+
175
+ * [#59] Set ``SITE_DOMAIN`` default to an empty string and add ``SITE_ID``
176
+
177
+
178
+ 0.9.5 (2025-03-24)
179
+ ------------------
180
+
181
+ **Maintenance**
182
+
183
+ * [#open-zaak/open-zaak#1856] Allow Django 5 as a dependency.
184
+
185
+
186
+ 0.9.4 (2025-03-20)
187
+ ------------------
188
+
189
+ **Maintenance**
190
+
191
+ * [#59] Remove ``django.contrib.sites`` dependency and add ``SITE_DOMAIN`` environment variable
192
+
193
+
194
+ 0.9.3 (2025-02-24)
195
+ ------------------
196
+
197
+ **Bugfixes**
198
+
199
+ * [#88] Automatically initialize Sentry when importing base settings and expose ``SENTRY_CONFIG`` setting
200
+
201
+ .. warning::
202
+
203
+ The ``init_sentry`` function was removed and now Sentry is initialized immediately in
204
+ ``open_api_framework/conf/base.py``. If your project requires additional parameters
205
+ to be specified (e.g. a ``before_send`` hook), it is best to reinitialize Sentry manually in your project's base setting:
206
+
207
+ .. code-block:: python
208
+
209
+ from open_api_framework.conf.base import * # noqa
210
+ from open_api_framework.conf.utils import get_sentry_integrations
211
+
212
+ from your_project.utils import before_send_hook
213
+
214
+ # Reinitialize Sentry to add the before_send hook
215
+ SENTRY_CONFIG["before_send"] = before_send_hook
216
+ sentry_sdk.init(
217
+ **SENTRY_CONFIG,
218
+ integrations=get_sentry_integrations(),
219
+ send_default_pii=True,
220
+ )
221
+
222
+
223
+ **Maintenance**
224
+
225
+ * [#90] bump commonground api version to 2.1.2
226
+
227
+ **Documentation**
228
+
229
+ * [#108] Mention in docs that importing anything from ``base.py`` causes all settings to be loaded
230
+
231
+
232
+ 0.9.2 (2025-01-02)
233
+ ------------------
234
+
235
+ **Security updates**
236
+
237
+ * Upgrade django to 4.2.17
238
+
239
+ 0.9.1 (2024-12-16)
240
+ ------------------
241
+
242
+ **Bugfixes/QOL**
243
+
244
+ * Change ``LOG_STDOUT`` default value to True
245
+ * Re-add separate ``CELERY_LOGLEVEL`` configuration setting
246
+
247
+
248
+ 0.9.0 (2024-11-11)
249
+ ------------------
250
+ **New Features**
251
+
252
+ * Add ``SESSION_COOKIE_AGE`` configurable setting
253
+ * Add user session management admin
254
+
255
+ .. note::
256
+
257
+ SessionProfile admin should be added to admin index and its fixture.
258
+
259
+ **Bugfixes/QOL**
260
+
261
+ * fix runtime configuration for django-log-outgoing-requests
262
+
263
+ 0.8.1 (2024-09-26)
264
+ ------------------
265
+
266
+ **Bugfixes/QOL**
267
+
268
+ * Change SESSION_COOKIE_SAMESITE to "Lax" to fix OIDC (#72)
269
+ * Remove url from SECRET_KEY help text (#76)
270
+ * Change CSP headers to support API schema page
271
+
272
+ 0.8.0 (2024-08-22)
273
+ ------------------
274
+
275
+ **New features**
276
+
277
+ * Add Django CSP with configurable settings
278
+ * Add SECURE_HSTS_SECONDS and CSRF_COOKIE_HTTPONLY settings
279
+
280
+ .. warning::
281
+
282
+ SECURE_HSTS_SECONDS has been added with a default of 31536000 seconds, ensure that
283
+ before upgrading to this version of open-api-framework, your entire application is served
284
+ over HTTPS, otherwise this setting can break parts of your application (see https://docs.djangoproject.com/en/4.2/ref/middleware/#http-strict-transport-security)
285
+
286
+ **Bugfixes/QOL**
287
+
288
+ * Fix rendering for envvar defaults (previously quotes were escaped)
289
+ * Move ``CACHE_DEFAULT``, ``CACHE_AXES``, ``EMAIL_HOST`` envvars to Required group (because they are required for Docker)
290
+ * Add CI job to check if all envvars are either documented or excluded from documentation
291
+
292
+ 0.7.1 (2024-08-16)
293
+ ------------------
294
+
295
+ **Bugfixes**
296
+
297
+ * Add missing help_text for SESSION_COOKIE_SAMESITE and CSRF_COOKIE_SAMESITE envvars
298
+
299
+ 0.7.0 (2024-08-15)
300
+ ------------------
301
+
302
+ **New features**
303
+
304
+ * Management command to generate documentation for environment variables
305
+ * Made SESSION_COOKIE_SAMESITE and CSRF_COOKIE_SAMESITE configurable via environment variables (default ``Strict``)
306
+
307
+ 0.6.1 (2024-07-31)
308
+ ------------------
309
+
310
+ **Project maintenance and QOL**
311
+
312
+ * Updated dependencies:
313
+ - django ``4.2.11+`` to ``4.2.14+``
314
+ - django-axes ``6.3.0+`` to ``6.5.1+``
315
+ - django-cors-headers ``4.3.1+`` to ``4.4.0+``
316
+ - django-jsonform ``2.21.4+`` to ``2.22.0+``
317
+ - djangorestframework ``3.12.4+`` to ``3.15.2+``
318
+ - django-filter ``23.2+`` to ``24.2+``
319
+ - drf-spectacular ``0.27.0+`` to ``0.27.2+``
320
+ - mozilla-django-oidc-db ``0.14.1+`` to ``0.19.0+``
321
+ - requests ``2.31.0+`` to ``2.32.3+``
322
+ - sentry-sdk ``1.39.2+`` to ``2.11.0+``
323
+ - elastic-apm ``6.20.0+`` to ``6.22.0+``
324
+ - celery ``5.2.7+`` to ``5.4.0+``
325
+ - maykin-2fa ``1.0.0+`` to ``1.0.1+``
326
+
327
+
328
+ 0.6.0 (2024-07-04)
329
+ ------------------
330
+
331
+ **New features**
332
+
333
+ * Use the callback class from mozilla-django-oidc-db to allow for a custom error view
334
+
335
+ 0.5.0 (2024-06-27)
336
+ ------------------
337
+
338
+ **New features**
339
+
340
+ * Add password to ``AXES_SENSITIVE_PARAMETERS``
341
+ * Use stricter ``django-axes`` settings
342
+ * ``AXES_FAILURE_LIMIT`` changed from ``10`` to ``5``
343
+ * ``AXES_COOLOFF_TIME`` changed from ``1`` to ``5`` minutes
344
+ * Make more ``log-outgoing-requests`` settings configurable
345
+ * ``LOG_OUTGOING_REQUESTS_EMIT_BODY`` (default ``True``)
346
+ * ``LOG_OUTGOING_REQUESTS_DB_SAVE_BODY`` (default ``True``)
347
+ * Add base template to display current version in admin
348
+
349
+ **Bugfixes**
350
+
351
+ * Remove FIXTURE_DIRS setting and add root level app to INSTALLED_APPS
352
+
353
+ **Other**
354
+
355
+ * Move documentation to readthedocs
356
+
357
+ 0.4.2 (2024-06-20)
358
+ ------------------
359
+
360
+ **Bugfixes**
361
+
362
+ * Add missing settings for ``TWO_FACTOR_WEBAUTHN``
363
+
364
+ 0.4.1 (2024-06-13)
365
+ ------------------
366
+
367
+ **Bugfixes**
368
+
369
+ * Add ``ordered_model`` to ``INSTALLED_APPS`` (required for ``django-admin-index``)
370
+ * Add ``two_factor.plugins.webauthn`` to ``INSTALLED_APPS`` (required for ``maykin_2fa``)
371
+
372
+ 0.4.0 (2024-06-06)
373
+ ------------------
374
+
375
+ **New features**
376
+
377
+ * Add django-setup-configuration to deps
378
+ * Add ELASTIC_APM_TRANSACTION_SAMPLE_RATE
379
+
380
+ 0.3.0 (2024-05-17)
381
+ ------------------
382
+
383
+ **New features**
384
+
385
+ * [#14] Add django-log-outgoing-requests to deps
386
+ * [open-zaak/open-zaak#1629] Add generic base settings file
387
+
388
+
389
+ 0.2.0 (2024-03-22)
390
+ ------------------
391
+
392
+ **New features**
393
+
394
+ * Add support for python 3.10
395
+ * Upgrade to Django 4.2
396
+ * Add maykin-2fa
397
+
398
+
399
+ 0.1.0 (2024-01-30)
400
+ ------------------
401
+
402
+ * Initial release as a metapackage to pin several dependencies
@@ -0,0 +1,7 @@
1
+ Copyright © Maykin 2024
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,10 @@
1
+ include *.rst
2
+ include LICENSE
3
+ include open_api_framework/py.typed
4
+ recursive-include open_api_framework *.html
5
+ recursive-include open_api_framework *.rst
6
+ recursive-include open_api_framework *.txt
7
+ recursive-include open_api_framework *.po
8
+ recursive-include open_api_framework/static *.css
9
+ global-exclude __pycache__
10
+ global-exclude *.py[co]
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: open-api-framework
3
+ Version: 0.13.4
4
+ Summary: A metapackage for registration components, that bundles the dependencies shared between these components and provides generic settings
5
+ Author-email: Maykin Media <support@maykinmedia.nl>
6
+ License: Copyright © Maykin 2024
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13
+
14
+ Project-URL: Homepage, https://github.com/maykinmedia/open-api-framework
15
+ Project-URL: Documentation, http://open-api-framework.readthedocs.io/en/latest/
16
+ Project-URL: Bug Tracker, https://github.com/maykinmedia/open-api-framework/issues
17
+ Project-URL: Source Code, https://github.com/maykinmedia/open-api-framework
18
+ Keywords: metapackage,dependencies,settings
19
+ Classifier: Development Status :: 3 - Alpha
20
+ Classifier: Framework :: Django
21
+ Classifier: Framework :: Django :: 5.2
22
+ Classifier: Intended Audience :: Developers
23
+ Classifier: Operating System :: Unix
24
+ Classifier: Operating System :: MacOS
25
+ Classifier: Operating System :: Microsoft :: Windows
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
+ Requires-Python: >=3.12
29
+ Description-Content-Type: text/x-rst
30
+ License-File: LICENSE
31
+ Requires-Dist: django>=5.2
32
+ Requires-Dist: django-axes>=6.5.1
33
+ Requires-Dist: django-jsonform>=2.22.0
34
+ Requires-Dist: django-log-outgoing-requests>=0.6.1
35
+ Requires-Dist: django-admin-index>=3.1.0
36
+ Requires-Dist: djangorestframework>=3.15.2
37
+ Requires-Dist: django-filter>=24.2
38
+ Requires-Dist: drf-spectacular[sidecar]>=0.27.2
39
+ Requires-Dist: mozilla-django-oidc-db>=0.19.0
40
+ Requires-Dist: psycopg[binary]>=3.2.9
41
+ Requires-Dist: python-dotenv>=1.0.0
42
+ Requires-Dist: python-decouple>=3.8
43
+ Requires-Dist: requests>=2.32.3
44
+ Requires-Dist: sentry-sdk>=2.11.0
45
+ Requires-Dist: elastic-apm>=6.22.0
46
+ Requires-Dist: maykin-2fa>=1.0.1
47
+ Requires-Dist: django-setup-configuration>=0.1.0
48
+ Requires-Dist: django-sessionprofile>=3.0.0
49
+ Requires-Dist: django-upgrade-check>=1.1.0
50
+ Provides-Extra: tests
51
+ Requires-Dist: pytest; extra == "tests"
52
+ Requires-Dist: pytest-django; extra == "tests"
53
+ Requires-Dist: pytest-env; extra == "tests"
54
+ Requires-Dist: tox; extra == "tests"
55
+ Requires-Dist: ruff; extra == "tests"
56
+ Requires-Dist: factory-boy; extra == "tests"
57
+ Requires-Dist: django-rosetta; extra == "tests"
58
+ Requires-Dist: django-webtest; extra == "tests"
59
+ Provides-Extra: coverage
60
+ Requires-Dist: pytest-cov; extra == "coverage"
61
+ Provides-Extra: docs
62
+ Requires-Dist: sphinx; extra == "docs"
63
+ Requires-Dist: sphinx-rtd-theme; extra == "docs"
64
+ Provides-Extra: release
65
+ Requires-Dist: bump-my-version; extra == "release"
66
+ Requires-Dist: twine; extra == "release"
67
+ Provides-Extra: celery
68
+ Requires-Dist: celery>=5.4.0; extra == "celery"
69
+ Requires-Dist: flower>=2.0.1; extra == "celery"
70
+ Provides-Extra: cors
71
+ Requires-Dist: django-cors-headers>=4.4.0; extra == "cors"
72
+ Provides-Extra: markup
73
+ Requires-Dist: django-markup>=1.8.1; extra == "markup"
74
+ Provides-Extra: geo
75
+ Requires-Dist: djangorestframework-gis>=1.0; extra == "geo"
76
+ Provides-Extra: csp
77
+ Requires-Dist: django-csp>=4.0; extra == "csp"
78
+ Provides-Extra: commonground
79
+ Requires-Dist: commonground-api-common>=2.7.0; extra == "commonground"
80
+ Provides-Extra: inclusions
81
+ Requires-Dist: djangorestframework-inclusions>=1.2.0; extra == "inclusions"
82
+ Provides-Extra: sanitization
83
+ Requires-Dist: bleach>=6.1.0; extra == "sanitization"
84
+ Provides-Extra: server
85
+ Requires-Dist: uwsgi>=2.0.23; extra == "server"
86
+ Provides-Extra: redis
87
+ Requires-Dist: django-redis>=5.4.0; extra == "redis"
88
+ Provides-Extra: structlog
89
+ Requires-Dist: structlog>=25.4.0; extra == "structlog"
90
+ Requires-Dist: django-structlog>=9.1.1; extra == "structlog"
91
+ Provides-Extra: structlog-celery
92
+ Requires-Dist: structlog>=25.4.0; extra == "structlog-celery"
93
+ Requires-Dist: django-structlog[celery]>=9.1.1; extra == "structlog-celery"
94
+ Dynamic: license-file
95
+
96
+ Open API Framework
97
+ ==================
98
+
99
+ :Version: 0.13.4
100
+ :Source: https://github.com/maykinmedia/open-api-framework
101
+ :Keywords: metapackage, dependencies
102
+
103
+ |build-status| |code-quality| |ruff| |coverage| |docs|
104
+
105
+ |python-versions| |django-versions| |pypi-version|
106
+
107
+ A metapackage for registration components, that bundles the dependencies shared between these
108
+ components and provides generic base settings
109
+
110
+ .. contents::
111
+
112
+ .. section-numbering::
113
+
114
+ Features
115
+ ========
116
+
117
+ * Bundling shared dependencies and introducing minimum versions for these dependencies
118
+ * Providing generic base Django settings to avoid duplicate settings across registration components
119
+
120
+ Usage
121
+ =====
122
+
123
+ Please see the hosted `documentation`_ for installation, configuration and usage instructions.
124
+
125
+ License
126
+ =======
127
+
128
+ Copyright © Maykin 2024
129
+
130
+ Licensed under the `MIT license`.
131
+
132
+
133
+ .. _`MIT license`: LICENSE
134
+
135
+
136
+ .. |build-status| image:: https://github.com/maykinmedia/open-api-framework/workflows/Run%20CI/badge.svg
137
+ :alt: Build status
138
+ :target: https://github.com/maykinmedia/open-api-framework/actions?query=workflow%3A%22Run+CI%22
139
+
140
+ .. |code-quality| image:: https://github.com/maykinmedia/open-api-framework/workflows/Code%20quality%20checks/badge.svg
141
+ :alt: Code quality checks
142
+ :target: https://github.com/maykinmedia/open-api-framework/actions?query=workflow%3A%22Code+quality+checks%22
143
+
144
+ .. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
145
+ :target: https://github.com/astral-sh/ruff
146
+ :alt: Ruff
147
+
148
+ .. |coverage| image:: https://codecov.io/gh/maykinmedia/open-api-framework/branch/main/graph/badge.svg
149
+ :target: https://codecov.io/gh/maykinmedia/open-api-framework
150
+ :alt: Coverage status
151
+
152
+ .. |docs| image:: https://readthedocs.org/projects/open-api-framework/badge/?version=latest
153
+ :target: https://open-api-framework.readthedocs.io/en/latest/?badge=latest
154
+ :alt: Documentation Status
155
+
156
+ .. |python-versions| image:: https://img.shields.io/pypi/pyversions/open-api-framework.svg
157
+
158
+ .. |django-versions| image:: https://img.shields.io/pypi/djversions/open-api-framework.svg
159
+
160
+ .. |pypi-version| image:: https://img.shields.io/pypi/v/open-api-framework.svg
161
+ :target: https://pypi.org/project/open-api-framework/
162
+
163
+ .. _documentation: https://open-api-framework.readthedocs.io/en/latest/
@@ -0,0 +1,68 @@
1
+ Open API Framework
2
+ ==================
3
+
4
+ :Version: 0.13.4
5
+ :Source: https://github.com/maykinmedia/open-api-framework
6
+ :Keywords: metapackage, dependencies
7
+
8
+ |build-status| |code-quality| |ruff| |coverage| |docs|
9
+
10
+ |python-versions| |django-versions| |pypi-version|
11
+
12
+ A metapackage for registration components, that bundles the dependencies shared between these
13
+ components and provides generic base settings
14
+
15
+ .. contents::
16
+
17
+ .. section-numbering::
18
+
19
+ Features
20
+ ========
21
+
22
+ * Bundling shared dependencies and introducing minimum versions for these dependencies
23
+ * Providing generic base Django settings to avoid duplicate settings across registration components
24
+
25
+ Usage
26
+ =====
27
+
28
+ Please see the hosted `documentation`_ for installation, configuration and usage instructions.
29
+
30
+ License
31
+ =======
32
+
33
+ Copyright © Maykin 2024
34
+
35
+ Licensed under the `MIT license`.
36
+
37
+
38
+ .. _`MIT license`: LICENSE
39
+
40
+
41
+ .. |build-status| image:: https://github.com/maykinmedia/open-api-framework/workflows/Run%20CI/badge.svg
42
+ :alt: Build status
43
+ :target: https://github.com/maykinmedia/open-api-framework/actions?query=workflow%3A%22Run+CI%22
44
+
45
+ .. |code-quality| image:: https://github.com/maykinmedia/open-api-framework/workflows/Code%20quality%20checks/badge.svg
46
+ :alt: Code quality checks
47
+ :target: https://github.com/maykinmedia/open-api-framework/actions?query=workflow%3A%22Code+quality+checks%22
48
+
49
+ .. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
50
+ :target: https://github.com/astral-sh/ruff
51
+ :alt: Ruff
52
+
53
+ .. |coverage| image:: https://codecov.io/gh/maykinmedia/open-api-framework/branch/main/graph/badge.svg
54
+ :target: https://codecov.io/gh/maykinmedia/open-api-framework
55
+ :alt: Coverage status
56
+
57
+ .. |docs| image:: https://readthedocs.org/projects/open-api-framework/badge/?version=latest
58
+ :target: https://open-api-framework.readthedocs.io/en/latest/?badge=latest
59
+ :alt: Documentation Status
60
+
61
+ .. |python-versions| image:: https://img.shields.io/pypi/pyversions/open-api-framework.svg
62
+
63
+ .. |django-versions| image:: https://img.shields.io/pypi/djversions/open-api-framework.svg
64
+
65
+ .. |pypi-version| image:: https://img.shields.io/pypi/v/open-api-framework.svg
66
+ :target: https://pypi.org/project/open-api-framework/
67
+
68
+ .. _documentation: https://open-api-framework.readthedocs.io/en/latest/
@@ -0,0 +1,38 @@
1
+ from django.contrib import admin
2
+
3
+ from sessionprofile.models import SessionProfile
4
+
5
+ from open_api_framework.utils import get_session_store
6
+
7
+
8
+ @admin.register(SessionProfile)
9
+ class SessionProfileAdmin(admin.ModelAdmin):
10
+ list_display = ["session_key", "user", "exists"]
11
+
12
+ @property
13
+ def SessionStore(self):
14
+ return get_session_store()
15
+
16
+ def get_queryset(self, request):
17
+ qs = super().get_queryset(request)
18
+ return qs.filter(user=request.user)
19
+
20
+ def has_add_permission(self, request, obj=None):
21
+ return False
22
+
23
+ def has_change_permission(self, request, obj=None):
24
+ return False
25
+
26
+ @admin.display(boolean=True)
27
+ def exists(self, obj):
28
+ return self.SessionStore().exists(obj.session_key)
29
+
30
+ def delete_model(self, request, obj):
31
+ self.SessionStore(obj.session_key).flush()
32
+ super().delete_model(request, obj)
33
+
34
+ def delete_queryset(self, request, queryset):
35
+ for session_profile in queryset.iterator():
36
+ self.SessionStore(session_profile.session_key).flush()
37
+
38
+ super().delete_queryset(request, queryset)
@@ -0,0 +1,5 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class OpenApiFrameworkConfig(AppConfig):
5
+ name = "open_api_framework"