kcl-lib 0.10.0b2__cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 0.10.2__cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.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.

Potentially problematic release.


This version of kcl-lib might be problematic. Click here for more details.

kcl_lib/api/service.py CHANGED
@@ -50,14 +50,15 @@ from google.protobuf import message as _message
50
50
  class API:
51
51
  """KCL APIs
52
52
 
53
- Examples
54
- --------
53
+ ## Examples
54
+
55
+ Python Code
56
+
55
57
  ```python
56
58
  import kcl_lib.api as api
57
- # Call the `exec_program` method with appropriate arguments
58
59
  args = api.ExecProgram_Args(k_filename_list=["a.k"])
59
- # Usage
60
60
  api = api.API()
61
+
61
62
  result = api.exec_program(args)
62
63
  print(result.yaml_result)
63
64
  ```
@@ -78,10 +79,9 @@ class API:
78
79
 
79
80
  ```python
80
81
  schema AppConfig:
81
- replicas: int
82
-
82
+ replicas: int
83
83
  app: AppConfig {
84
- replicas: 2
84
+ replicas: 2
85
85
  }
86
86
  ```
87
87
 
@@ -109,7 +109,6 @@ class API:
109
109
  ```python
110
110
  schema AppConfig:
111
111
  replicas: int
112
-
113
112
  app: AppConfig {
114
113
  replicas: 2
115
114
  }
@@ -129,7 +128,6 @@ class API:
129
128
 
130
129
  ```python
131
130
  import kcl_lib.api as api
132
-
133
131
  try:
134
132
  args = api.ExecProgram_Args(k_filename_list=["file_not_found"])
135
133
  api = api.API()
@@ -141,12 +139,6 @@ class API:
141
139
  """
142
140
  return self.call("KclvmService.ExecProgram", args)
143
141
 
144
- def build_program(self, args: BuildProgram_Args) -> BuildProgram_Result:
145
- return self.call("KclvmService.BuildProgram", args)
146
-
147
- def exec_artifact(self, args: ExecArtifact_Args) -> ExecProgram_Result:
148
- return self.call("KclvmService.ExecArtifact", args)
149
-
150
142
  def parse_file(self, args: ParseFile_Args) -> ParseFile_Result:
151
143
  """Parse KCL single file to Module AST JSON string with import dependencies and parse errors.
152
144
 
@@ -157,7 +149,6 @@ class API:
157
149
  ```python
158
150
  schema AppConfig:
159
151
  replicas: int
160
-
161
152
  app: AppConfig {
162
153
  replicas: 2
163
154
  }
@@ -187,7 +178,6 @@ class API:
187
178
  ```python
188
179
  schema AppConfig:
189
180
  replicas: int
190
-
191
181
  app: AppConfig {
192
182
  replicas: 2
193
183
  }
@@ -217,7 +207,6 @@ class API:
217
207
  ```python
218
208
  schema AppConfig:
219
209
  replicas: int
220
-
221
210
  app: AppConfig {
222
211
  replicas: 2
223
212
  }
@@ -227,7 +216,6 @@ class API:
227
216
 
228
217
  ```python
229
218
  import kcl_lib.api as api
230
-
231
219
  args = api.LoadPackage_Args(
232
220
  parse_args=api.ParseProgram_Args(paths=["schema.k"]), resolve_ast=True
233
221
  )
@@ -279,7 +267,6 @@ class API:
279
267
  ```python
280
268
  schema AppConfig:
281
269
  replicas: int
282
-
283
270
  app: AppConfig {
284
271
  replicas: 2
285
272
  }
@@ -300,35 +287,18 @@ class API:
300
287
  def format_code(self, args: FormatCode_Args) -> FormatCode_Result:
301
288
  """Format the code source.
302
289
 
303
- <details><summary>Example</summary>
304
- <p>
290
+ ## Example
305
291
 
306
292
  Python Code
307
293
 
308
294
  ```python
309
295
  import kcl_lib.api as api
310
-
311
- source_code = \"\"\"schema Person:
312
- name: str
313
- age: int
314
-
315
- check:
316
- 0 < age < 120
317
- \"\"\"
296
+ source_code = "a = 1"
318
297
  args = api.FormatCode_Args(source=source_code)
319
298
  api_instance = api.API()
320
- result = api_instance.format_code(args)
321
- assert (
322
- result.formatted.decode()
323
- == \"\"\"schema Person:
324
- name: str
325
- age: int
326
-
327
- check:
328
- 0 < age < 120
329
299
 
330
- \"\"\"
331
- )
300
+ result = api_instance.format_code(args)
301
+ assert result.formatted.decode(), "a = 1"
332
302
  ```
