arpakitlib 1.7.217__py3-none-any.whl → 1.7.220__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.
- arpakitlib/_arpakit_project_template/src/api/create_api_app.py +4 -1
- arpakitlib/_arpakit_project_template/src/db/_remove_operations.py +13 -0
- {arpakitlib-1.7.217.dist-info → arpakitlib-1.7.220.dist-info}/METADATA +1 -1
- {arpakitlib-1.7.217.dist-info → arpakitlib-1.7.220.dist-info}/RECORD +7 -6
- {arpakitlib-1.7.217.dist-info → arpakitlib-1.7.220.dist-info}/LICENSE +0 -0
- {arpakitlib-1.7.217.dist-info → arpakitlib-1.7.220.dist-info}/WHEEL +0 -0
- {arpakitlib-1.7.217.dist-info → arpakitlib-1.7.220.dist-info}/entry_points.txt +0 -0
@@ -1,9 +1,11 @@
|
|
1
1
|
from fastapi import FastAPI
|
2
|
+
from starlette import status
|
2
3
|
|
3
4
|
from arpakitlib.ar_fastapi_util import create_fastapi_app, \
|
4
5
|
create_handle_exception, create_story_log_before_response_in_handle_exception
|
5
6
|
from arpakitlib.ar_sqlalchemy_util import SQLAlchemyDB
|
6
7
|
from arpakitlib.ar_type_util import raise_for_type
|
8
|
+
from src.api.const import APIErrorCodes
|
7
9
|
from src.api.event import StartupAPIEvent, ShutdownAPIEvent
|
8
10
|
from src.api.router.main_router import main_api_router
|
9
11
|
from src.api.transmitted_api_data import TransmittedAPIData
|
@@ -36,7 +38,8 @@ def create_api_app() -> FastAPI:
|
|
36
38
|
funcs_before_response.append(
|
37
39
|
create_story_log_before_response_in_handle_exception(
|
38
40
|
sqlalchemy_db=sqlalchemy_db,
|
39
|
-
|
41
|
+
ignore_api_error_codes=[APIErrorCodes.not_found],
|
42
|
+
ignore_status_codes=[status.HTTP_404_NOT_FOUND]
|
40
43
|
)
|
41
44
|
)
|
42
45
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
from arpakitlib.ar_operation_execution_util import remove_operations
|
2
|
+
from src.core.util import setup_logging
|
3
|
+
from src.db.util import get_cached_sqlalchemy_db
|
4
|
+
|
5
|
+
|
6
|
+
def _remove_operations():
|
7
|
+
setup_logging()
|
8
|
+
with get_cached_sqlalchemy_db() as sqlalchemy_db:
|
9
|
+
remove_operations(sqlalchemy_db=sqlalchemy_db)
|
10
|
+
|
11
|
+
|
12
|
+
if __name__ == '__main__':
|
13
|
+
_remove_operations()
|
@@ -69,7 +69,7 @@ arpakitlib/_arpakit_project_template/src/api/_start_api_without_reload.py,sha256
|
|
69
69
|
arpakitlib/_arpakit_project_template/src/api/asgi.py,sha256=a5UBxOyNC8NG3E0ayhiDo3t5tPoB3WtOf2gbZJFWBAA,74
|
70
70
|
arpakitlib/_arpakit_project_template/src/api/auth.py,sha256=dcvj5C9E2F2KCsGZPBBncQf_EvVJAC1qQgnyD8P4ZEw,6
|
71
71
|
arpakitlib/_arpakit_project_template/src/api/const.py,sha256=7d4qD5hedqr7QxVzbfsA7E1bNZn2Pm2U8joXGtpANu0,287
|
72
|
-
arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=
|
72
|
+
arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=BeH-GxQyzx7t3vzUQHM9xdKEJTyKJiRjBtd2KR0D_n4,2915
|
73
73
|
arpakitlib/_arpakit_project_template/src/api/event.py,sha256=Jd1eWUpPzGSg-wBIsCh1SNywemykQuXrf_6IlsoSO5w,2999
|
74
74
|
arpakitlib/_arpakit_project_template/src/api/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
75
|
arpakitlib/_arpakit_project_template/src/api/router/main_router.py,sha256=Yv699WCJDcdiJMXFg1kPTvolqj-NAGoXfqe-vzbMzIU,228
|
@@ -95,6 +95,7 @@ arpakitlib/_arpakit_project_template/src/db/__init__.py,sha256=47DEQpj8HBSa-_TIm
|
|
95
95
|
arpakitlib/_arpakit_project_template/src/db/_check_conn_sqlalchemy_db.py,sha256=GPK7-w7x8ESqbZ0v1nI8m_ysWfnmjgRwyyh6kM8vYBQ,249
|
96
96
|
arpakitlib/_arpakit_project_template/src/db/_init_sqlalchemy_db.py,sha256=tHJ1NBUAR-9uAktx2RfPikzGGguhwEWfrWdj1y0XV-w,231
|
97
97
|
arpakitlib/_arpakit_project_template/src/db/_reinit_sqlalchemy_db.py,sha256=_4O_xr6FXt3qcWOmO82CKG3XX6_RqbqaOYSEygxpBfA,339
|
98
|
+
arpakitlib/_arpakit_project_template/src/db/_remove_operations.py,sha256=_ezZ2wfoTdpLS05cLKcE8Cc6hQTErVGATwJnpsUBfzw,369
|
98
99
|
arpakitlib/_arpakit_project_template/src/db/const.py,sha256=dcvj5C9E2F2KCsGZPBBncQf_EvVJAC1qQgnyD8P4ZEw,6
|
99
100
|
arpakitlib/_arpakit_project_template/src/db/sqlalchemy_model.py,sha256=nXtayUkBaVb6tWx5qJgXZLbLOTVAjnSLpSDxBm7yZLc,234
|
100
101
|
arpakitlib/_arpakit_project_template/src/db/util.py,sha256=a8lj54I-vVGjhDg4SLOxahDjYuiPOSFxU86myCfE1M0,557
|
@@ -183,8 +184,8 @@ arpakitlib/ar_str_util.py,sha256=yU5gOwNXUQaH5b_tM5t6fXUn9oUcv5EQbVnq2wXXIpQ,337
|
|
183
184
|
arpakitlib/ar_type_util.py,sha256=9C3ErtUVs0tAUqtK-foFzjJOykfBOntfCz2IogDOgfA,4134
|
184
185
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=sh4fcUkAkdOetFn9JYoTvjcSXP-M1wU04KEY-ECLfLg,5137
|
185
186
|
arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
|
186
|
-
arpakitlib-1.7.
|
187
|
-
arpakitlib-1.7.
|
188
|
-
arpakitlib-1.7.
|
189
|
-
arpakitlib-1.7.
|
190
|
-
arpakitlib-1.7.
|
187
|
+
arpakitlib-1.7.220.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
188
|
+
arpakitlib-1.7.220.dist-info/METADATA,sha256=UO9GuhLaYf5er69E0Im3Fh0cXz-r8oJ9vSF8x6Ups4s,3231
|
189
|
+
arpakitlib-1.7.220.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
190
|
+
arpakitlib-1.7.220.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
191
|
+
arpakitlib-1.7.220.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|