arpakitlib 1.7.118__py3-none-any.whl → 1.7.119__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.
Files changed (21) hide show
  1. arpakitlib/_arpakit_project_template/src/api/create_api_app.py +8 -51
  2. arpakitlib/_arpakit_project_template/src/api/event.py +51 -2
  3. arpakitlib/_arpakit_project_template/src/api/transmitted_api_data.py +4 -0
  4. arpakitlib/_arpakit_project_template/{manage/settings_check.py → src/core/check_settings.py} +2 -0
  5. arpakitlib/_arpakit_project_template/src/core/generate_settings_env_example.py +16 -0
  6. arpakitlib/_arpakit_project_template/{manage/sqlalchemy_db_reinit.py → src/db/reinit_sqlalchemy_db_for_not_prod.py} +2 -0
  7. arpakitlib/_arpakit_project_template/src/operation_execution/scheduled_operations.py +3 -3
  8. arpakitlib/_arpakit_project_template/src/operation_execution/{start_operation_executor_worker_for_dev.py → start_operation_executor_worker_for_not_prod.py} +2 -1
  9. arpakitlib/_arpakit_project_template/src/operation_execution/{start_scheduled_operation_creator_worker_for_dev.py → start_scheduled_operation_creator_worker_for_not_prod.py} +3 -2
  10. arpakitlib/_arpakit_project_template/src/operation_execution/util.py +5 -3
  11. arpakitlib/ar_fastapi_util.py +0 -33
  12. arpakitlib/ar_settings_util.py +8 -0
  13. {arpakitlib-1.7.118.dist-info → arpakitlib-1.7.119.dist-info}/METADATA +1 -1
  14. {arpakitlib-1.7.118.dist-info → arpakitlib-1.7.119.dist-info}/RECORD +20 -20
  15. arpakitlib/_arpakit_project_template/manage/settings_generate_env_example.py +0 -13
  16. /arpakitlib/_arpakit_project_template/{manage/sqlalchemy_db_check_conn.py → src/db/check_conn_sqlalchemy_db.py} +0 -0
  17. /arpakitlib/_arpakit_project_template/{manage/sqlalchemy_db_init.py → src/db/init_sqlalchemy_db.py} +0 -0
  18. {arpakitlib-1.7.118.dist-info → arpakitlib-1.7.119.dist-info}/LICENSE +0 -0
  19. {arpakitlib-1.7.118.dist-info → arpakitlib-1.7.119.dist-info}/NOTICE +0 -0
  20. {arpakitlib-1.7.118.dist-info → arpakitlib-1.7.119.dist-info}/WHEEL +0 -0
  21. {arpakitlib-1.7.118.dist-info → arpakitlib-1.7.119.dist-info}/entry_points.txt +0 -0
@@ -1,10 +1,7 @@
1
1
  from fastapi import FastAPI
2
2
 
3
- from arpakitlib.ar_base_worker_util import SafeRunInBackgroundModes
4
- from arpakitlib.ar_fastapi_util import create_fastapi_app, InitSqlalchemyDBStartupAPIEvent, InitFileStoragesInDir, \
5
- create_handle_exception, create_story_log_before_response_in_handle_exception, \
6
- SafeRunWorkerStartupAPIEvent
7
- from arpakitlib.ar_operation_execution_util import OperationExecutorWorker, ScheduledOperationCreatorWorker
3
+ from arpakitlib.ar_fastapi_util import create_fastapi_app, \
4
+ create_handle_exception, create_story_log_before_response_in_handle_exception
8
5
  from arpakitlib.ar_sqlalchemy_util import SQLAlchemyDB
9
6
  from arpakitlib.ar_type_util import raise_for_type
10
7
  from src.api.event import StartupAPIEvent, ShutdownAPIEvent
@@ -12,11 +9,9 @@ from src.api.router.main_router import main_api_router
12
9
  from src.api.transmitted_api_data import TransmittedAPIData
13
10
  from src.core.const import STATIC_DIRPATH
14
11
  from src.core.settings import get_cached_settings
15
- from src.core.util import get_cached_media_file_storage_in_dir, \
16
- get_cached_cache_file_storage_in_dir, get_cached_dump_file_storage_in_dir, setup_logging
12
+ from src.core.util import setup_logging, get_cached_media_file_storage_in_dir, get_cached_cache_file_storage_in_dir, \
13
+ get_cached_dump_file_storage_in_dir
17
14
  from src.db.util import get_cached_sqlalchemy_db
18
- from src.operation_execution.operation_executor import OperationExecutor
19
- from src.operation_execution.scheduled_operations import ALL_SCHEDULED_OPERATIONS
20
15
 
21
16
 
22
17
  def create_api_app() -> FastAPI:
@@ -28,7 +23,10 @@ def create_api_app() -> FastAPI:
28
23
 
29
24
  transmitted_api_data = TransmittedAPIData(
30
25
  settings=settings,
31
- sqlalchemy_db=sqlalchemy_db
26
+ sqlalchemy_db=sqlalchemy_db,
27
+ media_file_storage_in_dir=get_cached_media_file_storage_in_dir(),
28
+ cache_file_storage_in_dir=get_cached_cache_file_storage_in_dir(),
29
+ dump_file_storage_in_dir=get_cached_dump_file_storage_in_dir()
32
30
  )
33
31
 
34
32
  funcs_before_response = []
@@ -49,49 +47,8 @@ def create_api_app() -> FastAPI:
49
47
 
50
48
  startup_api_events = []
51
49
 
52
- startup_api_events.append(InitFileStoragesInDir(
53
- file_storages_in_dir=[
54
- get_cached_media_file_storage_in_dir() if settings.media_dirpath is not None else None,
55
- get_cached_cache_file_storage_in_dir() if settings.cache_dirpath is not None else None,
56
- get_cached_dump_file_storage_in_dir() if settings.dump_dirpath is not None else None
57
- ]
58
- ))
59
-
60
- if settings.api_init_sql_db_at_start:
61
- raise_for_type(sqlalchemy_db, SQLAlchemyDB)
62
- startup_api_events.append(InitSqlalchemyDBStartupAPIEvent(sqlalchemy_db=sqlalchemy_db))
63
-
64
50
  startup_api_events.append(StartupAPIEvent(transmitted_api_data=transmitted_api_data))
65
51
 
66
- if settings.api_start_operation_executor_worker:
67
- raise_for_type(sqlalchemy_db, SQLAlchemyDB)
68
- startup_api_events.append(
69
- SafeRunWorkerStartupAPIEvent(
70
- workers=[
71
- OperationExecutorWorker(
72
- sqlalchemy_db=sqlalchemy_db,
73
- operation_executor=OperationExecutor(sqlalchemy_db=sqlalchemy_db),
74
- filter_operation_types=None
75
- )
76
- ],
77
- safe_run_in_background_mode=SafeRunInBackgroundModes.async_task
78
- )
79
- )
80
-
81
- if settings.api_start_scheduled_operation_creator_worker:
82
- raise_for_type(sqlalchemy_db, SQLAlchemyDB)
83
- startup_api_events.append(
84
- SafeRunWorkerStartupAPIEvent(
85
- workers=[
86
- ScheduledOperationCreatorWorker(
87
- sqlalchemy_db=sqlalchemy_db,
88
- scheduled_operations=ALL_SCHEDULED_OPERATIONS
89
- )
90
- ],
91
- safe_run_in_background_mode=SafeRunInBackgroundModes.async_task
92
- )
93
- )
94
-
95
52
  shutdown_api_events = []
96
53
 
97
54
  shutdown_api_events.append(ShutdownAPIEvent(transmitted_api_data=transmitted_api_data))
@@ -1,5 +1,11 @@
1
+ from arpakitlib.ar_base_worker_util import safe_run_worker_in_background, SafeRunInBackgroundModes
1
2
  from arpakitlib.ar_fastapi_util import BaseStartupAPIEvent, BaseShutdownAPIEvent
3
+ from arpakitlib.ar_operation_execution_util import OperationExecutorWorker, ScheduledOperationCreatorWorker
4
+ from arpakitlib.ar_sqlalchemy_util import SQLAlchemyDB
5
+ from arpakitlib.ar_type_util import raise_for_type
2
6
  from src.api.transmitted_api_data import TransmittedAPIData
7
+ from src.operation_execution.operation_executor import OperationExecutor
8
+ from src.operation_execution.scheduled_operations import SCHEDULED_OPERATIONS
3
9
 
4
10
 
5
11
  class StartupAPIEvent(BaseStartupAPIEvent):
@@ -8,7 +14,49 @@ class StartupAPIEvent(BaseStartupAPIEvent):
8
14
  self.transmitted_api_data = transmitted_api_data
9
15
 
10
16
  async def async_on_startup(self, *args, **kwargs):
