arpakitlib 1.6.80__py3-none-any.whl → 1.6.82__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,5 +1,11 @@
1
- mode_type=
2
- log_filename=
3
- log_filepath=
4
- cache_dirname=
5
- cache_dirpath=
1
+ # mode_type=
2
+ # var_dirname=
3
+ # var_dirpath=
4
+ # log_filename=
5
+ # log_filepath=
6
+ # cache_dirname=
7
+ # cache_dirpath=
8
+ # media_dirname=
9
+ # media_dirpath=
10
+ # dump_dirname=
11
+ # dump_dirpath=
@@ -8,6 +8,14 @@ ENV_FILENAME: str = ".env"
8
8
 
9
9
  ENV_FILEPATH: str = os.path.join(BASE_DIRPATH, ENV_FILENAME)
10
10
 
11
+ SRC_DIRNAME: str = "src"
12
+
13
+ SRC_DIRPATH: str = os.path.join(BASE_DIRPATH, SRC_DIRNAME)
14
+
15
+ MANAGE_DIRNAME: str = "manage"
16
+
17
+ MANAGE_DIRPATH: str = os.path.join(BASE_DIRPATH, MANAGE_DIRNAME)
18
+
11
19
  RESOURCE_DIRNAME: str = "resource"
12
20
 
13
21
  RESOURCE_DIRPATH: str = os.path.join(BASE_DIRPATH, RESOURCE_DIRNAME)
@@ -21,6 +29,10 @@ def __example():
21
29
  print(f"BASE_DIRPATH: {BASE_DIRPATH}")
22
30
  print(f"ENV_FILENAME: {ENV_FILENAME}")
23
31
  print(f"ENV_FILEPATH: {ENV_FILEPATH}")
32
+ print(f"SRC_DIRNAME: {SRC_DIRNAME}")
33
+ print(f"SRC_DIRPATH: {SRC_DIRPATH}")
34
+ print(f"MANAGE_DIRNAME: {MANAGE_DIRNAME}")
35
+ print(f"MANAGE_DIRPATH: {MANAGE_DIRPATH}")
24
36
  print(f"RESOURCE_DIRNAME: {RESOURCE_DIRNAME}")
25
37
  print(f"RESOURCE_DIRPATH: {RESOURCE_DIRPATH}")
26
38
  print(f"STATIC_DIRNAME: {STATIC_DIRNAME}")
@@ -8,13 +8,25 @@ from src.core.const import BASE_DIRPATH, ENV_FILEPATH
8
8
 
9
9
 
10
10
  class Settings(SimpleSettings):
11
+ var_dirname: str = "var"
12
+
13
+ var_dirpath: str = os.path.join(BASE_DIRPATH, var_dirname)
14
+
11
15
  log_filename: str = "story.log"
12
16
 
13
- log_filepath: str = os.path.join(BASE_DIRPATH, log_filename)
17
+ log_filepath: str = os.path.join(var_dirpath, log_filename)
14
18
 
15
19
  cache_dirname: str = "cache"
16
20
 
17
- cache_dirpath: str = os.path.join(BASE_DIRPATH, cache_dirname)
21
+ cache_dirpath: str = os.path.join(var_dirpath, cache_dirname)
22
+
23
+ media_dirname: str = "media"
24
+
25
+ media_dirpath: str = os.path.join(var_dirpath, media_dirname)
26
+
27
+ dump_dirname: str = "dump"
28
+
29
+ dump_dirpath: str = os.path.join(var_dirpath, dump_dirname)
18
30
 
19
31
 
20
32
  @lru_cache()
@@ -19,6 +19,24 @@ def get_cache_file_storage_in_dir() -> FileStorageInDir:
19
19
  return create_cache_file_storage_in_dir()
20
20
 
21
21
 
22
+ def create_media_file_storage_in_dir() -> FileStorageInDir:
23
+ return FileStorageInDir(dirpath=get_cached_settings().media_dirpath)
24
+
25
+
26
+ @lru_cache()
27
+ def get_media_file_storage_in_dir() -> FileStorageInDir:
28
+ return create_media_file_storage_in_dir()
29
+
30
+
31
+ def create_dump_file_storage_in_dir() -> FileStorageInDir:
32
+ return FileStorageInDir(dirpath=get_cached_settings().dump_dirpath)
33
+
34
+
35
+ @lru_cache()
36
+ def get_dump_file_storage_in_dir() -> FileStorageInDir:
37
+ return create_dump_file_storage_in_dir()
38
+
39
+
22
40
  def __example():
23
41
  pass
24
42
 
@@ -8,7 +8,7 @@ from arpakitlib.ar_project_template_util import init_arpakit_project_template
8
8
  from arpakitlib.ar_str_util import raise_if_blank
9
9
 
10
10
 
11
- def _arpakitlib_cli(*, full_command: str | None = None):
11
+ def arpakitlib_cli(*, full_command: str | None = None):
12
12
  if full_command is None:
13
13
  full_command = " ".join(sys.argv)
14
14
 
@@ -56,4 +56,4 @@ def _arpakitlib_cli(*, full_command: str | None = None):
56
56
 
57
57
 
58
58
  if __name__ == '__main__':
59
- _arpakitlib_cli(full_command="/arpakitlib -c help")
59
+ arpakitlib_cli(full_command="/arpakitlib -c help")
@@ -10,8 +10,11 @@ from arpakitlib.ar_enumeration_util import Enumeration
10
10
 
11
11
  def generate_env_example(settings_class: Union[BaseSettings, type[BaseSettings]]):
12
12
  res = ""
13
- for k in settings_class.model_fields:
14
- res += f"{k}=\n"
13
+ for k, f in settings_class.model_fields.items():
14
+ if f.default:
15
+ res += f"# {k}=\n"
16
+ else:
17
+ res += f"{k}=\n"
15
18
  return res
16
19
 
17
20
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arpakitlib
3
- Version: 1.6.80
3
+ Version: 1.6.82
4
4
  Summary: arpakitlib
5
5
  Home-page: https://github.com/ARPAKIT-Company/arpakitlib
6
6
  License: Apache-2.0
@@ -1,6 +1,5 @@
1
1
  arpakitlib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- arpakitlib/_ar_arpakitlib_cli.py,sha256=82eFIraGWMj2Phs8wHKKjb6n5sGx_Pf6nabRRj9dnwc,2368
3
- arpakitlib/_arpakit_project_template/.env_example,sha256=IMwmQFJZKztgc-uXQz6YzplVrdFyOs7xLiEfmlLDp8c,69
2
+ arpakitlib/_arpakit_project_template/.env_example,sha256=yxbxCKH_KxjymRGR1V8szwO9E07sN0as9ZaeN7K5L_E,175
4
3
  arpakitlib/_arpakit_project_template/.gitignore,sha256=LVqBflpdgeidDY52su41mFA6a9hClSjNG-O0itRyLFc,496
5
4
  arpakitlib/_arpakit_project_template/.python-version,sha256=XMd40XBnlTFfBSmMldd-7VdqXNyFCy6wtxhw5e1mnhc,7
6
5
  arpakitlib/_arpakit_project_template/AUTHOR.md,sha256=5s2zJB3cHS_hpNBOGXfQPAfS9vuJ8BqZ6c2kNGBtfhc,65
@@ -48,14 +47,15 @@ arpakitlib/_arpakit_project_template/manage/sandbox/sandbox_8.sh,sha256=47DEQpj8
48
47
  arpakitlib/_arpakit_project_template/manage/sandbox/sandbox_9.sh,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
48
  arpakitlib/_arpakit_project_template/pyproject.toml.example,sha256=Cg8VgGbSXsbvCb63cYwYQAb1bDA49IbuIMP5ShxTMK4,486
50
49
  arpakitlib/_arpakit_project_template/resource/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ arpakitlib/_arpakit_project_template/resource/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  arpakitlib/_arpakit_project_template/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  arpakitlib/_arpakit_project_template/src/additional_model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  arpakitlib/_arpakit_project_template/src/additional_model/additional_model.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  arpakitlib/_arpakit_project_template/src/business_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
55
  arpakitlib/_arpakit_project_template/src/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
- arpakitlib/_arpakit_project_template/src/core/const.py,sha256=OWEKJUhrUdINJlPCwgMpcSZs0nNRM5caZRWfcj-nXmU,872
57
- arpakitlib/_arpakit_project_template/src/core/settings.py,sha256=Kk0NqhWTdMqN3UguuTIPtK6lg6HNsXnJypIk2NRBPBA,883
58
- arpakitlib/_arpakit_project_template/src/core/util.py,sha256=94v3h_bKEasd1di_CkAVSdQy4I5FxA5qkUFvtHp3tsQ,724
56
+ arpakitlib/_arpakit_project_template/src/core/const.py,sha256=CZZew674y7LhCAlYhvuF5cV4Zb9nQ17j2Tcuj2GEBf4,1232
57
+ arpakitlib/_arpakit_project_template/src/core/settings.py,sha256=rXtcN5dEG43JjO8fZqOcd-WUbNsvNx22BVQCHWWNSYM,1173
58
+ arpakitlib/_arpakit_project_template/src/core/util.py,sha256=ZZght6efPJT71lpyuopbZWQW-YhbuqekZvkzHVy5xlY,1226
59
59
  arpakitlib/_arpakit_project_template/src/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
60
  arpakitlib/_arpakit_project_template/src/test_data/make_test_data_1.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
61
  arpakitlib/_arpakit_project_template/src/test_data/make_test_data_2.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -67,6 +67,7 @@ arpakitlib/ar_additional_model_util.py,sha256=tNzZhZtvtJ1qC6Cn4UnyoEL58HudfpCdQy
67
67
  arpakitlib/ar_aiogram_util.py,sha256=uodUia6S_tLGVk88JltwRhoT9iMIekOwsrXUnCOzf3g,12526
