buildz 0.5.3__tar.gz → 0.5.4__tar.gz

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 (137) hide show
  1. {buildz-0.5.3/buildz.egg-info → buildz-0.5.4}/PKG-INFO +6 -2
  2. {buildz-0.5.3 → buildz-0.5.4}/README.md +4 -0
  3. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/myers/deal.py +2 -2
  4. {buildz-0.5.3 → buildz-0.5.4}/buildz/fz/fio.py +2 -2
  5. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/env_lists.js +5 -0
  6. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/env.py +6 -1
  7. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/xfile.py +4 -2
  8. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/file.py +1 -1
  9. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/lr.py +1 -1
  10. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/strz.py +2 -0
  11. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/mapz.py +32 -0
  12. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/write.py +2 -2
  13. {buildz-0.5.3 → buildz-0.5.4/buildz.egg-info}/PKG-INFO +6 -2
  14. {buildz-0.5.3 → buildz-0.5.4}/setup.py +2 -2
  15. {buildz-0.5.3 → buildz-0.5.4}/LICENSE +0 -0
  16. {buildz-0.5.3 → buildz-0.5.4}/MANIFEST.in +0 -0
  17. {buildz-0.5.3 → buildz-0.5.4}/buildz/__init__.py +0 -0
  18. {buildz-0.5.3 → buildz-0.5.4}/buildz/__main__.py +0 -0
  19. {buildz-0.5.3 → buildz-0.5.4}/buildz/argx.py +0 -0
  20. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/ioc/deal.py +0 -0
  21. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/ioc/help.py +0 -0
  22. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/myers/help.py +0 -0
  23. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/conf/ioc.js +0 -0
  24. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/conf/main.js +0 -0
  25. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/conf/myers.js +0 -0
  26. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/conf/search.js +0 -0
  27. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/conf/xf.js +0 -0
  28. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/help/default.js +0 -0
  29. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/help/ioc.js +0 -0
  30. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/help/myers.js +0 -0
  31. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/help/search.js +0 -0
  32. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/help/xf.js +0 -0
  33. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/res/test.js +0 -0
  34. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/search/deal.py +0 -0
  35. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/search/help.py +0 -0
  36. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/test.py +0 -0
  37. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/xf/deal.py +0 -0
  38. {buildz-0.5.3 → buildz-0.5.4}/buildz/demo/xf/help.py +0 -0
  39. {buildz-0.5.3 → buildz-0.5.4}/buildz/fz/__init__.py +0 -0
  40. {buildz-0.5.3 → buildz-0.5.4}/buildz/fz/dirz.py +0 -0
  41. {buildz-0.5.3 → buildz-0.5.4}/buildz/fz/lsf.py +0 -0
  42. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/__init__.py +0 -0
  43. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/base.py +0 -0
  44. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/init.py +0 -0
  45. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc/base.py +0 -0
  46. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc/conf.py +0 -0
  47. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc/confs.py +0 -0
  48. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/base.py +0 -0
  49. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/call.py +0 -0
  50. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/calls.py +0 -0
  51. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/call_defaults.js +0 -0
  52. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/call_lists.js +0 -0
  53. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/calls_defaults.js +0 -0
  54. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/calls_lists.js +0 -0
  55. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/deal_lists.js +0 -0
  56. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/deals.js +0 -0
  57. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/ioc_lists.js +0 -0
  58. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/join_lists.js +0 -0
  59. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/list_lists.js +0 -0
  60. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/map_lists.js +0 -0
  61. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/mcall_defaults.js +0 -0
  62. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/mcall_lists.js +0 -0
  63. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/obj_cst_lists.js +0 -0
  64. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/obj_defaults.js +0 -0
  65. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/obj_lists.js +0 -0
  66. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/obj_set_lists.js +0 -0
  67. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/ovar_lists.js +0 -0
  68. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/ref_lists.js +0 -0
  69. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/var_lists.js +0 -0
  70. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/xfile_defaults.js +0 -0
  71. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/conf/xfile_lists.js +0 -0
  72. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/deal.py +0 -0
  73. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/demo.py +0 -0
  74. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/ioc.py +0 -0
  75. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/join.py +0 -0
  76. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/list.py +0 -0
  77. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/map.py +0 -0
  78. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/mcall.py +0 -0
  79. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/obj.py +0 -0
  80. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/ovar.py +0 -0
  81. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/ref.py +0 -0
  82. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/val.py +0 -0
  83. {buildz-0.5.3 → buildz-0.5.4}/buildz/ioc/ioc_deal/var.py +0 -0
  84. {buildz-0.5.3 → buildz-0.5.4}/buildz/pyz.py +0 -0
  85. {buildz-0.5.3 → buildz-0.5.4}/buildz/tz/__init__.py +0 -0
  86. {buildz-0.5.3 → buildz-0.5.4}/buildz/tz/myers_diff.py +0 -0
  87. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/__init__.py +0 -0
  88. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/__main__.py +0 -0
  89. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/base.py +0 -0
  90. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/buffer.py +0 -0
  91. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/listz.py +0 -0
  92. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/lr.py +0 -0
  93. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/lrval.py +0 -0
  94. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/mapz.py +0 -0
  95. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/nextz.py +0 -0
  96. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/reval.py +0 -0
  97. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/setz.py +0 -0
  98. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/spc.py +0 -0
  99. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/spt.py +0 -0
  100. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/deal/strz.py +0 -0
  101. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/exp.py +0 -0
  102. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/item.py +0 -0
  103. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/mg.py +0 -0
  104. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loader/pos.py +0 -0
  105. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/base.py +0 -0
  106. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/buffer.py +0 -0
  107. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/listz.py +0 -0
  108. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/lrval.py +0 -0
  109. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/mapz.py +0 -0
  110. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/nextz.py +0 -0
  111. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/reval.py +0 -0
  112. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/setz.py +0 -0
  113. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/spc.py +0 -0
  114. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/deal/spt.py +0 -0
  115. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/exp.py +0 -0
  116. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/item.py +0 -0
  117. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/mg.py +0 -0
  118. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/pos.py +0 -0
  119. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/test.py +0 -0
  120. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/loaderz/test1.py +0 -0
  121. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/read.py +0 -0
  122. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/readz.py +0 -0
  123. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/stack.py +0 -0
  124. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/base.py +0 -0
  125. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/conf.py +0 -0
  126. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/deal/jsonval.py +0 -0
  127. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/deal/listz.py +0 -0
  128. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/deal/mapz.py +0 -0
  129. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/deal/reval.py +0 -0
  130. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/deal/strz.py +0 -0
  131. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/itemz.py +0 -0
  132. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/writer/mg.py +0 -0
  133. {buildz-0.5.3 → buildz-0.5.4}/buildz/xf/xargs.py +0 -0
  134. {buildz-0.5.3 → buildz-0.5.4}/buildz.egg-info/SOURCES.txt +0 -0
  135. {buildz-0.5.3 → buildz-0.5.4}/buildz.egg-info/dependency_links.txt +0 -0
  136. {buildz-0.5.3 → buildz-0.5.4}/buildz.egg-info/top_level.txt +0 -0
  137. {buildz-0.5.3 → buildz-0.5.4}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: buildz
