kisa-utils 0.42.8__py3-none-any.whl → 0.42.9__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.
- kisa_utils/config.py +7 -5
- {kisa_utils-0.42.8.dist-info → kisa_utils-0.42.9.dist-info}/METADATA +1 -1
- {kisa_utils-0.42.8.dist-info → kisa_utils-0.42.9.dist-info}/RECORD +5 -5
- {kisa_utils-0.42.8.dist-info → kisa_utils-0.42.9.dist-info}/WHEEL +0 -0
- {kisa_utils-0.42.8.dist-info → kisa_utils-0.42.9.dist-info}/top_level.txt +0 -0
kisa_utils/config.py
CHANGED
|
@@ -13,11 +13,12 @@ def _getTopicPath(topic:str):
|
|
|
13
13
|
|
|
14
14
|
return fout
|
|
15
15
|
def _initTopic(topic:str):
|
|
16
|
-
|
|
17
|
-
if not os.path.isfile(
|
|
18
|
-
|
|
16
|
+
foutPath = _getTopicPath(topic)
|
|
17
|
+
if not os.path.isfile(foutPath):
|
|
18
|
+
with open(foutPath,'wb') as fout:
|
|
19
|
+
pickle.dump({}, fout)
|
|
19
20
|
|
|
20
|
-
return
|
|
21
|
+
return foutPath
|
|
21
22
|
|
|
22
23
|
def _getTopicAndKey(path:str) -> list[str,str]:
|
|
23
24
|
'''
|
|
@@ -39,7 +40,8 @@ def getValue(path:str) -> Any|None:
|
|
|
39
40
|
|
|
40
41
|
topic, key = _getTopicAndKey(path)
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
with open(_initTopic(topic),'rb') as fin:
|
|
44
|
+
return pickle.load(fin).get(key)
|
|
43
45
|
|
|
44
46
|
def setValue(path:str, value:Any) -> bool:
|
|
45
47
|
'''
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
kisa_utils/__init__.py,sha256=-g5gBmI4gV840-Brg1V1aZ_R_r3n_csB-PlRRdUV_UQ,745
|
|
2
2
|
kisa_utils/cache.py,sha256=WOL3e0wvoyESXTtlbVnUg9TYUoLzg64sLP9J4b4ti9k,7377
|
|
3
3
|
kisa_utils/codes.py,sha256=PV_S53Skggf4XetOdYoIKtEmM8cpN5wZwUlxje70WZY,904
|
|
4
|
-
kisa_utils/config.py,sha256=
|
|
4
|
+
kisa_utils/config.py,sha256=vfwka6Wuz80su6_GgjuKhxolnzj1enw8cpgQPYm17l8,2357
|
|
5
5
|
kisa_utils/dataStructures.py,sha256=ZgLpttJ66jfpU1NWzLDD1Czqxzj6sWereffgTQWhlV8,2679
|
|
6
6
|
kisa_utils/dates.py,sha256=JN0vm-7_fOdpzLtondVmpjpWoePPJn4aGK0NkBuyF8I,14142
|
|
7
7
|
kisa_utils/db.py,sha256=fQfvpSJz1A0KFpgXOjo_fyHcLwp9-d9GcDfyH6zhvMY,55788
|
|
@@ -27,7 +27,7 @@ kisa_utils/servers/flask.py,sha256=XZYY1pWnP1mSvaS5Uv8G3EFJV5BJBQtU2gDbO8suvLc,4
|
|
|
27
27
|
kisa_utils/structures/__init__.py,sha256=JBU1j3A42jQ62ALKnsS1Hav9YXcYwjDw1wQJtohXPbU,83
|
|
28
28
|
kisa_utils/structures/utils.py,sha256=665rXIapGwFqejizeJwy3DryeskCQOdgP25BCdLkGvk,2898
|
|
29
29
|
kisa_utils/structures/validator.py,sha256=JhD9jcfbjTwBr_7OfuNaJd_cYr7wR2emFhsCEo5MCHQ,4323
|
|
30
|
-
kisa_utils-0.42.
|
|
31
|
-
kisa_utils-0.42.
|
|
32
|
-
kisa_utils-0.42.
|
|
33
|
-
kisa_utils-0.42.
|
|
30
|
+
kisa_utils-0.42.9.dist-info/METADATA,sha256=ggmPfO1oysfdUkAExab5IOmqtA6pgvrD5O_orx1WzaU,477
|
|
31
|
+
kisa_utils-0.42.9.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
32
|
+
kisa_utils-0.42.9.dist-info/top_level.txt,sha256=GFOLXZYqpBG9xtscGa2uGJAEiZ5NwsqHBH9NylnB29M,11
|
|
33
|
+
kisa_utils-0.42.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|