arpakitlib 1.7.74__py3-none-any.whl → 1.7.76__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
- from arpakitlib.ar_fastapi_util import is_api_key_correct_api_auth
1
+ from arpakitlib.ar_fastapi_util import api_key_api_auth
2
2
  from src.core.settings import get_cached_settings
3
3
 
4
- check_with_settings_is_api_key_correct_api_auth = is_api_key_correct_api_auth(
4
+ check_with_settings_api_key_api_auth = api_key_api_auth(
5
5
  correct_api_key=get_cached_settings().api_correct_api_key
6
6
  )
@@ -560,7 +560,7 @@ class CheckAPIKeyAPIAuthData(BaseAPIAuthData):
560
560
  is_api_key_correct: bool | None = None
561
561
 
562
562
 
563
- def is_api_key_correct_api_auth(
563
+ def api_key_api_auth(
564
564
  *,
565
565
  validate_api_key_func: Callable | None = None,
566
566
  correct_api_key: str | None = None
@@ -647,7 +647,7 @@ def create_fastapi_app(
647
647
  title: str = "arpakitlib FastAPI",
648
648
  description: str | None = "arpakitlib FastAPI",
649
649
  log_filepath: str | None = "./story.log",
650
- handle_exception_: Callable | None = create_handle_exception(),
650
+ handle_exception_: Callable | None = None,
651
651
  startup_api_events: list[BaseStartupAPIEvent | None] | None = None,
652
652
  shutdown_api_events: list[BaseShutdownAPIEvent | None] | None = None,
653
653
  transmitted_api_data: BaseTransmittedAPIData = BaseTransmittedAPIData(),
@@ -660,6 +660,9 @@ def create_fastapi_app(
660
660
 
661
661
  setup_normal_logging(log_filepath=log_filepath)
662
662
 
663
+ if handle_exception_ is None:
664
+ handle_exception_ = create_handle_exception()
665
+
663
666
  if contact is None:
664
667
  contact = DEFAULT_CONTACT
665
668
 
@@ -698,16 +701,10 @@ def create_fastapi_app(
698
701
 
699
702
  add_swagger_to_app(app=app)
700
703
 
701
- if handle_exception_:
702
- add_exception_handler_to_app(
703
- app=app,
704
- handle_exception=handle_exception_
705
- )
706
- else:
707
- add_exception_handler_to_app(
708
- app=app,
709
- handle_exception=create_handle_exception()
710
- )
704
+ add_exception_handler_to_app(
705
+ app=app,
706
+ handle_exception=handle_exception_
707
+ )
711
708
 
712
709
  add_needed_api_router_to_app(app=app)
713
710
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arpakitlib
3
- Version: 1.7.74
3
+ Version: 1.7.76
4
4
  Summary: arpakitlib
5
5
  Home-page: https://github.com/ARPAKIT-Company/arpakitlib
6
6
  License: Apache-2.0
@@ -73,7 +73,7 @@ arpakitlib/_arpakit_project_template/src/additional_model/__init__.py,sha256=47D
73
73
  arpakitlib/_arpakit_project_template/src/additional_model/additional_model.py,sha256=4KCOvto9Hj5eMYpvfaJChghhR9bkCvKluGGPWrTezoY,134
74
74
  arpakitlib/_arpakit_project_template/src/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
75
  arpakitlib/_arpakit_project_template/src/api/asgi.py,sha256=a5UBxOyNC8NG3E0ayhiDo3t5tPoB3WtOf2gbZJFWBAA,74
76
- arpakitlib/_arpakit_project_template/src/api/auth.py,sha256=Ljq_VjjiAaW3HEzq60nkSI-HkHfuv6j5-8Q6Qs8V9bU,261
76
+ arpakitlib/_arpakit_project_template/src/api/auth.py,sha256=onnmSwjtc0aX7y6X2GCqayKcZ85Besz0KoElctv-H-w,228
77
77
  arpakitlib/_arpakit_project_template/src/api/const.py,sha256=7d4qD5hedqr7QxVzbfsA7E1bNZn2Pm2U8joXGtpANu0,287
78
78
  arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=lDE77W6WkeAeRB_vJY3TXRTa3HeiO-t26eTtG7v8j6U,4594
79
79
  arpakitlib/_arpakit_project_template/src/api/event.py,sha256=58wCVyVSIe_kydWi44M0Wvp7bTnV8xvO30gMXzjbFYc,750
@@ -148,7 +148,7 @@ arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css,sha256=jzPZlgJTFwSdSphk9C
148
148
  arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css.map,sha256=5wq8eXMLU6Zxb45orZPL1zAsBFJReFw6GjYqGpUX3hg,262650
149
149
  arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js,sha256=ffrLZHHEQ_g84A-ul3yWa10Kk09waOAxHcQXPuZuavg,339292
150
150
  arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js.map,sha256=9UhIW7MqCOZPAz1Sl1IKfZUuhWU0p-LJqrnjjJD9Xhc,1159454
151
- arpakitlib/ar_fastapi_util.py,sha256=g_qUH_THm9OuWoKFcDHFYe-yhl3hqSExs3BJfFuGV7g,25377
151
+ arpakitlib/ar_fastapi_util.py,sha256=9gUzWhtqBV8stxPmWQ76Btw8rzWGFoBjRwMofGWdyhQ,25258
152
152
  arpakitlib/ar_file_storage_in_dir_util.py,sha256=D3e3rGuHoI6xqAA5mVvEpVVpOWY1jyjNsjj2UhyHRbE,3674
153
153
  arpakitlib/ar_file_util.py,sha256=GUdJYm1tUZnYpY-SIPRHAZBHGra8NKy1eYEI0D5AfhY,489
154
154
  arpakitlib/ar_hash_util.py,sha256=Iqy6KBAOLBQMFLWv676boI5sV7atT2B-fb7aCdHOmIQ,340
@@ -177,9 +177,9 @@ arpakitlib/ar_str_util.py,sha256=tFoGSDYoGpfdVHWor5Li9pEOFmDFlHkX-Z8iOy1LK7Y,353
177
177
  arpakitlib/ar_type_util.py,sha256=46ZMuWls3uN0Re5T0sfEAmyNUDnxn9yvj6dHivSDZKs,3915
178
178
  arpakitlib/ar_yookassa_api_client_util.py,sha256=sh4fcUkAkdOetFn9JYoTvjcSXP-M1wU04KEY-ECLfLg,5137
179
179
  arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
180
- arpakitlib-1.7.74.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
181
- arpakitlib-1.7.74.dist-info/METADATA,sha256=GTwTwdkpBy9SAiKi0w1BSDyRPZzVA0BG6kruYP95DqY,2824
182
- arpakitlib-1.7.74.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
183
- arpakitlib-1.7.74.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
184
- arpakitlib-1.7.74.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
185
- arpakitlib-1.7.74.dist-info/RECORD,,
180
+ arpakitlib-1.7.76.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
181
+ arpakitlib-1.7.76.dist-info/METADATA,sha256=sat8Sj_1M9alTRio_zyVPE5uwkUufovTjH-aubogASI,2824
182
+ arpakitlib-1.7.76.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
183
+ arpakitlib-1.7.76.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
184
+ arpakitlib-1.7.76.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
185
+ arpakitlib-1.7.76.dist-info/RECORD,,