3
- Version: 0.5.3
4
- Summary: a json-base file format's read and write code by python, and codes to read and product object from configure file in such format
3
+ Version: 0.5.4
4
+ Summary: 配置读写(基于json格式进行简化),以及ioc。a json-base file format's read and write code by python, and codes to read and product object from configure file in such format(ioc)
5
5
  Home-page: https://github.com/buildCodeZ/buildz
6
6
  Author: Zzz
7
7
  Author-email: 1309458652@qq.com
@@ -28,6 +28,8 @@ License-File: LICENSE
28
28
 
29
29
  运行python -m buildz查看帮助
30
30
 
31
+ 持续更新中。。。
32
+
31
33
  PS: 对比了下json.loads(修改了下json的scanner.py,让它在纯python下运行,不然json.loads会更快)和目前的xf.loads(buildz.xf.readz.loads)的速度,xf.loads比json.loads慢7倍,可能是读字符串更频繁,方法调用更多(为了代码更结构化和容易修改),其实有一版更慢(buildz.xf.read.loads,废弃代码,后面看情况删掉),慢100倍,因为只考虑结构化,没考虑列表增减开销
32
34
 
33
35
  1, a profile file format base on json, make it easy to write profile file, module is in buildz.xf
@@ -45,5 +47,7 @@ code relationship:
45
47
 
