arpakitlib 1.8.39__py3-none-any.whl → 1.8.40__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,4 +1,4 @@
1
1
  {
2
2
  "arpakitlib_project_template_version": "5",
3
- "arpakitlib_project_template_subversion": "7"
3
+ "arpakitlib_project_template_subversion": "8"
4
4
  }
@@ -0,0 +1,42 @@
1
+ import fastapi.requests
2
+ from fastapi import APIRouter
3
+
4
+ from project.api.authorize import APIAuthorizeData, api_authorize, require_api_key_dbm_api_authorize_middleware, \
5
+ require_user_token_dbm_api_authorize_middleware
6
+ from project.api.schema.common import BaseRouteSO
7
+ from project.api.schema.out.common.error import ErrorCommonSO
8
+ from project.api.schema.out.common.raw_data import RawDataCommonSO
9
+ from project.core.settings import get_cached_settings
10
+ from project.sqlalchemy_db_.sqlalchemy_model import UserDBM
11
+
12
+
13
+ class GetSettingsRouteSO(BaseRouteSO, RawDataCommonSO):
14
+ pass
15
+
16
+
17
+ api_router = APIRouter()
18
+
19
+
20
+ @api_router.get(
21
+ "",
22
+ name="Get settings",
23
+ status_code=fastapi.status.HTTP_200_OK,
24
+ response_model=GetSettingsRouteSO | ErrorCommonSO,
25
+ )
26
+ async def _(
27
+ *,
28
+ request: fastapi.requests.Request,
29
+ response: fastapi.responses.Response,
30
+ api_auth_data: APIAuthorizeData = fastapi.Depends(api_authorize(middlewares=[
31
+ require_api_key_dbm_api_authorize_middleware(
32
+ require_active=True
33
+ ),
34
+ require_user_token_dbm_api_authorize_middleware(
35
+ require_active_user_token=True,
36
+ require_user_roles=[UserDBM.Roles.admin]
37
+ )
38
+ ]))
39
+ ):
40
+ return GetSettingsRouteSO(
41
+ data=get_cached_settings().model_dump(mode="json")
42
+ )
@@ -3,7 +3,7 @@ from fastapi import APIRouter
3
3
  from project.api.router.admin import get_auth_data, get_arpakitlib_project_template_info, raise_fake_error, \
4
4
  reinit_sqlalchemy_db, get_story_log, init_sqlalchemy_db, get_sqlalchemy_db_table_name_to_amount, \
5
5
  get_operation_allowed_statuses, get_operation, create_operation, get_operation_allowed_types, get_log_file, \
6
- clear_log_file, check_sqlalchemy_db
6
+ clear_log_file, check_sqlalchemy_db, get_settings
7
7
 
8
8
  main_admin_api_router = APIRouter()
9
9
 
@@ -76,3 +76,8 @@ main_admin_api_router.include_router(
76
76
  router=check_sqlalchemy_db.api_router,
77
77
  prefix="/check_sqlalchemy_db"
78
78
  )