11
- self._logger.info(self.__class__.__name__)
17
+ self._logger.info("start")
18
+
19
+ if self.transmitted_api_data.media_file_storage_in_dir is not None:
20
+ self.transmitted_api_data.media_file_storage_in_dir.init()
21
+
22
+ if self.transmitted_api_data.cache_file_storage_in_dir is not None:
23
+ self.transmitted_api_data.cache_file_storage_in_dir.init()
24
+
25
+ if self.transmitted_api_data.dump_file_storage_in_dir is not None:
26
+ self.transmitted_api_data.dump_file_storage_in_dir.init()
27
+
28
+ if self.transmitted_api_data.settings.api_init_sql_db_at_start:
29
+ raise_for_type(self.transmitted_api_data.sqlalchemy_db, SQLAlchemyDB)
30
+ self.transmitted_api_data.sqlalchemy_db.init()
31
+
32
+ if self.transmitted_api_data.settings.api_start_operation_executor_worker:
33
+ raise_for_type(self.transmitted_api_data.sqlalchemy_db, SQLAlchemyDB)
34
+ _ = safe_run_worker_in_background(
35
+ worker=OperationExecutorWorker(
36
+ sqlalchemy_db=self.transmitted_api_data.sqlalchemy_db,
37
+ operation_executor=OperationExecutor(sqlalchemy_db=self.transmitted_api_data.sqlalchemy_db),
38
+ filter_operation_types=None,
39
+ startup_funcs=[
40
+ self.transmitted_api_data.sqlalchemy_db.init
41
+ ]
42
+ ),
43
+ mode=SafeRunInBackgroundModes.async_task
44
+ )
45
+
46
+ if self.transmitted_api_data.settings.api_start_scheduled_operation_creator_worker:
47
+ raise_for_type(self.transmitted_api_data.sqlalchemy_db, SQLAlchemyDB)
48
+ _ = safe_run_worker_in_background(
49
+ worker=ScheduledOperationCreatorWorker(
50
+ sqlalchemy_db=self.transmitted_api_data.sqlalchemy_db,
51
+ scheduled_operations=SCHEDULED_OPERATIONS,
52
+ startup_funcs=[
53
+ self.transmitted_api_data.sqlalchemy_db.init
54
+ ]
55
+ ),
56
+ mode=SafeRunInBackgroundModes.async_task
57
+ )
58
+
59
+ self._logger.info("finish")
12
60
 
13
61
 
14
62
  class ShutdownAPIEvent(BaseShutdownAPIEvent):
@@ -17,4 +65,5 @@ class ShutdownAPIEvent(BaseShutdownAPIEvent):
17
65
  self.transmitted_api_data = transmitted_api_data
18
66
 
19
67
  async def async_on_shutdown(self, *args, **kwargs):
20
- self._logger.info(self.__class__.__name__)
68
+ self._logger.info("start")
69
+ self._logger.info("finish")
@@ -1,4 +1,5 @@
1
1
  from arpakitlib.ar_fastapi_util import BaseTransmittedAPIData
2
+ from arpakitlib.ar_file_storage_in_dir_util import FileStorageInDir
2
3
  from arpakitlib.ar_sqlalchemy_util import SQLAlchemyDB
3
4
 
4
5
  from src.core.settings import Settings
@@ -7,3 +8,6 @@ from src.core.settings import Settings
7
8
  class TransmittedAPIData(BaseTransmittedAPIData):
8
9
  settings: Settings
9
10
  sqlalchemy_db: SQLAlchemyDB | None = None
11
+ media_file_storage_in_dir: FileStorageInDir | None = None
12
+ cache_file_storage_in_dir: FileStorageInDir | None = None
13
+ dump_file_storage_in_dir: FileStorageInDir | None = None
@@ -1,8 +1,10 @@
1
1
  from arpakitlib.ar_json_util import safely_transfer_obj_to_json_str
2
2
  from src.core.settings import get_cached_settings
3
+ from src.core.util import setup_logging
3
4
 
4
5
 
5
6
  def command():
7
+ setup_logging()
6
8
  print(safely_transfer_obj_to_json_str(get_cached_settings().model_dump(mode="json")))
7
9
 
8
10
 
@@ -0,0 +1,16 @@
1
+ import os.path
2
+
3
+ from arpakitlib.ar_json_util import safely_transfer_obj_to_json_str
4
+ from src.core.const import BASE_DIRPATH
5
+ from src.core.settings import Settings, get_cached_settings
6
+ from src.core.util import setup_logging
7
+
8
+
9
+ def command():
10
+ setup_logging()
11
+ print(safely_transfer_obj_to_json_str(get_cached_settings().model_dump(mode="json")))
12
+ Settings.save_env_example_to_file(filepath=os.path.join(BASE_DIRPATH, "example.env"))
13
+
14
+
15
+ if __name__ == '__main__':
16
+ command()
@@ -1,9 +1,11 @@
1
+ from src.core.settings import get_cached_settings
1
2
  from src.core.util import setup_logging
2
3
  from src.db.util import get_cached_sqlalchemy_db
3
4
 
4
5
 
5
6
  def command():
6
7
  setup_logging()
