arpakitlib 1.8.214__py3-none-any.whl → 1.8.215__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": "51"
3
+ "arpakitlib_project_template_subversion": "52"
4
4
  }
@@ -28,7 +28,7 @@ def create_api_app(*, prefix: str = "/api") -> FastAPI:
28
28
  version=get_cached_settings().api_version,
29
29
  docs_url=None,
30
30
  redoc_url=None,
31
- openapi_url="/openapi",
31
+ openapi_url=get_cached_settings().api_openapi_url,
32
32
  on_startup=get_startup_api_events(),
33
33
  on_shutdown=get_shutdown_api_events(),
34
34
  contact={
@@ -46,7 +46,11 @@ def create_api_app(*, prefix: str = "/api") -> FastAPI:
46
46
  allow_headers=["*"],
47
47
  )
48
48
 
49
- add_local_openapi_ui_to_api_app(app=api_app)
49
+ add_local_openapi_ui_to_api_app(
50
+ app=api_app,
51
+ docs_url=get_cached_settings().api_docs_url,
52
+ redoc_url=get_cached_settings().api_redoc_url
53
+ )
50
54
 
51
55
  add_exception_handler_to_api_app(app=api_app)
52
56
 
@@ -4,9 +4,11 @@ from fastapi.openapi.docs import get_swagger_ui_html, get_redoc_html
4
4
 
5
5
  def add_local_openapi_ui_to_api_app(
6
6
  *,
7
- app: FastAPI
7
+ app: FastAPI,
8
+ docs_url: str = "/docs",
9
+ redoc_url: str = "/redocs",
8
10
  ):
9
- @app.get("/docs", include_in_schema=False)
11
+ @app.get(docs_url, include_in_schema=False)
10
12
  async def custom_swagger_ui_html():