333
303
  """
334
304
  return self.call("KclvmService.FormatCode", args)
@@ -344,7 +314,6 @@ class API:
344
314
  schema Person:
345
315
  name: str
346
316
  age: int
347
-
348
317
  check:
349
318
  0 < age < 120
350
319
  ```
@@ -372,7 +341,6 @@ class API:
372
341
  ```python
373
342
  import math
374
343
 
375
- a = 1
376
344
  ```
377
345
 
378
346
  Python Code
@@ -396,7 +364,6 @@ class API:
396
364
 
397
365
  ```python
398
366
  a = 1
399
-
400
367
  b = {
401
368
  "a": 1
402
369
  "b": 2
@@ -441,7 +408,6 @@ class API:
441
408
  ```python
442
409
  schema AppConfig:
443
410
  replicas: int
444
-
445
411
  app: AppConfig {
446
412
  replicas: 2
447
413
  }
@@ -474,7 +440,6 @@ class API:
474
440
  schema Person:
475
441
  name: str
476
442
  age: int
477
-
478
443
  check:
479
444
  0 < age < 120
480
445
  \"\"\"
@@ -510,7 +475,6 @@ class API:
510
475
 
511
476
  ```python
512
477
  import kcl_lib.api as api
513
-
514
478
  args = api.LoadSettingsFiles_Args(
515
479
  work_dir=".", files=["kcl.yaml"]
516
480
  )
@@ -530,9 +494,10 @@ class API:
530
494
 
531
495
  ## Example
532
496
 
533
- The content of `main.k` is
497
+ The content of main.k is
534
498
 
535
499
  ```python
500
+
536
501
  a = 1
537
502
  b = a
538
503
  ```
@@ -541,7 +506,6 @@ class API:
541
506
 
542
507
  ```python
543
508
  import kcl_lib.api as api
544
-
545
509
  args = api.Rename_Args(
546
510
  package_root=".",
547
511
  symbol_path="a",
@@ -563,7 +527,6 @@ class API:
563
527
 
564
528
  ```python
565
529
  import kcl_lib.api as api
566
-
567
530
  args = api.RenameCode_Args(
568
531
  package_root="/mock/path",
569
532
  symbol_path="a",
@@ -619,7 +582,6 @@ class API:
619
582
 
620
583
  ```python
621
584
  import kcl_lib.api as api
622
-
623
585
  args = api.UpdateDependencies_Args(
624
586
  manifest_path="module"
625
587
  )
@@ -651,7 +613,6 @@ class API:
651
613
  ```python
652
614
  import helloworld
653
615
  import flask
654
-
655
616
  a = helloworld.The_first_kcl_program
656
617
  ```
657
618
 
@@ -659,7 +620,6 @@ class API:
659
620
 
660
621
  ```python
661
622
  import kcl_lib.api as api
662
-
663
623
  args = api.UpdateDependencies_Args(
664
624
  manifest_path="module"
665
625
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kcl_lib
3
- Version: 0.10.0b2
3
+ Version: 0.10.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -1,11 +1,11 @@
1
- kcl_lib-0.10.0b2.dist-info/METADATA,sha256=c7OU7CPqGbncM99v69lAdEoJqtbQStfe17ZutIQcg5s,12019
2
- kcl_lib-0.10.0b2.dist-info/WHEEL,sha256=ek2mdeikSA5h-h56cH6b9z5cxEttiWxvUuMwWJ8c5Lk,131
3
- kcl_lib/api/service.py,sha256=m32wPFdDm7OJ8IpxM1fqCQKsMVEvKGLF80H-EOX78e0,23578
1
+ kcl_lib-0.10.2.dist-info/METADATA,sha256=m6I3zS_H3EcvTtmbbtdMXJ33uRfCI21gl4D8sGJzOwo,12017
2
+ kcl_lib-0.10.2.dist-info/WHEEL,sha256=AYHfYb1k_qTBfrqxq2F0UkPllepyLX3xYL6bpdXAWjQ,131
3
+ kcl_lib/plugin/__init__.py,sha256=8n67HzfKI8I2E-OWZmE68ZRh88Jzq-Pc61qAmCdMUj8,125
4
+ kcl_lib/plugin/plugin.py,sha256=shHQS4atDxfctMOinoSUOO6Z568P9xB7BoT_aNn-xOw,2505
5
+ kcl_lib/__init__.py,sha256=3EKn2Bb6NvoajnhLym-yQiobUBgdnj46bhe5u_GYo5A,24
6
+ kcl_lib/api/service.py,sha256=Phgae8NUgsCsnHU9TMpDdOWcL3I-KETJqN53tXFxr-A,22878
4
7
  kcl_lib/api/spec_pb2.py,sha256=aenuWIgVxBbwj5nesgB4cPYPwNPxEnF-Ns8QC16Fap0,28145
5
8
  kcl_lib/api/spec_pb2.pyi,sha256=SICDHsPDw7ygxFvBFUE9wU7BNUHUTkAskHUgMunO7hE,39503
6
9
  kcl_lib/api/__init__.py,sha256=xDhj649QOL-WIXjGyGACSBrUZCZwf51gjUlnsJQNNyI,2865
7
- kcl_lib/__init__.py,sha256=3EKn2Bb6NvoajnhLym-yQiobUBgdnj46bhe5u_GYo5A,24
8
- kcl_lib/plugin/__init__.py,sha256=8n67HzfKI8I2E-OWZmE68ZRh88Jzq-Pc61qAmCdMUj8,125
9
- kcl_lib/plugin/plugin.py,sha256=shHQS4atDxfctMOinoSUOO6Z568P9xB7BoT_aNn-xOw,2505
10
- kcl_lib/_kcl_lib.cpython-312-aarch64-linux-gnu.so,sha256=IZ-IPIy_-yOvyiu8McOsCzGGUUh5N7Bcl1kkYZbf4zw,21689176
11
- kcl_lib-0.10.0b2.dist-info/RECORD,,
10
+ kcl_lib/_kcl_lib.cpython-312-aarch64-linux-gnu.so,sha256=ZhPOYi0XtPFIGYMu4p-BKGwBHsQfL3xVdJqwumi3ZF8,22601048
11
+ kcl_lib-0.10.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.7.1)
2
+ Generator: maturin (1.7.4)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64