arpakitlib 1.8.213__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.
- arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/api/create_api_app.py +6 -2
- arpakitlib/_arpakit_project_template_v_5/project/api/openapi_ui.py +5 -3
- arpakitlib/_arpakit_project_template_v_5/project/core/settings.py +6 -0
- arpakitlib/ar_sqlalchemy_util.py +2 -18
- {arpakitlib-1.8.213.dist-info → arpakitlib-1.8.215.dist-info}/METADATA +1 -1
- {arpakitlib-1.8.213.dist-info → arpakitlib-1.8.215.dist-info}/RECORD +10 -10
- {arpakitlib-1.8.213.dist-info → arpakitlib-1.8.215.dist-info}/LICENSE +0 -0
- {arpakitlib-1.8.213.dist-info → arpakitlib-1.8.215.dist-info}/WHEEL +0 -0
- {arpakitlib-1.8.213.dist-info → arpakitlib-1.8.215.dist-info}/entry_points.txt +0 -0
@@ -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=
|
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(
|
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(
|
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(
|
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"]
|
arpakitlib/ar_sqlalchemy_util.py
CHANGED
@@ -68,7 +68,7 @@ class BaseDBM(DeclarativeBase):
|
|
68
68
|
return self._bus_data
|
69
69
|
|
70
70
|
@classmethod
|
71
|
-
def
|
71
|
+
def get_table_column_names_(
|
72
72
|
cls,
|
73
73
|
*,
|
74
74
|
include_pk: bool = True,
|
@@ -85,7 +85,7 @@ class BaseDBM(DeclarativeBase):
|
|
85
85
|
return result
|
86
86
|
|
87
87
|
@classmethod
|
88
|
-
def
|
88
|
+
def get_sd_property_names(
|
89
89
|
cls,
|
90
90
|
*,
|
91
91
|
prefix: str = "sdp_",
|
@@ -100,22 +100,6 @@ class BaseDBM(DeclarativeBase):
|
|
100
100
|
return [name[len(prefix):] for name in props]
|
101
101
|
return props
|
102
102
|
|
103
|
-
def get_sd_property_names(
|
104
|
-
self,
|
105
|
-
*,
|
106
|
-
prefix: str = "sdp_",
|
107
|
-
remove_prefix: bool = False
|
108
|
-
) -> list[str]:
|
109
|
-
res = []
|
110
|
-
for attr_name in dir(self):
|
111
|
-
if not attr_name.startswith(prefix) or not isinstance(getattr(type(self), attr_name, None), property):
|
112
|
-
continue
|
113
|
-
sd_property_name = attr_name
|
114
|
-
if remove_prefix:
|
115
|
-
sd_property_name = attr_name.removeprefix(prefix)
|
116
|
-
res.append(sd_property_name)
|
117
|
-
return res
|
118
|
-
|
119
103
|
def simple_dict(
|
120
104
|
self,
|
121
105
|
*,
|
@@ -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=
|
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=
|
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=
|
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=
|
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
|
@@ -411,13 +411,13 @@ arpakitlib/ar_schedule_uust_api_client_util.py,sha256=rXI2_3OTaIBgR-GixM1Ti-Ue1f
|
|
411
411
|
arpakitlib/ar_settings_util.py,sha256=Y5wi_cmsjDjfJpM0VJHjbo0NoVPKfypKaD1USowwDtQ,1327
|
412
412
|
arpakitlib/ar_sleep_util.py,sha256=ggaj7ML6QK_ADsHMcyu6GUmUpQ_9B9n-SKYH17h-9lM,1045
|
413
413
|
arpakitlib/ar_sqladmin_util.py,sha256=SEoaowAPF3lhxPsNjwmOymNJ55Ty9rmzvsDm7gD5Ceo,861
|
414
|
-
arpakitlib/ar_sqlalchemy_util.py,sha256=
|
414
|
+
arpakitlib/ar_sqlalchemy_util.py,sha256=CX9Uc2Jri3qxEljRuMvcFjf_SQU5AdJjGBYSheAGWG4,13276
|
415
415
|
arpakitlib/ar_str_util.py,sha256=2lGpnXDf2h1cBZpVf5i1tX_HCv5iBd6IGnrCw4QWWlY,4350
|
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.
|
420
|
-
arpakitlib-1.8.
|
421
|
-
arpakitlib-1.8.
|
422
|
-
arpakitlib-1.8.
|
423
|
-
arpakitlib-1.8.
|
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,,
|
File without changes
|
File without changes
|
File without changes
|