68
68
  arpakitlib/ar_arpakit_lib_module_util.py,sha256=V_mc3Ml73Tzz3arxmwEfIxruKMyrwbe8XZ9FfVDtUXY,5446
69
69
  arpakitlib/ar_arpakit_schedule_uust_api_client_util.py,sha256=SYWWQDohPnw0qpBIu2hEvGZRVdaI4NUUQdEjnMnseo4,18237
70
+ arpakitlib/ar_arpakitlib_cli.py,sha256=T-YGAL6hRdrT2x3ug33N3GrWLYKSjK25r9SlaiBT7-M,2366
70
71
  arpakitlib/ar_base64_util.py,sha256=aZkg2cZTuAaP2IWeG_LXJ6RO7qhyskVwec-Lks0iM-k,676
71
72
  arpakitlib/ar_base_worker_util.py,sha256=YGoSpkE52QGu_mQdrefThc-pCnhhLEhWchSM3HZL-2U,3972
72
73
  arpakitlib/ar_cache_file_util.py,sha256=Fo2pH-Zqm966KWFBHG_pbiySGZvhIFCYqy7k1weRfJ0,3476
@@ -116,7 +117,7 @@ arpakitlib/ar_postgresql_util.py,sha256=1AuLjEaa1Lg4pzn-ukCVnDi35Eg1k91APRTqZhIJ
116
117
  arpakitlib/ar_project_template_util.py,sha256=Yh3tzNYq0rrKc1MY-qsW1Ljhi9ADz8nYXMiPDH-e6PQ,3097
117
118
  arpakitlib/ar_run_cmd_util.py,sha256=D_rPavKMmWkQtwvZFz-Io5Ak8eSODHkcFeLPzNVC68g,1072
118
119
  arpakitlib/ar_schedule_uust_api_client_util.py,sha256=0X4yACjt8cxMvuoZUq4S0HuVhVUQW5fGmiPcG7vwM8Y,6027
119
- arpakitlib/ar_settings_util.py,sha256=kJ5L2Ik-spgMjMjGZ6ZvPHv6T8dtip1sm-39HI6htvc,1214
120
+ arpakitlib/ar_settings_util.py,sha256=NvFzpIaQhlMp-BZwttUY_9gamMC5cpJk2Kp2B3BtMug,1296
120
121
  arpakitlib/ar_sleep_util.py,sha256=9ZN4Qo4eZ_q3hjM7vNBQjFRcH-9-sqv3QLSjnxVJE90,1405
121
122
  arpakitlib/ar_sqlalchemy_model_util.py,sha256=ttdgOwQfoHTKqgivBtXoSbJoBCASHDjLEFK5tJ9kNNE,4779
122
123
  arpakitlib/ar_sqlalchemy_util.py,sha256=3wejwPbH5VsTZAWvJQ4qQ8tda-PWBmqVThwRyKnyGqo,4153
@@ -125,9 +126,9 @@ arpakitlib/ar_str_util.py,sha256=AhcdrEm-pXRilCaDWCdTfVkQSy0SnbE52ur43Ltr6cI,212
125
126
  arpakitlib/ar_type_util.py,sha256=5nDnXL5Oyozlg8XvxMrogsoYiG8_atItg46A0mtv-pk,2025
126
127
  arpakitlib/ar_yookassa_api_client_util.py,sha256=5GMvu8paByni8buhc1vpHB7n6oXe0gPfj1LSvnyZCrQ,5307
127
128
  arpakitlib/ar_zabbix_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
128
- arpakitlib-1.6.80.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
129
- arpakitlib-1.6.80.dist-info/METADATA,sha256=VCuqFGNPAu_S-wjy1OCltk_H2A11m8pJB3tPMEmArJA,2739
130
- arpakitlib-1.6.80.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
131
- arpakitlib-1.6.80.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
132
- arpakitlib-1.6.80.dist-info/entry_points.txt,sha256=RybYAcp2JEzQ3o5n9uFS4Ul3IKDx4Iojp63Wp6nbj04,76
133
- arpakitlib-1.6.80.dist-info/RECORD,,
129
+ arpakitlib-1.6.82.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
130
+ arpakitlib-1.6.82.dist-info/METADATA,sha256=1HBtB90q1j5HwDuJ_7jscK9WbeTXbknp8dMMf5wd4Ag,2739
131
+ arpakitlib-1.6.82.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
132
+ arpakitlib-1.6.82.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
133
+ arpakitlib-1.6.82.dist-info/entry_points.txt,sha256=VHkTDXDOMrgcNzGfKhEhoOIIz6T8Kkt46hy95Zc1iL0,74
134
+ arpakitlib-1.6.82.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ arpakitlib=arpakitlib.ar_arpakitlib_cli:arpakitlib_cli
3
+
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- arpakitlib=arpakitlib._ar_arpakitlib_cli:_arpakitlib_cli
3
-