46
48
  run python -m buildz to see help
47
49
 
50
+ continue updating...
51
+
48
52
  PS: testing speed on json.loads(has modified scanner.py in json module to make it purely run on Python, which make it run slower) and xf.loads(real func is buildz.xf.readz.loads), xf.loads takes 7 times longer than json.loads, it may cost by more func calls and more string cutting and reading(to make codes more structuring and easier to update)
49
53
  ```
@@ -15,6 +15,8 @@
15
15
 
16
16
  运行python -m buildz查看帮助
17
17
 
18
+ 持续更新中。。。
19
+
18
20
  PS: 对比了下json.loads(修改了下json的scanner.py,让它在纯python下运行,不然json.loads会更快)和目前的xf.loads(buildz.xf.readz.loads)的速度,xf.loads比json.loads慢7倍,可能是读字符串更频繁,方法调用更多(为了代码更结构化和容易修改),其实有一版更慢(buildz.xf.read.loads,废弃代码,后面看情况删掉),慢100倍,因为只考虑结构化,没考虑列表增减开销
19
21
 
20
22
  1, a profile file format base on json, make it easy to write profile file, module is in buildz.xf
@@ -32,5 +34,7 @@ code relationship:
32
34
 
33
35
  run python -m buildz to see help
34
36
 
37
+ continue updating...
38
+
35
39
  PS: testing speed on json.loads(has modified scanner.py in json module to make it purely run on Python, which make it run slower) and xf.loads(real func is buildz.xf.readz.loads), xf.loads takes 7 times longer than json.loads, it may cost by more func calls and more string cutting and reading(to make codes more structuring and easier to update)
36
40
  ```
@@ -41,7 +41,7 @@ class Deal:
41
41
  stp[-1] = c.decode()
42
42
  stps = "t"+xf.dumps(stps)
43
43
  stps = stps.encode()
44
- fz.write(fp_step, stps)
44
+ fz.write(stps, fp_step)
45
45
  print("done diff")
46
46
  elif opt == 'update':
47
47
  bs1 = fz.read(fp1).decode("utf-8")
@@ -53,7 +53,7 @@ class Deal:
53
53
  else:
54
54
  stps = xf.loads(bs_step.decode())
55
55
  bs2 = tz.m_update(bs1, stps,split=spt).encode("utf-8")
56
- fz.write(fp2, bs2)
56
+ fz.write(bs2, fp2)
57
57
  print("done update")
58
58
  else:
59
59
  print(f"unexpect opt: {opt}")
@@ -20,13 +20,13 @@ def freads(fp, mode = 'rb', size=1024*1024):
20
20
  pass
21
21
  reads=freads
22
22
 
23
- def fwrite(fp, ct, mode = 'wb'):
23
+ def fwrite(ct, fp, mode = 'wb'):
24
24
  with open(fp, mode) as f:
25
25
  f.write(ct)
26
26
 
27
27
  pass
28
28
  write = fwrite
29
- def fwrites(fp, cts, mode = 'wb'):
29
+ def fwrites(cts, fp, mode = 'wb'):
30
30
  with open(fp, mode) as f:
31
31
  for ct in cts:
32
32
  f.write(ct)
@@ -14,5 +14,10 @@
14
14
  {
15
15
  nullable: 0,
16
16
  key: key
17
+ },
18
+ {
19
+ nullable: 1,
20
+ key: default
21
+ default: null
17
22
  }
18
23
  ]
@@ -12,6 +12,7 @@ class EnvDeal(FormatDeal):
12
12
  id: id
13
13
  type: env
14
14
  key: 环境变量key
15
+ default: item_conf //可选
15
16
  }
16
17
  简写:
17
18
  [[id, env], key]
@@ -25,6 +26,10 @@ class EnvDeal(FormatDeal):
25
26
  data = edata.data
26
27
  data = self.fill(data)
27
28
  key = data['key']
28
- return edata.conf.get_env(key)
29
+ val = edata.conf.get_env(key)
30
+ default = xf.g(data, default=None)
31
+ if val is None and default is not None:
32
+ val = self.get_obj(default, edata.conf)
33
+ return val
29
34
 
30
35
  pass
@@ -11,8 +11,8 @@ class XfileDeal(FormatDeal):
11
11
  {
12
12
  id:id
13
13
  type:xfile
14
- filepath: fp
15
- # or fp: fp
14
+ filepath: item_conf(fp)
15
+ # or fp: item_conf(fp)
16
16
  }
17
17
  简写:
18
18
  [[id, xfile], fp]
@@ -20,6 +20,7 @@ class XfileDeal(FormatDeal):
20
20
  [xf, fp]
21
21
  例:
22
22
  [xfile, test.js]