79
+
80
+ main_admin_api_router.include_router(
81
+ router=get_settings.api_router,
82
+ prefix="/get_settings"
83
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arpakitlib
3
- Version: 1.8.39
3
+ Version: 1.8.40
4
4
  Summary: arpakitlib
5
5
  License: Apache-2.0
6
6
  Keywords: arpakitlib,arpakit,arpakit-company,arpakitcompany,arpakit_company
@@ -8,7 +8,7 @@ arpakitlib/_arpakit_project_template_v_5/alembic/env.py,sha256=Qesmnj5A2kB-Doeuf
8
8
  arpakitlib/_arpakit_project_template_v_5/alembic/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
9
9
  arpakitlib/_arpakit_project_template_v_5/alembic/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  arpakitlib/_arpakit_project_template_v_5/alembic.ini,sha256=8fuyeEvGBiPGbxEFy8ISBV3xX_fgVmuhEGpB10_B5Uo,3733
11
- arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json,sha256=tHWnMtxRMs4bWD1lB84oODv26e4-p2zTK1wpLWHvG9g,97
11
+ arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json,sha256=EkctAYkthhQpPLxJPmiuu1VL0gS5R8beKIF07_fLg1o,97
12
12
  arpakitlib/_arpakit_project_template_v_5/command/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  arpakitlib/_arpakit_project_template_v_5/command/alembic_history.sh,sha256=OMnDNtHIksGh9iavWnzbtxcudZW4vjdcISsBXvzZSPw,22
14
14
  arpakitlib/_arpakit_project_template_v_5/command/alembic_revision_autogenerate.sh,sha256=yW2i-SBOtBx15Ya0poVQqKkJM5t2JZp06r9AEW-DmGE,46
@@ -103,10 +103,11 @@ arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/get_log_file.p
103
103
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/get_operation.py,sha256=bF2IstPPA2I1v29aoPBHsxlQhWI9bzAWBjGfg8lDUpg,2416
104
104
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/get_operation_allowed_statuses.py,sha256=gRvpuBo60rDpzBhRtS2ElRjHS9KZqKgJQaiSjoY8BZY,1328
105
105
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/get_operation_allowed_types.py,sha256=wACUgyQy4pkVUUKakBUyzxQxW4_3OqA3GShPj5MRWEM,1307
106
+ arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/get_settings.py,sha256=3CgM2vt17RNetUowzQd3ySCsFWXt9ZU4CcVsYZnt9H4,1361
106
107
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/get_sqlalchemy_db_table_name_to_amount.py,sha256=6XFnF-Yv2QajvY7OfPphjDDlOVb5xVz8afY6f_-NqWc,1391
107
108
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/get_story_log.py,sha256=7y2OFyEePVooC6REPII64s_WbEWs3GSltpQLGaBKgQA,2406
108
109
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/init_sqlalchemy_db.py,sha256=PRsYoEfej5qAFspBqqQCDRZXOIwF358QIzh1HuYIDl4,1493
109
- arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/main_router.py,sha256=7je8zr-0j_myHqBsN9DeB5yP6MzFiIUntEhvlu26Z6M,2125
110
+ arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/main_router.py,sha256=hOpea2gHlVkiHaq4M8_y1kNfrjC7RJ1qk6O4D4q19Jw,2243
110
111
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/raise_fake_error.py,sha256=kMr06QR39XVUoVwUuwJHoQmaWHvlfi2j53ZCMX3CU48,1048
111
112
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/reinit_sqlalchemy_db.py,sha256=oZNxVfGP83uM5WKh0-3uJRCYRuxlSJ7lAtRGOBTg0lM,1509
112
113
  arpakitlib/_arpakit_project_template_v_5/project/api/router/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -368,8 +369,8 @@ arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,40
368
369
  arpakitlib/ar_wata_api_client.py,sha256=gdHOqDbuqxhTjVDtRW1DvkRJLdDofCrOq51GTctzLns,242
369
370
  arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
370
371
  arpakitlib/ar_zabbix_api_client_util.py,sha256=AV7yxzG46blyQQDI-is0BwHfzuZlrkiHOkuOpfzQ90A,7934
371
- arpakitlib-1.8.39.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
372
- arpakitlib-1.8.39.dist-info/METADATA,sha256=xHNeRJ9pc9QohSxVp16CwDlxCiayVi7BHEKXBSUUARM,3477
373
- arpakitlib-1.8.39.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
374
- arpakitlib-1.8.39.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
375
- arpakitlib-1.8.39.dist-info/RECORD,,
372
+ arpakitlib-1.8.40.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
373
+ arpakitlib-1.8.40.dist-info/METADATA,sha256=I1OI6_YVvUdCClGTe8qPuTQaKFoQYPfasH6O1jy_YQA,3477
374
+ arpakitlib-1.8.40.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
375
+ arpakitlib-1.8.40.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
376
+ arpakitlib-1.8.40.dist-info/RECORD,,