11
13
  return get_swagger_ui_html(
12
14
  openapi_url=app.openapi_url,
@@ -16,7 +18,7 @@ def add_local_openapi_ui_to_api_app(
16
18
  swagger_favicon_url="/static/openapi-favicon.png"
17
19
  )
18
20
 
19
- @app.get("/redoc", include_in_schema=False)
21
+ @app.get(redoc_url, include_in_schema=False)
20
22
  async def custom_redoc_html():
21
23
  return get_redoc_html(
22
24
  openapi_url=app.openapi_url,
@@ -123,6 +123,12 @@ class Settings(SimpleSettings):
123
123
 
124
124
  api_workers: int = 4
125
125
 
126
+ api_docs_url: str = "/secret/docs"
127
+
128
+ api_redoc_url: str = "/secret/redoc"
129
+
130
+ api_openapi_url: str = "/secret/openapi"
131
+
126
132
  sqladmin_secret_key: str | None = "85a9583cb91c4de7a78d7eb1e5306a04418c9c43014c447ea8ec8dd5deb4cf71"
127
133
 
128
134
  sqladmin_authorize_keys: list[str] | None = ["1"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arpakitlib
3
- Version: 1.8.214
3
+ Version: 1.8.215
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=E78ase9v3t6Ljp5fkVnVXt9Qr8KSD5CzSDu8mzmLcLQ,98
11
+ arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json,sha256=IFyJL9VUoIuOAYeuLFLptd5jQMJjnRqfWOrkib9CM8E,98
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
@@ -89,12 +89,12 @@ arpakitlib/_arpakit_project_template_v_5/project/api/blank/admin.py,sha256=ii1zL
89
89
  arpakitlib/_arpakit_project_template_v_5/project/api/blank/client.py,sha256=rvJKtAB26Qy2pKVSHSMUM_70oI4v8Yr6Vmpr6r4EzNk,101
90
90
  arpakitlib/_arpakit_project_template_v_5/project/api/blank/common.py,sha256=ug1FylE_CVC5eij-u4nh-IHNO-gwkbBGo5KgyWDujC8,91
91
91
  arpakitlib/_arpakit_project_template_v_5/project/api/const.py,sha256=J9bqaRRiIc3RLn6SJTvdfDvFrSsM_Ixii9t2M8dA5Jc,433
92
- arpakitlib/_arpakit_project_template_v_5/project/api/create_api_app.py,sha256=7lJim1RcHOr-vSobSOmO40qTZqtZtsf0C3OUOYnG1zc,2922
92
+ arpakitlib/_arpakit_project_template_v_5/project/api/create_api_app.py,sha256=rmD0F-9SpbGsDGi5PzVVFF6paoYLyKasPh6qw2RxTNY,3071
93
93
  arpakitlib/_arpakit_project_template_v_5/project/api/create_first_data.py,sha256=BgqmD-7gXQ_zoz3ATqVacQzkg9lbvKnCSvQxm0M0Vxw,1824
94
94
  arpakitlib/_arpakit_project_template_v_5/project/api/event.py,sha256=P8gV2Bq6LeLH0JDN9Z3O401PMbyNr2n-tme2gPvT-m4,996
95
95
  arpakitlib/_arpakit_project_template_v_5/project/api/exception.py,sha256=OkvjuJZx-rZfHisKwgeaI-cxzNNPeKgkRi9a_x7Jdbw,1415
96
96
  arpakitlib/_arpakit_project_template_v_5/project/api/exception_handler.py,sha256=AqT5l_GyTMWZsW-eI4ZD5FU4zMR0HKhsxsMX3p2KukY,11535
97
- arpakitlib/_arpakit_project_template_v_5/project/api/openapi_ui.py,sha256=PLhH-W6zDViO-75AGCs8Vq3IoyHChdqwBYAqLvdQN0U,904
97
+ arpakitlib/_arpakit_project_template_v_5/project/api/openapi_ui.py,sha256=7yg9ZNu6BjTAregnfbRFpwvqa-gTIY6o6NCz5pmsbeo,976
98
98
  arpakitlib/_arpakit_project_template_v_5/project/api/response.py,sha256=xZMymP2BuQaRNVWLeIp3UgUUo-MFN8MJnsn9Al4vOb8,1028
99
99
  arpakitlib/_arpakit_project_template_v_5/project/api/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
100
  arpakitlib/_arpakit_project_template_v_5/project/api/router/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -183,7 +183,7 @@ arpakitlib/_arpakit_project_template_v_5/project/core/dump_file_storage_in_dir.p
183
183
  arpakitlib/_arpakit_project_template_v_5/project/core/easy_openai_api_client.py,sha256=ssQ8Ju6CBQeXSOa_lfLaqycSf0a-NIj6ucOhEsPseVc,1141
184
184
  arpakitlib/_arpakit_project_template_v_5/project/core/jinja2_templates.py,sha256=jCNLaBauGC7YNvZdTLNHuPp7hmRGt94O23Skg6ewo7o,352
185
185
  arpakitlib/_arpakit_project_template_v_5/project/core/media_file_storage_in_dir.py,sha256=fMofTsfJtA8pp5lEUhucEUu3PBsmj-elaRZzExDsdLI,623
186
- arpakitlib/_arpakit_project_template_v_5/project/core/settings.py,sha256=3CouqCjoStxMeNUDF8y-fjMcNXAryZ4ILXviUod3-Z0,6658
186
+ arpakitlib/_arpakit_project_template_v_5/project/core/settings.py,sha256=aGwbB6skNOKT0z2vjQVAesfGMXi2Yclbrkw0HbACWuQ,6786
187
187
  arpakitlib/_arpakit_project_template_v_5/project/core/setup_logging.py,sha256=7VRejVMUNeR-MywrVw7B1RxVkIBHwVNQJFC4wlpBJco,1497
188
188
  arpakitlib/_arpakit_project_template_v_5/project/core/util.py,sha256=iCwpuRqr6TfW0sKVH-3asQjhueJuad3ffq6sPI6ZUrs,347
189
189
  arpakitlib/_arpakit_project_template_v_5/project/emailer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -416,8 +416,8 @@ arpakitlib/ar_str_util.py,sha256=2lGpnXDf2h1cBZpVf5i1tX_HCv5iBd6IGnrCw4QWWlY,435
416
416
  arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,4049
417
417
  arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
418
418
  arpakitlib/clone_pydantic_model_fields.py,sha256=Gn9_AIjKknN1eIYK_xH_cMyff3hjOpfwRqs583-rnJs,1167
419
- arpakitlib-1.8.214.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
420
- arpakitlib-1.8.214.dist-info/METADATA,sha256=9QC3jZfo0MVF9gZ8WQVwZVaSccgDIC7eJhF49hE51Ck,3741
421
- arpakitlib-1.8.214.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
422
- arpakitlib-1.8.214.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
423
- arpakitlib-1.8.214.dist-info/RECORD,,
419
+ arpakitlib-1.8.215.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
420
+ arpakitlib-1.8.215.dist-info/METADATA,sha256=jHca9GY9lhfzCk8iIAl0Vpf9pNTgmWt73oaz6fzlvhM,3741
421
+ arpakitlib-1.8.215.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
422
+ arpakitlib-1.8.215.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
423
+ arpakitlib-1.8.215.dist-info/RECORD,,