arpakitlib 1.7.256__py3-none-any.whl → 1.7.257__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.
@@ -19,6 +19,7 @@ def init_arpakit_project_template(
19
19
  only_paths_startswith: list[str] | str | None = None,
20
20
  params: dict[str, str] | None = None,
21
21
  ):
22
+ raise_for_type(project_dirpath, str)
22
23
  raise_if_string_blank(project_dirpath)
23
24
 
24
25
  raise_for_type(overwrite_if_exists, bool)
@@ -31,11 +32,13 @@ def init_arpakit_project_template(
31
32
  ignore_paths_startswith = [ignore_paths_startswith]
32
33
  if ignore_paths_startswith is None:
33
34
  ignore_paths_startswith = []
35
+ raise_for_type(ignore_paths_startswith, list)
34
36
 
35
37
  if isinstance(only_paths_startswith, str):
36
38
  only_paths_startswith = [only_paths_startswith]
37
39
  if only_paths_startswith is None:
38
40
  only_paths_startswith = []
41
+ raise_for_type(only_paths_startswith, list)
39
42
 
40
43
  def _generate_filepath_to_content() -> dict[str, str]:
41
44
  arpakit_project_template_dirpath = os.path.join(
@@ -5,7 +5,6 @@ import sys
5
5
  from arpakitlib.ar_arpakit_project_template_util import init_arpakit_project_template
6
6
  from arpakitlib.ar_need_type_util import parse_need_type, NeedTypes
7
7
  from arpakitlib.ar_parse_command import parse_command
8
- from arpakitlib.ar_str_util import raise_if_string_blank
9
8
 
10
9
  _ARPAKIT_LIB_MODULE_VERSION = "3.0"
11
10
 
@@ -27,6 +26,7 @@ def execute_arpakitlib_cli(*, full_command: str | None = None):
27
26
  print("Commands:")
28
27
  print()
29
28
  print("-c init_arpakit_project_template")
29
+ print("-project_dirpath ./")
30
30
  print("-overwrite_if_exists ...")
31
31
  print("-ignore_paths_startswith ...")
32
32
  print("-only_paths_startswith ...")
@@ -36,13 +36,16 @@ def execute_arpakitlib_cli(*, full_command: str | None = None):
36
36
  print("\n")
37
37
 
38
38
  elif command == "init_arpakit_project_template":
39
- project_dirpath = raise_if_string_blank(parsed_command.get_value_by_keys(keys=["project_dirpath"]))
39
+ project_dirpath: str = parse_need_type(
40
+ value=parsed_command.get_value_by_keys(keys=["project_dirpath"]),
41
+ need_type=NeedTypes.str_,
42
+ allow_none=False
43
+ )
40
44
  overwrite_if_exists: bool = parse_need_type(
41
45
  value=parsed_command.get_value_by_keys(keys=["overwrite_if_exists"]),
42
46
  need_type=NeedTypes.bool_,
43
47
  allow_none=False
44
48
  )
45
- params = parsed_command.key_to_value
46
49
  ignore_paths_startswith: list[str] | None = parse_need_type(
47
50
  value=parsed_command.get_value_by_keys(keys=["ignore_paths_startswith"]),
48
51
  need_type=NeedTypes.list_of_str,
@@ -58,7 +61,7 @@ def execute_arpakitlib_cli(*, full_command: str | None = None):
58
61
  overwrite_if_exists=overwrite_if_exists,
59
62
  ignore_paths_startswith=ignore_paths_startswith,
60
63
  only_paths_startswith=only_paths_startswith,
61
- params=params,
64
+ params=parsed_command.key_to_value,
62
65
  )
63
66
 
64
67
  else:
@@ -23,6 +23,9 @@ def parse_need_type(value: Any, need_type: str, allow_none: bool = False) -> Any
23
23
  if allow_none and value is None:
24
24
  return None
25
25
 
26
+ if not allow_none and value is None:
27
+ raise ValueError("value is None")
28
+
26
29
  NeedTypes.parse_and_validate_values(need_type)
27
30
 
28
31
  if need_type == NeedTypes.str_:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arpakitlib
3
- Version: 1.7.256
3
+ Version: 1.7.257
4
4
  Summary: arpakitlib
5
5
  License: Apache-2.0
6
6
  Keywords: arpakitlib,arpakit,arpakit-company,arpakitcompany,arpakit_company
@@ -85,11 +85,10 @@ poetry add arpakitlib
85
85
  pip install arpakitlib
86
86
  ```
87
87
 
88
- ### Init template
88
+ ### arpakitlib command
89
89
 
90
90
  ```
91
- # poetry run arpakitlib -c help
92
- poetry run arpakitlib -c init_arpakit_project_template -project_dirpath ./ -overwrite_if_exists true -project_name ... -sql_db_port ... (optional) -api_port ... (optional) -ignore_paths_startswith ... (optional) -only_paths_startswith ...(optional)
91
+ poetry run arpakitlib -c help
93
92
  ```
94
93
 
95
94
  ---
@@ -158,10 +158,10 @@ arpakitlib/ar_additional_model_util.py,sha256=GFg-glLCxH9X95R2bhTJsscVwv37FgE1qb
158
158
  arpakitlib/ar_aiogram_util.py,sha256=fDrca_IT-REDQLVVAwFYPyPZtNWZrJxGKdT1H6gh5Pc,12590
159
159
  arpakitlib/ar_api_key_util.py,sha256=E84JlJXiDHtxLQmV8BNHvqNKu_G8-Dox0XxknYJQ37Q,422
160
160
  arpakitlib/ar_arpakit_lib_module_util.py,sha256=g9uWwTK2eEzmErqwYeVgXDYVMREN8m5CdmgEumAEQfw,5919
161
- arpakitlib/ar_arpakit_project_template_util.py,sha256=-phQspU13prZQcHuifGhvgS4pwF66t0wg5HImYw03UM,3241
161
+ arpakitlib/ar_arpakit_project_template_util.py,sha256=gqFfNUEvfBYHS33J65OIWUGirwTTFtUCemSVEFPWIYU,3380
162
162
  arpakitlib/ar_arpakit_schedule_uust_api_client_util.py,sha256=_T_HeDCy2EwbYw0q5FnCJngU2fAZYMNd25gEtmagJN0,15813
163
163
  arpakitlib/ar_arpakit_schedule_uust_site_util.py,sha256=8wLct9Gd4MWkXzB6nSmETAwTPLw8lfpWgx0LoWSAOvg,1643
164
- arpakitlib/ar_arpakitlib_cli_util.py,sha256=h1QH7tIKWgiDdWRQx_51rhxSyY3wdHRXBfbu5C_AZiQ,2512
164
+ arpakitlib/ar_arpakitlib_cli_util.py,sha256=Z2Y8DnNcdaCecKuQk4JXHBmprRLZPZ-pCgb3uz1U2as,2563
165
165
  arpakitlib/ar_base64_util.py,sha256=aZkg2cZTuAaP2IWeG_LXJ6RO7qhyskVwec-Lks0iM-k,676
166
166
  arpakitlib/ar_base_worker_util.py,sha256=oIwJVqn8u3vEX7YlFZBHJYUGoYKhBnrgLDDpA3oId2w,5525
167
167
  arpakitlib/ar_blank_util.py,sha256=6O54Z8NnCg8BXxUVWt-oo1kqzt0836k9KJeJofwmj0g,113
@@ -208,7 +208,7 @@ arpakitlib/ar_list_of_dicts_to_xlsx.py,sha256=MyjEl4Jl4beLVZqLVQMMv0-XDtBD3Xh4Z_
208
208
  arpakitlib/ar_list_util.py,sha256=2woOAHAU8oTIiVjZ8GLnx15odEaoQUq3Q0JPxlufFF0,457
209
209
  arpakitlib/ar_logging_util.py,sha256=V4jypypFG1cj4nXae7JiBnRRfm02OTnZSEermx-wlDY,1668
210
210
  arpakitlib/ar_mongodb_util.py,sha256=2ECkTnGAZ92qxioL-fmN6R4yZOSr3bXdXLWTzT1C3vk,4038
211
- arpakitlib/ar_need_type_util.py,sha256=GETiREPMEYhch-yU6T--Bdawlbb04Jp1Qy7cOsUlIeA,2228
211
+ arpakitlib/ar_need_type_util.py,sha256=l4ky_15KKwqgYf2WTgEaKfBI15jZbnszOeQjwC0YUmk,2312
212
212
  arpakitlib/ar_openai_api_client_util.py,sha256=_XmlApvHFMSyjvZydPa_kASIt9LsFrZmSC7YEzIG8Bg,1806
213
213
  arpakitlib/ar_operation_execution_util.py,sha256=cBqxwVFsnG9d7vxR9bNBV9cYoX1kAhxA8jl_pta0neM,18012
214
214
  arpakitlib/ar_parse_command.py,sha256=-s61xcATIsfw1eV_iD3xi-grsitbGzSDoAFc5V0OFy4,3447
@@ -229,8 +229,8 @@ arpakitlib/ar_type_util.py,sha256=9C3ErtUVs0tAUqtK-foFzjJOykfBOntfCz2IogDOgfA,41
229
229
  arpakitlib/ar_wata_api_client.py,sha256=gdHOqDbuqxhTjVDtRW1DvkRJLdDofCrOq51GTctzLns,242
230
230
  arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
231
231
  arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
232
- arpakitlib-1.7.256.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
233
- arpakitlib-1.7.256.dist-info/METADATA,sha256=ybVGWMXd9ESVICaXZgAa8i2s1HSsqFirMtSrCuiPqjs,3386
234
- arpakitlib-1.7.256.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
235
- arpakitlib-1.7.256.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
236
- arpakitlib-1.7.256.dist-info/RECORD,,
232
+ arpakitlib-1.7.257.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
233
+ arpakitlib-1.7.257.dist-info/METADATA,sha256=AtaeQJYrLd6u6Hw994mzLUzVrNpmxqORQjQSGIjq9Sc,3140
234
+ arpakitlib-1.7.257.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
235
+ arpakitlib-1.7.257.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
236
+ arpakitlib-1.7.257.dist-info/RECORD,,