8
+ get_cached_settings().raise_if_mode_type_not_prod()
7
9
  get_cached_sqlalchemy_db().reinit()
8
10
 
9
11
 
@@ -4,14 +4,14 @@ from arpakitlib.ar_operation_execution_util import ScheduledOperation, every_tim
4
4
  between_different_times_is_time_func
5
5
  from arpakitlib.ar_sqlalchemy_model_util import BaseOperationTypes
6
6
 
7
- ALL_SCHEDULED_OPERATIONS = []
7
+ SCHEDULED_OPERATIONS = []
8
8
 
9
9
  healthcheck_1_scheduled_operation = ScheduledOperation(
10
10
  type=BaseOperationTypes.healthcheck_,
11
11
  input_data={"healthcheck_1": "healthcheck_1"},
12
12
  is_time_func=every_timedelta_is_time_func(td=timedelta(seconds=15))
13
13
  )
14
- ALL_SCHEDULED_OPERATIONS.append(healthcheck_1_scheduled_operation)
14
+ SCHEDULED_OPERATIONS.append(healthcheck_1_scheduled_operation)
15
15
 
16
16
  healthcheck_2_scheduled_operation = ScheduledOperation(
17
17
  type=BaseOperationTypes.healthcheck_,
@@ -22,4 +22,4 @@ healthcheck_2_scheduled_operation = ScheduledOperation(
22
22
  ),
23
23
  timeout_after_creation=timedelta(seconds=60)
24
24
  )
25
- ALL_SCHEDULED_OPERATIONS.append(healthcheck_2_scheduled_operation)
25
+ SCHEDULED_OPERATIONS.append(healthcheck_2_scheduled_operation)
@@ -9,7 +9,8 @@ def start_operation_executor_worker_for_dev():
9
9
  worker = OperationExecutorWorker(
10
10
  sqlalchemy_db=get_cached_sqlalchemy_db(),
11
11
  operation_executor=OperationExecutor(sqlalchemy_db=get_cached_sqlalchemy_db()),
12
- filter_operation_types=None
12
+ filter_operation_types=None,
13
+ startup_funcs=[lambda: print("hello")]
13
14
  )
14
15
  worker.sync_safe_run()
15
16
 
@@ -1,14 +1,15 @@
1
1
  from arpakitlib.ar_operation_execution_util import ScheduledOperationCreatorWorker
2
2
  from src.core.util import setup_logging
3
3
  from src.db.util import get_cached_sqlalchemy_db
4
- from src.operation_execution.scheduled_operations import ALL_SCHEDULED_OPERATIONS
4
+ from src.operation_execution.scheduled_operations import SCHEDULED_OPERATIONS
5
5
 
6
6
 
7
7
  def start_create_scheduled_operation_worker_for_dev():
8
8
  setup_logging()
9
9
  worker = ScheduledOperationCreatorWorker(
10
10
  sqlalchemy_db=get_cached_sqlalchemy_db(),
11
- scheduled_operations=ALL_SCHEDULED_OPERATIONS
11
+ scheduled_operations=SCHEDULED_OPERATIONS,
12
+ startup_funcs=[lambda: print("hello")]
12
13
  )
13
14
  worker.sync_safe_run()
14
15
 
@@ -1,4 +1,3 @@
1
- from datetime import timedelta
2
1
  from functools import lru_cache
3
2
 
4
3
  from arpakitlib.ar_operation_execution_util import ScheduledOperationCreatorWorker
@@ -6,10 +5,13 @@ from src.db.util import get_cached_sqlalchemy_db
6
5
 
7
6
 
8
7
  def create_scheduled_operation_creator_worker() -> ScheduledOperationCreatorWorker:
9
- from src.operation_execution.scheduled_operations import ALL_SCHEDULED_OPERATIONS
8
+ from src.operation_execution.scheduled_operations import SCHEDULED_OPERATIONS
10
9
  scheduled_operation_creator_worker = ScheduledOperationCreatorWorker(
11
10
  sqlalchemy_db=get_cached_sqlalchemy_db(),
12
- scheduled_operations=ALL_SCHEDULED_OPERATIONS
11
+ scheduled_operations=SCHEDULED_OPERATIONS,
12
+ startup_funcs=[
13
+ get_cached_sqlalchemy_db().init
14
+ ]
13
15
  )
14
16
  return scheduled_operation_creator_worker
15
17
 
@@ -25,10 +25,8 @@ from starlette import status
25
25
  from starlette.middleware.cors import CORSMiddleware
26
26
  from starlette.staticfiles import StaticFiles
27
27
 
28
- from arpakitlib.ar_base_worker_util import BaseWorker, safe_run_worker_in_background
29
28
  from arpakitlib.ar_dict_util import combine_dicts
