runtimepy 5.11.2__py3-none-any.whl → 5.11.3__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.
- runtimepy/__init__.py +2 -2
- runtimepy/codec/system/__init__.py +8 -10
- runtimepy/enum/registry.py +1 -10
- runtimepy/primitives/byte_order.py +33 -2
- {runtimepy-5.11.2.dist-info → runtimepy-5.11.3.dist-info}/METADATA +5 -5
- {runtimepy-5.11.2.dist-info → runtimepy-5.11.3.dist-info}/RECORD +10 -10
- {runtimepy-5.11.2.dist-info → runtimepy-5.11.3.dist-info}/WHEEL +0 -0
- {runtimepy-5.11.2.dist-info → runtimepy-5.11.3.dist-info}/entry_points.txt +0 -0
- {runtimepy-5.11.2.dist-info → runtimepy-5.11.3.dist-info}/licenses/LICENSE +0 -0
- {runtimepy-5.11.2.dist-info → runtimepy-5.11.3.dist-info}/top_level.txt +0 -0
runtimepy/__init__.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# =====================================
|
|
2
2
|
# generator=datazen
|
|
3
3
|
# version=3.1.4
|
|
4
|
-
# hash=
|
|
4
|
+
# hash=f45f335bfb519a5a33f13603258a4d33
|
|
5
5
|
# =====================================
|
|
6
6
|
|
|
7
7
|
"""
|
|
@@ -10,7 +10,7 @@ Useful defaults and other package metadata.
|
|
|
10
10
|
|
|
11
11
|
DESCRIPTION = "A framework for implementing Python services."
|
|
12
12
|
PKG_NAME = "runtimepy"
|
|
13
|
-
VERSION = "5.11.
|
|
13
|
+
VERSION = "5.11.3"
|
|
14
14
|
|
|
15
15
|
# runtimepy-specific content.
|
|
16
16
|
METRICS_NAME = "metrics"
|
|
@@ -10,15 +10,14 @@ from vcorelib.logging import LoggerMixin
|
|
|
10
10
|
from vcorelib.namespace import CPP_DELIM, Namespace
|
|
11
11
|
|
|
12
12
|
# internal
|
|
13
|
-
from runtimepy import PKG_NAME
|
|
14
13
|
from runtimepy.codec.protocol import Protocol
|
|
15
14
|
from runtimepy.enum import RuntimeEnum
|
|
16
|
-
from runtimepy.enum.registry import
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
from runtimepy.enum.registry import DEFAULT_ENUM_PRIMITIVE, RuntimeIntEnum
|
|
16
|
+
from runtimepy.primitives.byte_order import (
|
|
17
|
+
DEFAULT_BYTE_ORDER,
|
|
18
|
+
ByteOrder,
|
|
19
|
+
enum_registry,
|
|
20
20
|
)
|
|
21
|
-
from runtimepy.primitives.byte_order import DEFAULT_BYTE_ORDER, ByteOrder
|
|
22
21
|
from runtimepy.primitives.types import AnyPrimitiveType, PrimitiveTypes
|
|
23
22
|
from runtimepy.registry.name import RegistryKey
|
|
24
23
|
from runtimepy.util import Identifier
|
|
@@ -54,7 +53,7 @@ class TypeSystem(LoggerMixin):
|
|
|
54
53
|
self.custom: dict[str, Protocol] = {}
|
|
55
54
|
self.custom_ids = Identifier(scale=1)
|
|
56
55
|
|
|
57
|
-
self._enums =
|
|
56
|
+
self._enums = enum_registry(register_byte_order=False)
|
|
58
57
|
|
|
59
58
|
global_namespace = Namespace(delim=CPP_DELIM)
|
|
60
59
|
|
|
@@ -65,9 +64,8 @@ class TypeSystem(LoggerMixin):
|
|
|
65
64
|
self.root_namespace = global_namespace
|
|
66
65
|
|
|
67
66
|
# Register enums.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
self.runtime_int_enum(enum)
|
|
67
|
+
for enum in [ByteOrder]:
|
|
68
|
+
self.runtime_int_enum(enum)
|
|
71
69
|
|
|
72
70
|
self.root_namespace = global_namespace.child(*namespace)
|
|
73
71
|
|
runtimepy/enum/registry.py
CHANGED
|
@@ -100,14 +100,5 @@ class RuntimeIntEnum(_IntEnum):
|
|
|
100
100
|
data["id"] = ident
|
|
101
101
|
|
|
102
102
|
result = registry.register_dict(name, data)
|
|
103
|
-
assert result is not None
|
|
103
|
+
assert result is not None, (name, data)
|
|
104
104
|
return result
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
def enum_registry(*kinds: type[RuntimeIntEnum]) -> EnumRegistry:
|
|
108
|
-
"""Create an enum registry with the provided custom types registered."""
|
|
109
|
-
|
|
110
|
-
result = EnumRegistry()
|
|
111
|
-
for kind in kinds:
|
|
112
|
-
kind.register_enum(result)
|
|
113
|
-
return result
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
A module implementing an enumeration for byte ordering options.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
# built-in
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
5
8
|
# internal
|
|
6
|
-
from runtimepy.enum.registry import RuntimeIntEnum
|
|
9
|
+
from runtimepy.enum.registry import EnumRegistry, RuntimeIntEnum
|
|
7
10
|
|
|
8
11
|
|
|
9
|
-
class ByteOrder(
|
|
12
|
+
class ByteOrder(RuntimeIntEnum):
|
|
10
13
|
"""An enumeration for viable byte orders."""
|
|
11
14
|
|
|
12
15
|
NATIVE = 1
|
|
@@ -30,5 +33,33 @@ class ByteOrder(_RuntimeIntEnum):
|
|
|
30
33
|
"""Get this byte order as a string."""
|
|
31
34
|
return self.fmt
|
|
32
35
|
|
|
36
|
+
@classmethod
|
|
37
|
+
def id(cls) -> Optional[int]:
|
|
38
|
+
"""Override in sub-class to coerce enum id."""
|
|
39
|
+
return 1
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# https://en.cppreference.com/w/cpp/types/endian
|
|
43
|
+
STD_ENDIAN = {
|
|
44
|
+
"little": ByteOrder.LITTLE_ENDIAN,
|
|
45
|
+
"big": ByteOrder.BIG_ENDIAN,
|
|
46
|
+
"native": ByteOrder.NATIVE,
|
|
47
|
+
}
|
|
48
|
+
|
|
33
49
|
|
|
34
50
|
DEFAULT_BYTE_ORDER = ByteOrder.NETWORK
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def enum_registry(
|
|
54
|
+
*kinds: type[RuntimeIntEnum], register_byte_order: bool = True
|
|
55
|
+
) -> EnumRegistry:
|
|
56
|
+
"""Create an enum registry with the provided custom types registered."""
|
|
57
|
+
|
|
58
|
+
result = EnumRegistry()
|
|
59
|
+
|
|
60
|
+
if register_byte_order:
|
|
61
|
+
ByteOrder.register_enum(result)
|
|
62
|
+
|
|
63
|
+
for kind in kinds:
|
|
64
|
+
kind.register_enum(result)
|
|
65
|
+
return result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runtimepy
|
|
3
|
-
Version: 5.11.
|
|
3
|
+
Version: 5.11.3
|
|
4
4
|
Summary: A framework for implementing Python services.
|
|
5
5
|
Home-page: https://github.com/vkottler/runtimepy
|
|
6
6
|
Author: Vaughn Kottler
|
|
@@ -17,11 +17,11 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
17
17
|
Requires-Python: >=3.12
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: psutil
|
|
21
20
|
Requires-Dist: websockets
|
|
22
|
-
Requires-Dist: aiofiles
|
|
23
21
|
Requires-Dist: vcorelib>=3.5.1
|
|
22
|
+
Requires-Dist: psutil
|
|
24
23
|
Requires-Dist: svgen>=0.7.4
|
|
24
|
+
Requires-Dist: aiofiles
|
|
25
25
|
Provides-Extra: test
|
|
26
26
|
Requires-Dist: pylint; extra == "test"
|
|
27
27
|
Requires-Dist: flake8; extra == "test"
|
|
@@ -50,11 +50,11 @@ Dynamic: requires-python
|
|
|
50
50
|
=====================================
|
|
51
51
|
generator=datazen
|
|
52
52
|
version=3.1.4
|
|
53
|
-
hash=
|
|
53
|
+
hash=8e8d3499d8579ca086dc80c977f6fd7f
|
|
54
54
|
=====================================
|
|
55
55
|
-->
|
|
56
56
|
|
|
57
|
-
# runtimepy ([5.11.
|
|
57
|
+
# runtimepy ([5.11.3](https://pypi.org/project/runtimepy/))
|
|
58
58
|
|
|
59
59
|
[](https://pypi.org/project/runtimepy/)
|
|
60
60
|

|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
runtimepy/__init__.py,sha256=
|
|
1
|
+
runtimepy/__init__.py,sha256=RJTUf2wSfvc8jMmH7nL4hTPvTdBOQNL3-pYVsf-5Dp8,391
|
|
2
2
|
runtimepy/__main__.py,sha256=OPAed6hggoQdw-6QAR62mqLC-rCkdDhOq0wyeS2vDRI,332
|
|
3
3
|
runtimepy/app.py,sha256=sTvatbsGZ2Hdel36Si_WUbNMtg9CzsJyExr5xjIcxDE,970
|
|
4
4
|
runtimepy/dev_requirements.txt,sha256=j0dh11ztJAzfaUL0iFheGjaZj9ppDzmTkclTT8YKO8c,230
|
|
@@ -27,7 +27,7 @@ runtimepy/codec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
27
27
|
runtimepy/codec/protocol/__init__.py,sha256=Rg7RSKGn2UBpGMpwq1aCLUBA5h4pORdh53NfR7Cjw0U,1530
|
|
28
28
|
runtimepy/codec/protocol/base.py,sha256=aIQCuUYPhe7-jgaYaoNzq3UU57lnBzrLqIr0H7fnHFc,10464
|
|
29
29
|
runtimepy/codec/protocol/json.py,sha256=gYGB_OEfZYySKQ_n3eDxYNs6Ku80FdawY5zDqjx9ctc,4315
|
|
30
|
-
runtimepy/codec/system/__init__.py,sha256=
|
|
30
|
+
runtimepy/codec/system/__init__.py,sha256=MLmczvxKnZoPnaPb_22EVC4TdVEj6P0IClejv5WCZ18,7245
|
|
31
31
|
runtimepy/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
runtimepy/commands/all.py,sha256=jH2dsmkqyBFe_2ZlPFpko0UCMW3fFfJsuGIbeJFbDoQ,1619
|
|
33
33
|
runtimepy/commands/arbiter.py,sha256=CtTMRYpqCAN3vWHkkr9jqWpoF7JGNXafKIBFmkarAfc,1567
|
|
@@ -118,7 +118,7 @@ runtimepy/data/static/woff2/CascadiaMono-Italic.woff2,sha256=S31PimDgq0GV7XMRV-Y
|
|
|
118
118
|
runtimepy/data/static/woff2/CascadiaMono-Regular.woff2,sha256=hHPAFO0U10TCKBw-UofHN2BLjax9qNClzN9oWGKkQx0,143936
|
|
119
119
|
runtimepy/data/static/woff2/README.md,sha256=flHwSRmDxd6OnWhzxmnXzwio1Mong5tB4d8VgieWCOs,289
|
|
120
120
|
runtimepy/enum/__init__.py,sha256=WIBMOaogauR1u7mK-I4Z5BZUoWANU7alIlrz82QdCmY,5820
|
|
121
|
-
runtimepy/enum/registry.py,sha256=
|
|
121
|
+
runtimepy/enum/registry.py,sha256=b_oW8l-yNXvrVGfwQ2kKs2bqBk5pT48WBc2vXUTkJks,2861
|
|
122
122
|
runtimepy/enum/types.py,sha256=uQYGvaAJVm5tUdwxn_SLHkTZHJpEf7364rTSL27necA,1027
|
|
123
123
|
runtimepy/message/__init__.py,sha256=X5PZqSPGhNT4MruaiQjN4MwJHhy8gV9W32QXyxgS9-E,3004
|
|
124
124
|
runtimepy/message/handlers.py,sha256=He9NC7MCkaV2clKc8dTSZ_T8N2l3ATjaTFzBr9n1T34,3775
|
|
@@ -233,7 +233,7 @@ runtimepy/noise/__init__.py,sha256=EJM7h3t_z74wwrn6FAFQwYE2yUcOZQ1K1IQqOb8Z0AI,3
|
|
|
233
233
|
runtimepy/primitives/__init__.py,sha256=nwWJH1e0KN2NsVwQ3wvRtUpl9s9Ap8Q32NNZLGol0wU,2323
|
|
234
234
|
runtimepy/primitives/base.py,sha256=BaGPUTeVMnLnTPcpjqnS2lzPN74Pe5C0XaQdgrTfW7A,9185
|
|
235
235
|
runtimepy/primitives/bool.py,sha256=lATPgb1e62rjLn5XlJX8lP3tVYR3DlxV8RT9HpOMdT0,1640
|
|
236
|
-
runtimepy/primitives/byte_order.py,sha256=
|
|
236
|
+
runtimepy/primitives/byte_order.py,sha256=J2Pg3gXg8Lmu_uU2mduNJt3mnP_enwDI4Y-X8kWAUP0,1456
|
|
237
237
|
runtimepy/primitives/evaluation.py,sha256=0N7mT8uoiJaY-coF2PeEXU2WO-FmbyN2Io9_EaghO9Q,4657
|
|
238
238
|
runtimepy/primitives/float.py,sha256=6vzNKnnLzzM4vP10V4E0PHZQH6vTvIl34pId1oFtlqc,2146
|
|
239
239
|
runtimepy/primitives/int.py,sha256=Ia2vtzXXfBb8fj1mgwu_PFpblrL2qzsN4Qwjvk5NhT4,3618
|
|
@@ -285,9 +285,9 @@ runtimepy/tui/task.py,sha256=nUZo9fuOC-k1Wpqdzkv9v1tQirCI28fZVgcC13Ijvus,1093
|
|
|
285
285
|
runtimepy/tui/channels/__init__.py,sha256=evDaiIn-YS9uGhdo8ZGtP9VK1ek6sr_P1nJ9JuSET0o,4536
|
|
286
286
|
runtimepy/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
287
287
|
runtimepy/ui/controls.py,sha256=yvT7h3thbYaitsakcIAJ90EwKzJ4b-jnc6p3UuVf_XE,1241
|
|
288
|
-
runtimepy-5.11.
|
|
289
|
-
runtimepy-5.11.
|
|
290
|
-
runtimepy-5.11.
|
|
291
|
-
runtimepy-5.11.
|
|
292
|
-
runtimepy-5.11.
|
|
293
|
-
runtimepy-5.11.
|
|
288
|
+
runtimepy-5.11.3.dist-info/licenses/LICENSE,sha256=yKBRwbO-cOPBrlpsZmJkkSa33DfY31aE8t7lZ0DwlUo,1071
|
|
289
|
+
runtimepy-5.11.3.dist-info/METADATA,sha256=jorcstJRpdgXA-aUoZoyvC_cECYSEZSHA6XP0UWWxyU,9395
|
|
290
|
+
runtimepy-5.11.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
291
|
+
runtimepy-5.11.3.dist-info/entry_points.txt,sha256=-btVBkYv7ybcopqZ_pRky-bEzu3vhbaG3W3Z7ERBiFE,51
|
|
292
|
+
runtimepy-5.11.3.dist-info/top_level.txt,sha256=0jPmh6yqHyyJJDwEID-LpQly-9kQ3WRMjH7Lix8peLg,10
|
|
293
|
+
runtimepy-5.11.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|