arpakitlib 1.7.64__py3-none-any.whl → 1.7.66__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.
@@ -1,6 +1,6 @@
1
1
  from fastapi import FastAPI
2
2
 
3
- from arpakitlib.ar_base_worker_util import BaseWorker
3
+ from arpakitlib.ar_base_worker_util import SafeRunInBackgroundModes
4
4
  from arpakitlib.ar_fastapi_util import create_fastapi_app, InitSqlalchemyDBStartupAPIEvent, InitFileStoragesInDir, \
5
5
  create_handle_exception, create_story_log_before_response_in_handle_exception, DEFAULT_CONTACT, \
6
6
  SafeRunWorkerStartupAPIEvent
@@ -22,18 +22,25 @@ def create_api_app() -> FastAPI:
22
22
  setup_logging()
23
23
 
24
24
  settings = get_cached_settings()
25
+
25
26
  sqlalchemy_db = get_cached_sqlalchemy_db() if settings.sql_db_url is not None else None
27
+
26
28
  transmitted_api_data = TransmittedAPIData(
27
29
  settings=settings,
28
30
  sqlalchemy_db=sqlalchemy_db
29
31
  )
30
32
 
31
33
  funcs_before_response = []
34
+
32
35
  if settings.api_create_story_log_before_response_in_handle_exception:
33
36
  raise_for_type(sqlalchemy_db, SQLAlchemyDB)
34
37
  funcs_before_response.append(
35
- create_story_log_before_response_in_handle_exception(sqlalchemy_db=sqlalchemy_db)
38
+ create_story_log_before_response_in_handle_exception(
39
+ sqlalchemy_db=sqlalchemy_db,
40
+ ignore_api_error_code_not_found=True
41
+ )
36
42
  )
43
+
37
44
  handle_exception = create_handle_exception(
38
45
  funcs_before_response=funcs_before_response,
39
46
  async_funcs_after_response=[]
@@ -66,7 +73,7 @@ def create_api_app() -> FastAPI:
66
73
  filter_operation_types=None
67
74
  )
68
75
  ],
69
- safe_run_in_background_mode=BaseWorker.SafeRunInBackgroundModes.async_task
76
+ safe_run_in_background_mode=SafeRunInBackgroundModes.async_task
70
77
  )
71
78
  )
72
79
 
@@ -80,7 +87,7 @@ def create_api_app() -> FastAPI:
80
87
  scheduled_operations=ALL_SCHEDULED_OPERATIONS
81
88
  )
82
89
  ],
83
- safe_run_in_background_mode=BaseWorker.SafeRunInBackgroundModes.async_task
90
+ safe_run_in_background_mode=SafeRunInBackgroundModes.async_task
84
91
  )
85
92
  )
86
93
 
@@ -33,7 +33,7 @@ def setup_normal_logging(log_filepath: Optional[str] = None):
33
33
  stream_handler = logging.StreamHandler()
34
34
  stream_handler.setLevel(logging.INFO)
35
35
  stream_formatter = logging.Formatter(
36
- "%(asctime)s | %(levelname)s | %(filename)s | %(name)s:%(funcName)s:%(lineno)d - %(message)s",
36
+ "%(asctime)s | %(levelname)s | %(filename)s | %(funcName)s:%(lineno)d - %(message)s",
37
37
  datefmt="%d.%m.%Y %I:%M:%S%p"
38
38
  )
39
39
  stream_handler.setFormatter(stream_formatter)
@@ -43,7 +43,7 @@ def setup_normal_logging(log_filepath: Optional[str] = None):
43
43
  file_handler = logging.FileHandler(log_filepath)
44
44
  file_handler.setLevel(logging.WARNING)
45
45
  file_formatter = logging.Formatter(
46
- "%(asctime)s | %(levelname)s | %(filename)s | %(name)s:%(funcName)s:%(lineno)d - %(message)s",
46
+ "%(asctime)s | %(levelname)s | %(filename)s | %(funcName)s:%(lineno)d - %(message)s",
47
47
  datefmt="%d.%m.%Y %I:%M:%S%p"
48
48
  )
49
49
  file_handler.setFormatter(file_formatter)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arpakitlib
3
- Version: 1.7.64
3
+ Version: 1.7.66
4
4
  Summary: arpakitlib
5
5
  Home-page: https://github.com/ARPAKIT-Company/arpakitlib
6
6
  License: Apache-2.0
