arpakitlib 1.7.49__py3-none-any.whl → 1.7.52__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/src/api/create_api_app.py +2 -2
- arpakitlib/_arpakit_project_template/src/api/router/v1/get_api_error_info.py +13 -2
- arpakitlib/_arpakit_project_template/src/api/router/v1/main_router.py +2 -1
- arpakitlib/ar_fastapi_util.py +2 -2
- {arpakitlib-1.7.49.dist-info → arpakitlib-1.7.52.dist-info}/METADATA +1 -1
- {arpakitlib-1.7.49.dist-info → arpakitlib-1.7.52.dist-info}/RECORD +10 -10
- {arpakitlib-1.7.49.dist-info → arpakitlib-1.7.52.dist-info}/LICENSE +0 -0
- {arpakitlib-1.7.49.dist-info → arpakitlib-1.7.52.dist-info}/NOTICE +0 -0
- {arpakitlib-1.7.49.dist-info → arpakitlib-1.7.52.dist-info}/WHEEL +0 -0
- {arpakitlib-1.7.49.dist-info → arpakitlib-1.7.52.dist-info}/entry_points.txt +0 -0
@@ -2,7 +2,7 @@ from fastapi import FastAPI
|
|
2
2
|
|
3
3
|
from arpakitlib.ar_base_worker_util import BaseWorker
|
4
4
|
from arpakitlib.ar_fastapi_util import create_fastapi_app, InitSqlalchemyDBStartupAPIEvent, InitFileStoragesInDir, \
|
5
|
-
create_handle_exception, create_story_log_before_response_in_handle_exception,
|
5
|
+
create_handle_exception, create_story_log_before_response_in_handle_exception, DEFAULT_CONTACT, \
|
6
6
|
SafeRunWorkerStartupAPIEvent
|
7
7
|
from arpakitlib.ar_operation_execution_util import OperationExecutorWorker, ScheduledOperationCreatorWorker
|
8
8
|
from arpakitlib.ar_sqlalchemy_util import SQLAlchemyDB
|
@@ -97,7 +97,7 @@ def create_api_app() -> FastAPI:
|
|
97
97
|
shutdown_api_events=shutdown_api_events,
|
98
98
|
transmitted_api_data=transmitted_api_data,
|
99
99
|
main_api_router=main_api_router,
|
100
|
-
contact=
|
100
|
+
contact=DEFAULT_CONTACT,
|
101
101
|
media_dirpath=settings.media_dirpath,
|
102
102
|
static_dirpath=STATIC_DIRPATH
|
103
103
|
)
|
@@ -1,13 +1,24 @@
|
|
1
|
+
import fastapi.requests
|
1
2
|
from fastapi import APIRouter
|
3
|
+
from starlette import status
|
2
4
|
|
5
|
+
from arpakitlib.ar_fastapi_util import ErrorSO
|
3
6
|
from src.api.const import APIErrorCodes, APIErrorSpecificationCodes
|
4
7
|
from src.api.schema.v1.out import APIErrorInfoSO
|
5
8
|
|
6
9
|
api_router = APIRouter()
|
7
10
|
|
8
11
|
|
9
|
-
@api_router.get(
|
10
|
-
|
12
|
+
@api_router.get(
|
13
|
+
"/",
|
14
|
+
response_model=APIErrorInfoSO | ErrorSO,
|
15
|
+
status_code=status.HTTP_200_OK
|
16
|
+
)
|
17
|
+
async def _(
|
18
|
+
*,
|
19
|
+
request: fastapi.requests.Request,
|
20
|
+
response: fastapi.responses.Response
|
21
|
+
):
|
11
22
|
return APIErrorInfoSO(
|
12
23
|
api_error_codes=APIErrorCodes.values_list(),
|
13
24
|
api_error_specification_codes=APIErrorSpecificationCodes.values_list()
|
arpakitlib/ar_fastapi_util.py
CHANGED
@@ -613,7 +613,7 @@ def simple_api_router_for_testing():
|
|
613
613
|
return router
|
614
614
|
|
615
615
|
|
616
|
-
|
616
|
+
DEFAULT_CONTACT = {
|
617
617
|
"name": "ARPAKIT Company",
|
618
618
|
"email": "support@arpakit.com"
|
619
619
|
}
|
@@ -636,7 +636,7 @@ def create_fastapi_app(
|
|
636
636
|
setup_normal_logging(log_filepath=log_filepath)
|
637
637
|
|
638
638
|
if contact is None:
|
639
|
-
contact =
|
639
|
+
contact = DEFAULT_CONTACT
|
640
640
|
|
641
641
|
if not startup_api_events:
|
642
642
|
startup_api_events = [BaseStartupAPIEvent()]
|
@@ -74,13 +74,13 @@ 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=
|
77
|
+
arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=yEhwKpgSP0eCewXwEiSlKMtRm7fKOhZt_vhXssIjnUw,4491
|
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
|
81
81
|
arpakitlib/_arpakit_project_template/src/api/router/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
82
|
-
arpakitlib/_arpakit_project_template/src/api/router/v1/get_api_error_info.py,sha256=
|
83
|
-
arpakitlib/_arpakit_project_template/src/api/router/v1/main_router.py,sha256=
|
82
|
+
arpakitlib/_arpakit_project_template/src/api/router/v1/get_api_error_info.py,sha256=fGLBFVExPqh-oBRM3YbuyXR5e_x2bSfkB4rucjUFldo,664
|
83
|
+
arpakitlib/_arpakit_project_template/src/api/router/v1/main_router.py,sha256=fvT-t2c2o6XVVJWiUdNnIWEOE8Q8F4v1Ik1Nae5YqvU,256
|
84
84
|
arpakitlib/_arpakit_project_template/src/api/schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
85
85
|
arpakitlib/_arpakit_project_template/src/api/schema/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
86
86
|
arpakitlib/_arpakit_project_template/src/api/schema/v1/in_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -144,7 +144,7 @@ arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css,sha256=jzPZlgJTFwSdSphk9C
|
|
144
144
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css.map,sha256=5wq8eXMLU6Zxb45orZPL1zAsBFJReFw6GjYqGpUX3hg,262650
|
145
145
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js,sha256=ffrLZHHEQ_g84A-ul3yWa10Kk09waOAxHcQXPuZuavg,339292
|
146
146
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js.map,sha256=9UhIW7MqCOZPAz1Sl1IKfZUuhWU0p-LJqrnjjJD9Xhc,1159454
|
147
|
-
arpakitlib/ar_fastapi_util.py,sha256=
|
147
|
+
arpakitlib/ar_fastapi_util.py,sha256=VA81jgoTAfDzu4UGLB9X5qSeHpiGmWqig12meAA4ZVU,24179
|
148
148
|
arpakitlib/ar_file_storage_in_dir_util.py,sha256=D3e3rGuHoI6xqAA5mVvEpVVpOWY1jyjNsjj2UhyHRbE,3674
|
149
149
|
arpakitlib/ar_file_util.py,sha256=07xCF7paAUP2JUyfpeX0l3N1oCSma7qAcBmrCIZVi3g,452
|
150
150
|
arpakitlib/ar_hash_util.py,sha256=Iqy6KBAOLBQMFLWv676boI5sV7atT2B-fb7aCdHOmIQ,340
|
@@ -173,9 +173,9 @@ arpakitlib/ar_str_util.py,sha256=oCEtQ_TTn35OEz9jCNLjbhopq76JmaifD_iYR-nEJJ4,214
|
|
173
173
|
arpakitlib/ar_type_util.py,sha256=e6Ch8I_B3FMJMj-fiZvTwtGde4hxSa48fGt5g8RlV6I,2301
|
174
174
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=sh4fcUkAkdOetFn9JYoTvjcSXP-M1wU04KEY-ECLfLg,5137
|
175
175
|
arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
|
176
|
-
arpakitlib-1.7.
|
177
|
-
arpakitlib-1.7.
|
178
|
-
arpakitlib-1.7.
|
179
|
-
arpakitlib-1.7.
|
180
|
-
arpakitlib-1.7.
|
181
|
-
arpakitlib-1.7.
|
176
|
+
arpakitlib-1.7.52.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
177
|
+
arpakitlib-1.7.52.dist-info/METADATA,sha256=JlHwwX3e3HDjTu52a-iWi-fQFeojr2O5YlmXJ4JH1_Y,2824
|
178
|
+
arpakitlib-1.7.52.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
|
179
|
+
arpakitlib-1.7.52.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
180
|
+
arpakitlib-1.7.52.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
181
|
+
arpakitlib-1.7.52.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|