23
+ [xfile, [val, test.js]]
23
24
  """
24
25
  def init(self, fp_lists = None, fp_defaults = None):
25
26
  self.singles = {}
@@ -35,6 +36,7 @@ class XfileDeal(FormatDeal):
35
36
  fp = xf.g(data, filepath=None)
36
37
  if fp is None:
37
38
  fp = xf.g(data, fp = fp)
39
+ fp = self.get_obj(fp, conf)
38
40
  rst = xf.loads(xf.fread(fp))
39
41
  return rst
40
42
 
@@ -40,7 +40,7 @@ def fread_c(filepath, coding = 'utf-8'):
40
40
 
41
41
  pass
42
42
 
43
- def fwrite(filepath, content, mode = 'w'):
43
+ def fwrite(content, filepath, mode = 'w'):
44
44
  with open(filepath, mode) as f:
45
45
  f.write(content)
46
46
 
@@ -14,7 +14,7 @@ class LRDeal(base.BaseDeal):
14
14
  rm = buffer.full().strip()
15
15
  buffer.clean2read(self.ll)
16
16
  if len(rm)>0:
17
- arr.append(item.Item(rm, type="", is_val=False))
17
+ _arr.append(item.Item(rm, type="", is_val=False))
18
18
  while True:
19
19
  cr = buffer.read(self.lr)
20
20
  if cr == self.right:
@@ -71,6 +71,8 @@ class PrevStrDeal(lr.LRDeal):
71
71
  if do_judge and c == self.label_et:
72
72
  mark_et += 1
73
73
  if len(c)==0:
74
+ if self.single_line and self.note:
75
+ break
74
76
  raise Exception(f"unexcept string end while reading str")
75
77
  do_judge = 1
76
78
  if c == self.label_l2:
@@ -4,6 +4,38 @@ def get(obj, key, default=None):
4
4
  return default
5
5
  return obj[key]
6
6
 
7
+ pass
8
+ def getf(obj, key, fc):
9
+ if key not in obj:
10
+ return fc()
11
+ return obj[key]
12
+
13
+ pass
14
+ def gfn(obj, **maps):
15
+ rst = []
16
+ for k in maps:
17
+ if k in obj and obj[k] is not None:
18
+ v = obj[k]
19
+ else:
20
+ v = maps[k]()
21
+ rst.append(v)
22
+ if len(rst)==1:
23
+ rst = rst[0]
24
+ return rst
25
+
26
+ pass
27
+ def gf(obj, **maps):
28
+ rst = []
29
+ for k in maps:
30
+ if k in obj:
31
+ v = obj[k]
32
+ else:
33
+ v = maps[k]()
34
+ rst.append(v)
35
+ if len(rst)==1:
36
+ rst = rst[0]
37
+ return rst
38
+
7
39
  pass
8
40
  def g(obj, **maps):
9
41
  rst = []
@@ -38,9 +38,9 @@ def dumps(obj, bytes = 0, format = 0, deep = 0, json_format= 0):
38
38
 
39
39
  pass
40
40
 
41
- def dumpf(filepath, obj, bytes = 0, format = 0, deep = 0, json_format= 0, mode = 'w'):
41
+ def dumpf(obj, filepath, bytes = 0, format = 0, deep = 0, json_format= 0, mode = 'w'):
42
42
  s = dumps(obj, bytes = bytes, format = format, deep = deep, json_format= json_format)
43
- file.fwrite(filepath, s, mode)
43
+ file.fwrite(s, filepath, mode)
44
44
 
45
45
  pass
46
46
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: buildz
3
- Version: 0.5.3
4
- Summary: a json-base file format's read and write code by python, and codes to read and product object from configure file in such format
3
+ Version: 0.5.4
4
+ Summary: 配置读写(基于json格式进行简化),以及ioc。a json-base file format's read and write code by python, and codes to read and product object from configure file in such format(ioc)
5
5
  Home-page: https://github.com/buildCodeZ/buildz
6
6
  Author: Zzz
7
7
  Author-email: 1309458652@qq.com
@@ -28,6 +28,8 @@ License-File: LICENSE
28
28
 
29
29
  运行python -m buildz查看帮助
30
30
 
31
+ 持续更新中。。。
32
+
31
33
  PS: 对比了下json.loads(修改了下json的scanner.py,让它在纯python下运行,不然json.loads会更快)和目前的xf.loads(buildz.xf.readz.loads)的速度,xf.loads比json.loads慢7倍,可能是读字符串更频繁,方法调用更多(为了代码更结构化和容易修改),其实有一版更慢(buildz.xf.read.loads,废弃代码,后面看情况删掉),慢100倍,因为只考虑结构化,没考虑列表增减开销
32
34
 
33
35
  1, a profile file format base on json, make it easy to write profile file, module is in buildz.xf
@@ -45,5 +47,7 @@ code relationship:
45
47
 
46
48
  run python -m buildz to see help
47
49
 
50
+ continue updating...
51
+
48
52
  PS: testing speed on json.loads(has modified scanner.py in json module to make it purely run on Python, which make it run slower) and xf.loads(real func is buildz.xf.readz.loads), xf.loads takes 7 times longer than json.loads, it may cost by more func calls and more string cutting and reading(to make codes more structuring and easier to update)
49
53
  ```
@@ -7,11 +7,11 @@ from setuptools import setup, find_packages
7
7
 
8
8
  setup(
9
9
  name = 'buildz',
10
- version = '0.5.3',
10
+ version = '0.5.4',
11
11
  keywords='buildz',
12
12
  long_description=open('README.md', 'r', encoding="utf-8").read(),
13
13
  long_description_content_type='text/markdown',
14
- description = "a json-base file format's read and write code by python, and codes to read and product object from configure file in such format",
14
+ description = "配置读写(基于json格式进行简化),以及ioc。a json-base file format's read and write code by python, and codes to read and product object from configure file in such format(ioc)",
15
15
  license = 'Apache License 2.0',
16
16
  url = 'https://github.com/buildCodeZ/buildz',
17
17
  author = 'Zzz',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes