reykit 1.1.26__py3-none-any.whl → 1.1.28__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.
- reykit/__init__.py +2 -3
- reykit/rall.py +1 -2
- reykit/rbase.py +973 -0
- reykit/rdata.py +3 -5
- reykit/remail.py +1 -2
- reykit/rimage.py +2 -2
- reykit/rlog.py +5 -7
- reykit/rmonkey.py +2 -2
- reykit/rnet.py +1 -2
- reykit/rnum.py +2 -1
- reykit/ros.py +36 -26
- reykit/rrand.py +10 -35
- reykit/rre.py +1 -1
- reykit/rschedule.py +1 -1
- reykit/rstdout.py +2 -3
- reykit/rsys.py +31 -498
- reykit/rtable.py +3 -3
- reykit/rtask.py +9 -34
- reykit/rtext.py +1 -2
- reykit/rtime.py +28 -49
- reykit/rwrap.py +5 -6
- {reykit-1.1.26.dist-info → reykit-1.1.28.dist-info}/METADATA +2 -2
- reykit-1.1.28.dist-info/RECORD +28 -0
- reykit/rexc.py +0 -335
- reykit/rtype.py +0 -130
- reykit-1.1.26.dist-info/RECORD +0 -29
- {reykit-1.1.26.dist-info → reykit-1.1.28.dist-info}/WHEEL +0 -0
- {reykit-1.1.26.dist-info → reykit-1.1.28.dist-info}/licenses/LICENSE +0 -0
reykit/rtype.py
DELETED
@@ -1,130 +0,0 @@
|
|
1
|
-
# !/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
|
4
|
-
"""
|
5
|
-
@Time : 2025-06-13 02:05:46
|
6
|
-
@Author : Rey
|
7
|
-
@Contact : reyxbo@163.com
|
8
|
-
@Explain : Type methods.
|
9
|
-
"""
|
10
|
-
|
11
|
-
|
12
|
-
from typing import Any, Self, TypeVar
|
13
|
-
from collections.abc import Callable
|
14
|
-
|
15
|
-
|
16
|
-
__all__ = (
|
17
|
-
'T',
|
18
|
-
'KT',
|
19
|
-
'VT',
|
20
|
-
'Base',
|
21
|
-
'StaticMeta',
|
22
|
-
'ConfigMeta',
|
23
|
-
'Singleton',
|
24
|
-
'Null',
|
25
|
-
'null'
|
26
|
-
)
|
27
|
-
|
28
|
-
|
29
|
-
# Generic.
|
30
|
-
T = TypeVar('T') # Any.
|
31
|
-
KT = TypeVar('KT') # Any dictionary key.
|
32
|
-
VT = TypeVar('VT') # Any dictionary value.
|
33
|
-
|
34
|
-
|
35
|
-
class Base(object):
|
36
|
-
"""
|
37
|
-
Base type.
|
38
|
-
"""
|
39
|
-
|
40
|
-
|
41
|
-
class StaticMeta(Base, type):
|
42
|
-
"""
|
43
|
-
Static meta type.
|
44
|
-
"""
|
45
|
-
|
46
|
-
|
47
|
-
def __call__(cls):
|
48
|
-
"""
|
49
|
-
Call method.
|
50
|
-
"""
|
51
|
-
|
52
|
-
# Throw exception.
|
53
|
-
raise TypeError('static class, no instances allowed.')
|
54
|
-
|
55
|
-
|
56
|
-
class ConfigMeta(StaticMeta):
|
57
|
-
"""
|
58
|
-
Config meta type.
|
59
|
-
"""
|
60
|
-
|
61
|
-
|
62
|
-
def __getitem__(cls, name: str) -> Any:
|
63
|
-
"""
|
64
|
-
Get item.
|
65
|
-
|
66
|
-
Parameters
|
67
|
-
----------
|
68
|
-
name : Item name.
|
69
|
-
|
70
|
-
Returns
|
71
|
-
-------
|
72
|
-
Item value.
|
73
|
-
"""
|
74
|
-
|
75
|
-
# Get.
|
76
|
-
item = getattr(cls, name)
|
77
|
-
|
78
|
-
return item
|
79
|
-
|
80
|
-
|
81
|
-
def __setitem__(cls, name: str, value: Any) -> None:
|
82
|
-
"""
|
83
|
-
Set item.
|
84
|
-
|
85
|
-
Parameters
|
86
|
-
----------
|
87
|
-
name : Item name.
|
88
|
-
"""
|
89
|
-
|
90
|
-
# Set.
|
91
|
-
setattr(cls, name, value)
|
92
|
-
|
93
|
-
|
94
|
-
class Singleton(Base):
|
95
|
-
"""
|
96
|
-
Singleton type.
|
97
|
-
When instantiated, method `__singleton__` will be called only once, and will accept arguments.
|
98
|
-
|
99
|
-
Attributes
|
100
|
-
----------
|
101
|
-
_instance : Global singleton instance.
|
102
|
-
"""
|
103
|
-
|
104
|
-
_instance: Self | None = None
|
105
|
-
|
106
|
-
|
107
|
-
def __new__(self, *arg: Any, **kwargs: Any) -> Self:
|
108
|
-
"""
|
109
|
-
Build `singleton` instance.
|
110
|
-
"""
|
111
|
-
|
112
|
-
# Build.
|
113
|
-
if self._instance is None:
|
114
|
-
self._instance = super().__new__(self)
|
115
|
-
|
116
|
-
## Singleton method.
|
117
|
-
if hasattr(self, "__singleton__"):
|
118
|
-
__singleton__: Callable = getattr(self, "__singleton__")
|
119
|
-
__singleton__(self, *arg, **kwargs)
|
120
|
-
|
121
|
-
return self._instance
|
122
|
-
|
123
|
-
|
124
|
-
class Null(Singleton):
|
125
|
-
"""
|
126
|
-
Null type.
|
127
|
-
"""
|
128
|
-
|
129
|
-
|
130
|
-
null = Null()
|
reykit-1.1.26.dist-info/RECORD
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
reykit/__init__.py,sha256=LdwdCXLzzPyteyYerrwfJH0LGj5jp_j-tamv2JEghTg,821
|
2
|
-
reykit/rall.py,sha256=AEHa1iUCopuM5sPzO0vmSLWTmKeSjilUtzQ8f-jULHk,649
|
3
|
-
reykit/rdata.py,sha256=Hfyj7ZnnHHDP35BY6hNh8lIl-Nepq9rZpuS8yYl3SMo,10228
|
4
|
-
reykit/remail.py,sha256=iieRd4_WfUS7LwgLr1Q_rYuFWLMwSgsBkj62Z2n6K2o,6724
|
5
|
-
reykit/rexc.py,sha256=YneNgCmPw11RMdNtV2xPVKOdXnO5-pzmdYu0y0gagQ4,8129
|
6
|
-
reykit/rimage.py,sha256=pd-9jf2fq4yC4pubMJ45V5KIkQkIoqn12T8VdS406-Q,6181
|
7
|
-
reykit/rlog.py,sha256=B0r7bSPzpFuNrz8YmdhLoyYCh40pMlB8vn78mMkUaH4,25633
|
8
|
-
reykit/rmonkey.py,sha256=XXfUng0YImTZd07A41UmtZFp9smys62-tVPQuVhK_mY,8315
|
9
|
-
reykit/rnet.py,sha256=AeyKMv66N94bs8lnhxxVgm1qRxG4cxhxU9iVB4IUE1c,15051
|
10
|
-
reykit/rnum.py,sha256=9J6unM11dDTg9A8XigHzfut8VFHWaNRKu59vGQ-ISXo,3637
|
11
|
-
reykit/ros.py,sha256=SdbiuURa4BqfTJ1bahBOJfRjn6OTelnO7lLS0DU-V_U,40592
|
12
|
-
reykit/rrand.py,sha256=pwAemF6yLcs2D6xVpJUTdHX3TNaWtCBm9YwhJSzdKwE,9195
|
13
|
-
reykit/rre.py,sha256=0yYRiHhGg2OmuEVNf3zT92AcqQTdrvIJUltiFpjlYdM,6085
|
14
|
-
reykit/rschedule.py,sha256=sSuSmKorqy7U_HRTLBL8Z-nHbSb_DGbMWAWmOhSwbBM,5799
|
15
|
-
reykit/rstdout.py,sha256=y-spetP6UfFToucY00nAVHMMqR99tXqgyA37Zf3OUcY,9879
|
16
|
-
reykit/rsys.py,sha256=9cCspYRVJvD6UyE33GPYZWNikC4UHpmViaQ8V-Kd7k8,36385
|
17
|
-
reykit/rtable.py,sha256=NBj9WXQsRvYBY4sQxyVy7EyKO8Nhoy7IH_-ax2HHxPY,12029
|
18
|
-
reykit/rtask.py,sha256=BTmb0LCB4Tu-Vb3267YqLPY-Iayth9YygGCdTM_3KVA,23053
|
19
|
-
reykit/rtext.py,sha256=KtK9d1y4NCsfydZTxrq5lnnyWvJfPi79ywy2qnauNew,11073
|
20
|
-
reykit/rtime.py,sha256=5C2TkJMvPht3RinEDOzFrqrLD-v4AaOsajkvmbincJg,17083
|
21
|
-
reykit/rtype.py,sha256=cLYeWI3C0USTt2IxNvtw0ZbkNBfmxlVanYVOwutTJjg,2262
|
22
|
-
reykit/rwrap.py,sha256=7PiePIhc-uJ6JWaAYEb-v10DVmoG7rb69MvJNw-8M5Y,15337
|
23
|
-
reykit/rzip.py,sha256=ABUDLwEHQIpcvZbJE_oV78H7dik6nC7kaRz660Ro9Os,3481
|
24
|
-
reykit/rdll/__init__.py,sha256=tdKb-BOKLFn-diCvXjSLg9x71VuRKzkg2KtpOLGLTR4,679
|
25
|
-
reykit/rdll/rdll_core.py,sha256=o6-rKcTQgxZQe0kD3GnwyNb3KL9IogzgCQNOmYLMm7A,5086
|
26
|
-
reykit-1.1.26.dist-info/METADATA,sha256=adAHYX858-5vMNV-vFonQlNSBTiwpe2DTkXFWGWoQHM,1919
|
27
|
-
reykit-1.1.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
28
|
-
reykit-1.1.26.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
29
|
-
reykit-1.1.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|