@@ -74,7 +74,7 @@ arpakitlib/_arpakit_project_template/src/api/__init__.py,sha256=47DEQpj8HBSa-_TI
74
74
  arpakitlib/_arpakit_project_template/src/api/asgi.py,sha256=a5UBxOyNC8NG3E0ayhiDo3t5tPoB3WtOf2gbZJFWBAA,74
75
75
  arpakitlib/_arpakit_project_template/src/api/auth.py,sha256=Ljq_VjjiAaW3HEzq60nkSI-HkHfuv6j5-8Q6Qs8V9bU,261
76
76
  arpakitlib/_arpakit_project_template/src/api/const.py,sha256=7d4qD5hedqr7QxVzbfsA7E1bNZn2Pm2U8joXGtpANu0,287
77
- arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=yEhwKpgSP0eCewXwEiSlKMtRm7fKOhZt_vhXssIjnUw,4491
77
+ arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=sSVf1Ft8VqdW_IAApYsL4C9mnK4M0wNUw8YafKXYJO4,4571
78
78
  arpakitlib/_arpakit_project_template/src/api/event.py,sha256=58wCVyVSIe_kydWi44M0Wvp7bTnV8xvO30gMXzjbFYc,750
79
79
  arpakitlib/_arpakit_project_template/src/api/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
80
  arpakitlib/_arpakit_project_template/src/api/router/main_router.py,sha256=__Z-pGoeooYCub7besFXGJJvZR3V-4IakXd3cKo6ZIM,209
@@ -157,7 +157,7 @@ arpakitlib/ar_json_util.py,sha256=GwHDdrBWiJBHSc07Qe0aN1Gp_uM0pYpTwzU9JAgsKAo,97
157
157
  arpakitlib/ar_jwt_util.py,sha256=Rhm4ywoTAn6yOV8NLjDASfAtAtheROxxDP40G3XjnuQ,761
158
158
  arpakitlib/ar_list_of_dicts_to_xlsx.py,sha256=MyjEl4Jl4beLVZqLVQMMv0-XDtBD3Xh4Z_ZPDJeFu04,745
159
159
  arpakitlib/ar_list_util.py,sha256=2woOAHAU8oTIiVjZ8GLnx15odEaoQUq3Q0JPxlufFF0,457
160
- arpakitlib/ar_logging_util.py,sha256=jkc1qH7STKAjuwV7ipWqMA5Tn0LogQZ78BV6HCwW57A,1696
160
+ arpakitlib/ar_logging_util.py,sha256=mx3H6CzX9dsh29ruFmYnva8lL6mwvdBXmeHH9E2tvu8,1678
161
161
  arpakitlib/ar_mongodb_util.py,sha256=2ECkTnGAZ92qxioL-fmN6R4yZOSr3bXdXLWTzT1C3vk,4038
162
162
  arpakitlib/ar_need_type_util.py,sha256=xq5bbAXJG-93CRVZUcLW0ZdM22rj-ZUW17C5hX_5grg,1699
163
163
  arpakitlib/ar_openai_api_client_util.py,sha256=dHUbfg1sVVCjsNl_fra3iCMEz1bR-Hk9fE-DdYbu7Wc,1215
@@ -175,9 +175,9 @@ arpakitlib/ar_str_util.py,sha256=oCEtQ_TTn35OEz9jCNLjbhopq76JmaifD_iYR-nEJJ4,214
175
175
  arpakitlib/ar_type_util.py,sha256=e6Ch8I_B3FMJMj-fiZvTwtGde4hxSa48fGt5g8RlV6I,2301
176
176
  arpakitlib/ar_yookassa_api_client_util.py,sha256=sh4fcUkAkdOetFn9JYoTvjcSXP-M1wU04KEY-ECLfLg,5137
177
177
  arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
178
- arpakitlib-1.7.64.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
179
- arpakitlib-1.7.64.dist-info/METADATA,sha256=R1OxZx-9KEqiEGOXtrpKyk0DEI39NAoyByOoKecPHqc,2824
180
- arpakitlib-1.7.64.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
181
- arpakitlib-1.7.64.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
182
- arpakitlib-1.7.64.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
183
- arpakitlib-1.7.64.dist-info/RECORD,,
178
+ arpakitlib-1.7.66.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
179
+ arpakitlib-1.7.66.dist-info/METADATA,sha256=TlRRdFiHs7ZwGKV_JpHFIgT_CrurbmGs-heJ_QswOM0,2824
180
+ arpakitlib-1.7.66.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
181
+ arpakitlib-1.7.66.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
182
+ arpakitlib-1.7.66.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
183
+ arpakitlib-1.7.66.dist-info/RECORD,,