kisa-utils 0.37.17__py3-none-any.whl → 0.37.18__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/db.py +3 -3
- kisa_utils/structures/utils.py +10 -4
- {kisa_utils-0.37.17.dist-info → kisa_utils-0.37.18.dist-info}/METADATA +1 -1
- {kisa_utils-0.37.17.dist-info → kisa_utils-0.37.18.dist-info}/RECORD +6 -6
- {kisa_utils-0.37.17.dist-info → kisa_utils-0.37.18.dist-info}/WHEEL +0 -0
- {kisa_utils-0.37.17.dist-info → kisa_utils-0.37.18.dist-info}/top_level.txt +0 -0
kisa_utils/db.py
CHANGED
|
@@ -1208,7 +1208,7 @@ class Table:
|
|
|
1208
1208
|
@enforceRequirements
|
|
1209
1209
|
def __init__(
|
|
1210
1210
|
self,
|
|
1211
|
-
name: Value(str, lambda n: Ok() if n and ' ' not in n and not n[0].isdigit() else Error('invalid column name given')),
|
|
1211
|
+
name: Value(str, lambda n: Ok() if (n and ' ' not in n and not n[0].isdigit()) else Error('invalid column name given')),
|
|
1212
1212
|
/,
|
|
1213
1213
|
*,
|
|
1214
1214
|
trackChanges: bool = False, # if set to True, all changes/updates
|
|
@@ -1227,9 +1227,9 @@ class Table:
|
|
|
1227
1227
|
'''
|
|
1228
1228
|
pass
|
|
1229
1229
|
|
|
1230
|
-
# Column('ab', int)
|
|
1231
|
-
|
|
1232
1230
|
# ------------------------------------------------------------------------------
|
|
1233
1231
|
if __name__=='__main__':
|
|
1232
|
+
# Column('ab', int)
|
|
1233
|
+
|
|
1234
1234
|
with Api('/tmp/bukman/database.db2') as handle:
|
|
1235
1235
|
print(handle.fetch('keys',['*'],'',[]))
|
kisa_utils/structures/utils.py
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import inspect
|
|
2
2
|
import typing
|
|
3
|
-
from typing import Any, Callable, get_origin, Generic
|
|
3
|
+
from typing import Any, Callable, get_origin, Generic, overload
|
|
4
4
|
from types import UnionType
|
|
5
5
|
from kisa_utils.response import Response
|
|
6
6
|
|
|
7
|
-
from typing import ParamSpec, TypeVar
|
|
7
|
+
from typing import ParamSpec, TypeVar, Type
|
|
8
8
|
P = ParamSpec('P')
|
|
9
9
|
T = TypeVar('T')
|
|
10
10
|
|
|
11
11
|
class Value(Generic[T]):
|
|
12
|
-
|
|
12
|
+
@overload
|
|
13
|
+
def __init__(self, valueType:Type[T], validator:Callable[[T], Response],/) -> None: ...
|
|
14
|
+
|
|
15
|
+
@overload
|
|
16
|
+
def __init__(self, valueType:Type[T] | TypeVar, validator:Callable[[T], Response],/) -> None: ...
|
|
17
|
+
|
|
18
|
+
def __init__(self, valueType, validator, /) -> None:
|
|
13
19
|
'''
|
|
14
20
|
create a value definition to be used by `kisa_utils.structures.validator.validate`
|
|
15
21
|
|
|
@@ -74,4 +80,4 @@ class Value(Generic[T]):
|
|
|
74
80
|
return _type
|
|
75
81
|
|
|
76
82
|
def __str__(self) -> str: return self.__name__
|
|
77
|
-
def __repr__(self) -> str: return self.__name__
|
|
83
|
+
def __repr__(self) -> str: return self.__name__
|
|
@@ -3,7 +3,7 @@ kisa_utils/cache.py,sha256=4Ue5G3QhHSQAmIfQKYgWKWjNL4rA4wLLd_RdBLb2ABY,7345
|
|
|
3
3
|
kisa_utils/codes.py,sha256=PV_S53Skggf4XetOdYoIKtEmM8cpN5wZwUlxje70WZY,904
|
|
4
4
|
kisa_utils/config.py,sha256=NfluzGKTh66qfNtC-Ae0zNb1XzMTgU2Me9Vi82R9c1E,2285
|
|
5
5
|
kisa_utils/dates.py,sha256=kcNqoY_iguG9hSzABMIBqeL3MGz3n4MRIXuW4OxRHLs,12662
|
|
6
|
-
kisa_utils/db.py,sha256=
|
|
6
|
+
kisa_utils/db.py,sha256=QH9nvwc3Lr-NyUA-47Rae-s2xeMIE6m2rNGozcpr2jg,48950
|
|
7
7
|
kisa_utils/encryption.py,sha256=nFzNpzWV_D9uSEq4FsgCnlS7FQtqWP9fvM_81rsfcLo,4218
|
|
8
8
|
kisa_utils/enqueue.py,sha256=VIliaMvw4MUdOqts0dXdZCYNxs-QrOVjIRAR3scGrRM,11786
|
|
9
9
|
kisa_utils/figures.py,sha256=pYIpQzu1OXRSsY1d98GhgPifnIRmgl-r7S32ai-Ms0c,3731
|
|
@@ -21,9 +21,9 @@ kisa_utils/permissions/__init__.py,sha256=q7LGl26f-MPXkLS6nxBKDotW3xdB8y7pI5S_Oo
|
|
|
21
21
|
kisa_utils/servers/__init__.py,sha256=lPqDyGTrFo0qwPZ2WA9Xtcpc5D8AIU4huqgFx1iZf68,19
|
|
22
22
|
kisa_utils/servers/flask.py,sha256=o76cJKlQ3L8EOVdHUF092qwoAZMzgttuLt0mMhtCsGI,40085
|
|
23
23
|
kisa_utils/structures/__init__.py,sha256=JBU1j3A42jQ62ALKnsS1Hav9YXcYwjDw1wQJtohXPbU,83
|
|
24
|
-
kisa_utils/structures/utils.py,sha256=
|
|
24
|
+
kisa_utils/structures/utils.py,sha256=665rXIapGwFqejizeJwy3DryeskCQOdgP25BCdLkGvk,2898
|
|
25
25
|
kisa_utils/structures/validator.py,sha256=Y4UmB4TH7N-GkK22EV1WOsPWjTeqxVWLTentl1keZD4,4053
|
|
26
|
-
kisa_utils-0.37.
|
|
27
|
-
kisa_utils-0.37.
|
|
28
|
-
kisa_utils-0.37.
|
|
29
|
-
kisa_utils-0.37.
|
|
26
|
+
kisa_utils-0.37.18.dist-info/METADATA,sha256=gTcrLt0Vr8OPx_6bCHDe_Zs0sAh2hqlriAeJg41LFGA,478
|
|
27
|
+
kisa_utils-0.37.18.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
28
|
+
kisa_utils-0.37.18.dist-info/top_level.txt,sha256=URxY4sRuqmirOxWtztpVmPoGQdksEMYO6hmYsEDGz2Y,75
|
|
29
|
+
kisa_utils-0.37.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|