30
29
  from arpakitlib.ar_enumeration_util import Enumeration
31
- from arpakitlib.ar_file_storage_in_dir_util import FileStorageInDir
32
30
  from arpakitlib.ar_func_util import raise_if_not_async_func, is_async_function, is_async_object
33
31
  from arpakitlib.ar_json_util import safely_transfer_obj_to_json_str_to_json_obj
34
32
  from arpakitlib.ar_logging_util import setup_normal_logging
@@ -431,37 +429,6 @@ class BaseShutdownAPIEvent:
431
429
  self._logger.info("on_shutdown ends")
432
430
 
433
431
 
434
- class InitSqlalchemyDBStartupAPIEvent(BaseStartupAPIEvent):
435
- def __init__(self, sqlalchemy_db: SQLAlchemyDB):
436
- super().__init__()
437
- self.sqlalchemy_db = sqlalchemy_db
438
-
439
- async def async_on_startup(self, *args, **kwargs):
440
- self.sqlalchemy_db.init()
441
-
442
-
443
- class SafeRunWorkerStartupAPIEvent(BaseStartupAPIEvent):
444
- def __init__(self, workers: list[BaseWorker], safe_run_in_background_mode: str):
445
- super().__init__()
446
- self.workers = workers
447
- self.safe_run_in_background_mode = safe_run_in_background_mode
448
-
449
- async def async_on_startup(self, *args, **kwargs):
450
- for worker in self.workers:
451
- _ = safe_run_worker_in_background(worker=worker, mode=self.safe_run_in_background_mode)
452
-
453
-
454
- class InitFileStoragesInDir(BaseStartupAPIEvent):
455
- def __init__(self, file_storages_in_dir: list[FileStorageInDir | None]):
456
- super().__init__()
457
- file_storages_in_dir = [v for v in file_storages_in_dir if v is not None]
458
- self.file_storages_in_dir = file_storages_in_dir
459
-
460
- async def async_on_startup(self, *args, **kwargs):
461
- for file_storage_in_dir in self.file_storages_in_dir:
462
- file_storage_in_dir.init()
463
-
464
-
465
432
  class BaseTransmittedAPIData(BaseModel):
466
433
  model_config = ConfigDict(extra="ignore", arbitrary_types_allowed=True, from_attributes=True)
467
434
 
@@ -40,10 +40,18 @@ class SimpleSettings(BaseSettings):
40
40
  def is_mode_type_not_prod(self) -> bool:
41
41
  return self.mode_type == self.ModeTypes.not_prod
42
42
 
43
+ def raise_if_mode_type_not_prod(self):
44
+ if self.is_mode_type_not_prod:
45
+ raise ValueError(f"mode type = {self.mode_type}")
46
+
43
47
  @property
44
48
  def is_mode_type_prod(self) -> bool:
45
49
  return self.mode_type == self.ModeTypes.prod
46
50
 
51
+ def raise_if_mode_type_prod(self):
52
+ if self.is_mode_type_prod:
53
+ raise ValueError(f"mode type = {self.mode_type}")
54
+
47
55
  @classmethod
48
56
  def generate_env_example(cls) -> str:
49
57
  return generate_env_example(settings_class=cls)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arpakitlib
3
- Version: 1.7.118
3
+ Version: 1.7.119
4
4
  Summary: arpakitlib
5
5
  License: Apache-2.0
6
6
  Keywords: arpakitlib,arpakit,arpakit-company,arpakitcompany,arpakit_company
@@ -61,11 +61,6 @@ arpakitlib/_arpakit_project_template/manage/sandbox/sandbox_6.py,sha256=WdE1IWyO
61
61
  arpakitlib/_arpakit_project_template/manage/sandbox/sandbox_7.py,sha256=WdE1IWyObxVUT9jE3qgNMaFXXkKV6nUI0ZToLT1uhdk,155
62
62
  arpakitlib/_arpakit_project_template/manage/sandbox/sandbox_8.sh,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
63
  arpakitlib/_arpakit_project_template/manage/sandbox/sandbox_9.sh,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
- arpakitlib/_arpakit_project_template/manage/settings_check.py,sha256=T9u9NwmuiyFasXuuomJkrT9Btb3CbnytuftPDn0vkkg,268
65
- arpakitlib/_arpakit_project_template/manage/settings_generate_env_example.py,sha256=BLLeF4JenexXbO1mMj8X-lB81TG3-QTmN4DjPYEUI8o,288
66
- arpakitlib/_arpakit_project_template/manage/sqlalchemy_db_check_conn.py,sha256=wv1N33nTGpsT9nk94OePlOSZ-O9UVKlMfRf8y5UeK1Y,213
67
- arpakitlib/_arpakit_project_template/manage/sqlalchemy_db_init.py,sha256=cBkdDS4i1dbt0HsV6vyTTZvtCXYTfCdkvCHgVFrafUU,207
68
- arpakitlib/_arpakit_project_template/manage/sqlalchemy_db_reinit.py,sha256=YhXC7zwdN3L4MDrNxCaI379M7u27n-BXw5qIAG1uZEE,209
69
64
  arpakitlib/_arpakit_project_template/resource/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
65
  arpakitlib/_arpakit_project_template/resource/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
66
  arpakitlib/_arpakit_project_template/resource/static/healthcheck,sha256=IIO7Wvjwlr2-LPSQ7Y8O35hcI6t0_s8zqITDxkYCO8I,11
@@ -81,8 +76,8 @@ arpakitlib/_arpakit_project_template/src/api/__init__.py,sha256=47DEQpj8HBSa-_TI
81
76
  arpakitlib/_arpakit_project_template/src/api/asgi.py,sha256=a5UBxOyNC8NG3E0ayhiDo3t5tPoB3WtOf2gbZJFWBAA,74
82
77
  arpakitlib/_arpakit_project_template/src/api/auth.py,sha256=dcvj5C9E2F2KCsGZPBBncQf_EvVJAC1qQgnyD8P4ZEw,6
83
78
  arpakitlib/_arpakit_project_template/src/api/const.py,sha256=7d4qD5hedqr7QxVzbfsA7E1bNZn2Pm2U8joXGtpANu0,287
84
- arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=dyQ27STh002v1TJsozJr9dM0r0WOU4jjR3_iaYWkq7w,4685
85
- arpakitlib/_arpakit_project_template/src/api/event.py,sha256=58wCVyVSIe_kydWi44M0Wvp7bTnV8xvO30gMXzjbFYc,750
79
+ arpakitlib/_arpakit_project_template/src/api/create_api_app.py,sha256=1R9nbDOw5Z7Ns5TJMy5MUlyp54VIBQ15oI02V1lHoYo,2758
80
+ arpakitlib/_arpakit_project_template/src/api/event.py,sha256=q_Doo2brHnG14vHapLuDhUiANN5Ofk8KI7u16ZsQMDY,3259
86
81
  arpakitlib/_arpakit_project_template/src/api/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
82
  arpakitlib/_arpakit_project_template/src/api/router/main_router.py,sha256=Yv699WCJDcdiJMXFg1kPTvolqj-NAGoXfqe-vzbMzIU,228
88
83
  arpakitlib/_arpakit_project_template/src/api/router/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -94,24 +89,29 @@ arpakitlib/_arpakit_project_template/src/api/schema/v1/in_.py,sha256=47DEQpj8HBS
94
89
  arpakitlib/_arpakit_project_template/src/api/schema/v1/out.py,sha256=odc-UyxBwUPh4t0H6qIuzAsBA_Qrm3H2qP-YBgJpaKc,164
95
90
  arpakitlib/_arpakit_project_template/src/api/start_api_for_dev.py,sha256=BwROGTR8Hm1ewx_Z0k8HXeql4RIItCdCtP_hmhTT_PM,344
96
91
  arpakitlib/_arpakit_project_template/src/api/start_api_for_dev_with_reload.py,sha256=xg2SFemhe8KmmoYvaG8zkFZyonzxdxcHuugjS3i0q0I,151
97
- arpakitlib/_arpakit_project_template/src/api/transmitted_api_data.py,sha256=YtpATqzN216e76W5QOuzN-Vo6343PVDiHpKWYQ6oqyU,278
92
+ arpakitlib/_arpakit_project_template/src/api/transmitted_api_data.py,sha256=fEWpfjnIrGluDrjgbsJwucQoiXKTP1cUYYORTFKdOJY,531
98
93
  arpakitlib/_arpakit_project_template/src/api/util.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
99
94
  arpakitlib/_arpakit_project_template/src/business_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
95
  arpakitlib/_arpakit_project_template/src/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
+ arpakitlib/_arpakit_project_template/src/core/check_settings.py,sha256=m0fTAAFET2n6iE_rrFrWEHgKuJOKbJfkNRpIGsE69qU,328
101
97
  arpakitlib/_arpakit_project_template/src/core/const.py,sha256=CZZew674y7LhCAlYhvuF5cV4Zb9nQ17j2Tcuj2GEBf4,1232
98
+ arpakitlib/_arpakit_project_template/src/core/generate_settings_env_example.py,sha256=DUfZtJL_iajxdihgPpO1b2Wg9Owe_3AYSUqIlBgCIEI,484
102
99
  arpakitlib/_arpakit_project_template/src/core/settings.py,sha256=Q58I0qHbVCfPtZxGcFKPdFMC8KGWiSR0OsxP_kr4-nc,2378
103
100
  arpakitlib/_arpakit_project_template/src/core/util.py,sha256=5R8gvcZdvuDQes45FBnLC2IDv2Jhajp1VhJJYNKYjMQ,1539
104
101
  arpakitlib/_arpakit_project_template/src/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
102
+ arpakitlib/_arpakit_project_template/src/db/check_conn_sqlalchemy_db.py,sha256=wv1N33nTGpsT9nk94OePlOSZ-O9UVKlMfRf8y5UeK1Y,213
105
103
  arpakitlib/_arpakit_project_template/src/db/const.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
+ arpakitlib/_arpakit_project_template/src/db/init_sqlalchemy_db.py,sha256=cBkdDS4i1dbt0HsV6vyTTZvtCXYTfCdkvCHgVFrafUU,207
105
+ arpakitlib/_arpakit_project_template/src/db/reinit_sqlalchemy_db_for_not_prod.py,sha256=8Mkyi74kkOR58NO7w0Ral2ADGiu6rul0SSIDy9rGQAQ,315
106
106
  arpakitlib/_arpakit_project_template/src/db/sqlalchemy_model.py,sha256=nXtayUkBaVb6tWx5qJgXZLbLOTVAjnSLpSDxBm7yZLc,234
107
107
  arpakitlib/_arpakit_project_template/src/db/util.py,sha256=8Jg9TtTwvyxVYIN_W5_lk9y-Pyh8To1aMRFUKCRDuuA,550
108
108
  arpakitlib/_arpakit_project_template/src/operation_execution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
109
  arpakitlib/_arpakit_project_template/src/operation_execution/const.py,sha256=HjupGEDUWVijQlbzxZPI9vBbAVOETUYzYU9pdnc9IcI,176
110
110
  arpakitlib/_arpakit_project_template/src/operation_execution/operation_executor.py,sha256=TuAlF3QPJq-Zsq693NHQ00dvCWAzuwce2q6ozesWFYY,725
111
- arpakitlib/_arpakit_project_template/src/operation_execution/scheduled_operations.py,sha256=hBPZIOJAX7ym54s2tJ2QRky15FqqDF9r4yTr8Nh2YqI,985
112
- arpakitlib/_arpakit_project_template/src/operation_execution/start_operation_executor_worker_for_dev.py,sha256=uC9KxA3n9ul4YVg2bD4626ikUIv_kLc6TqyUQV_tWtc,626
113
- arpakitlib/_arpakit_project_template/src/operation_execution/start_scheduled_operation_creator_worker_for_dev.py,sha256=qZFXZqdrL_vMSeajwhVFZrWhAlyU9G1PjKYMMgZn4sA,597
114
- arpakitlib/_arpakit_project_template/src/operation_execution/util.py,sha256=WfpeiHS-L6xTIoYI63Xw9mrADTgFJQlt4fG0U4wNAt4,749
111
+ arpakitlib/_arpakit_project_template/src/operation_execution/scheduled_operations.py,sha256=N6erGXOf_Qm3soPzuraMoc1jLXA6M1KfNsp0l4aAWBM,973
112
+ arpakitlib/_arpakit_project_template/src/operation_execution/start_operation_executor_worker_for_not_prod.py,sha256=uY7uI6YCiC86sPJxAHthQywmDfHa1khqWkjJ_Gds2hQ,674
113
+ arpakitlib/_arpakit_project_template/src/operation_execution/start_scheduled_operation_creator_worker_for_not_prod.py,sha256=ZS0SP15aRc3PpSdbTVphfyN2it6BO6cRSkr2Ql17eRE,637
114
+ arpakitlib/_arpakit_project_template/src/operation_execution/util.py,sha256=T2PZONVsvOTqjgPWpKLoqK6hll2IzgI7BmVtMjPFyWI,789
115
115
  arpakitlib/_arpakit_project_template/src/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
116
116
  arpakitlib/_arpakit_project_template/src/test_data/make_test_data_1.py,sha256=3WVPgRsNCIxWpA-6t_Phe-nFULdHPhS1S_DO11XRmqk,80
117
117
  arpakitlib/_arpakit_project_template/src/test_data/make_test_data_2.py,sha256=MVDc71sj5I1muWin50GwrSxMwYtOOSDOtRmeFErHcXs,80
@@ -155,7 +155,7 @@ arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css,sha256=jzPZlgJTFwSdSphk9C
155
155
  arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css.map,sha256=5wq8eXMLU6Zxb45orZPL1zAsBFJReFw6GjYqGpUX3hg,262650
156
156
  arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js,sha256=ffrLZHHEQ_g84A-ul3yWa10Kk09waOAxHcQXPuZuavg,339292
157
157
  arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js.map,sha256=9UhIW7MqCOZPAz1Sl1IKfZUuhWU0p-LJqrnjjJD9Xhc,1159454
158
- arpakitlib/ar_fastapi_util.py,sha256=G3UmPZobcCJzmO0Tw-hCoCVIJLDjAcrhXJqM8A6-DcQ,27573
158
+ arpakitlib/ar_fastapi_util.py,sha256=jpjTmUJKyx8pcOv3UcZsM1r6jPnK5Y7NYDHLm61HQK4,26228
159
159
  arpakitlib/ar_file_storage_in_dir_util.py,sha256=D3e3rGuHoI6xqAA5mVvEpVVpOWY1jyjNsjj2UhyHRbE,3674
160
160
  arpakitlib/ar_file_util.py,sha256=GUdJYm1tUZnYpY-SIPRHAZBHGra8NKy1eYEI0D5AfhY,489
161
161
  arpakitlib/ar_func_util.py,sha256=bCuWbSMoFXBaMNhb89sevj2oaXRk4Jk6Qjot8OXMDT4,1319
@@ -176,7 +176,7 @@ arpakitlib/ar_parse_command.py,sha256=-s61xcATIsfw1eV_iD3xi-grsitbGzSDoAFc5V0OFy
176
176
  arpakitlib/ar_postgresql_util.py,sha256=1AuLjEaa1Lg4pzn-ukCVnDi35Eg1k91APRTqZhIJAdo,945
177
177
  arpakitlib/ar_run_cmd_util.py,sha256=D_rPavKMmWkQtwvZFz-Io5Ak8eSODHkcFeLPzNVC68g,1072
178
178
  arpakitlib/ar_schedule_uust_api_client_util.py,sha256=0Ns0mMEXYEkVmP6YTAXHyNcrhNsvCJ8X-G_5XwILhJ4,6855
179
- arpakitlib/ar_settings_util.py,sha256=eZhZ-zwSataBC07dKp0A5TAOb-RnrzZNHaIx16O6Fv8,1599
179
+ arpakitlib/ar_settings_util.py,sha256=amNtoXhJwf3pnIYWRKwWd38TJ5oTyTS4mhZyQza7Ca8,1881
180
180
  arpakitlib/ar_sleep_util.py,sha256=OaLtRaJQWMkGjfj_mW1RB2P4RaSWsAIH8LUoXqsH0zM,1061
181
181
  arpakitlib/ar_sqlalchemy_model_util.py,sha256=nKJGN32eg3Gn5kmJwHdVJznPT5TydLsfUfwJGdypdUo,6264
182
182
  arpakitlib/ar_sqlalchemy_util.py,sha256=Hcg1THrDsSR_-8dsY1CG3NWPEv0FqCbkPXFXLtjlSJ0,4207
@@ -185,9 +185,9 @@ arpakitlib/ar_str_util.py,sha256=yU5gOwNXUQaH5b_tM5t6fXUn9oUcv5EQbVnq2wXXIpQ,337
185
185
  arpakitlib/ar_type_util.py,sha256=BJ5FcS5Vkj9KFNJgoh0qGLazy-wCubqhND3vle0yOTo,3717
186
186
  arpakitlib/ar_yookassa_api_client_util.py,sha256=sh4fcUkAkdOetFn9JYoTvjcSXP-M1wU04KEY-ECLfLg,5137
187
187
  arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
188
- arpakitlib-1.7.118.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
189
- arpakitlib-1.7.118.dist-info/METADATA,sha256=Wfl5IWVmjo9JCk2Lutv14re4lclwMUIfbPJhQKB-pHs,3176
190
- arpakitlib-1.7.118.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
191
- arpakitlib-1.7.118.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
192
- arpakitlib-1.7.118.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
193
- arpakitlib-1.7.118.dist-info/RECORD,,
188
+ arpakitlib-1.7.119.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
189
+ arpakitlib-1.7.119.dist-info/METADATA,sha256=e3CR_a7ULwtF32_8w3-hD2aUV6gvp_YcUw0Kle-rHsE,3176
190
+ arpakitlib-1.7.119.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
191
+ arpakitlib-1.7.119.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
192
+ arpakitlib-1.7.119.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
193
+ arpakitlib-1.7.119.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- import os.path
2
-
3
- from src.core.const import BASE_DIRPATH
4
- from src.core.settings import Settings
5
-
6
-
7
- def command():
8
- print(Settings.generate_env_example())
9
- Settings.save_env_example_to_file(filepath=os.path.join(BASE_DIRPATH, "example.env"))
10
-
11
-
12
- if __name__ == '__main__':
13
- command()