toolapi 0.1.0__cp39-abi3-musllinux_1_2_aarch64.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.
toolapi/__init__.py ADDED
@@ -0,0 +1,4 @@
1
+ from toolapi._core import call
2
+ from toolapi import value
3
+
4
+ __all__ = ["call", "value"]
toolapi/_core.abi3.so ADDED
Binary file
toolapi/_core.pyi ADDED
@@ -0,0 +1,3 @@
1
+ from typing import Any, Callable
2
+
3
+ def call(address: str, on_message: Callable[[str], bool] | None = None, /, **kwargs: Any) -> Any: ...
toolapi/value.py ADDED
@@ -0,0 +1,85 @@
1
+ """Pure Python wrapper classes for toolapi Value types.
2
+
3
+ These classes mirror the Rust Value enum variants. The Rust ``obj_to_value``
4
+ converter dispatches on the Python class name.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from dataclasses import dataclass
10
+
11
+
12
+ @dataclass
13
+ class TissueProperties:
14
+ t1: float
15
+ t2: float
16
+ t2dash: float
17
+ adc: float
18
+
19
+
20
+ @dataclass
21
+ class VoxelGridPhantom:
22
+ voxel_shape_type: str
23
+ voxel_shape_data: list[float]
24
+ grid_spacing: list[float]
25
+ grid_size: list[int]
26
+ pd: list[float]
27
+ t1: list[float]
28
+ t2: list[float]
29
+ t2dash: list[float]
30
+ adc: list[float]
31
+ b0: list[float]
32
+ b1: list[list[float]]
33
+ coil_sens: list[list[float]]
34
+
35
+
36
+ @dataclass
37
+ class MultiTissuePhantom:
38
+ voxel_shape_type: str
39
+ voxel_shape_data: list[float]
40
+ grid_spacing: list[float]
41
+ grid_size: list[int]
42
+ b1: list[list[float]]
43
+ coil_sens: list[list[float]]
44
+ tissues: list[tuple[list[float], list[float], TissueProperties]]
45
+
46
+
47
+ class Event:
48
+ def __init__(self, variant: str, **kwargs):
49
+ self.variant = variant
50
+ self.fields = kwargs
51
+
52
+ @staticmethod
53
+ def Pulse(angle: float, phase: float) -> Event:
54
+ return Event("Pulse", angle=angle, phase=phase)
55
+
56
+ @staticmethod
57
+ def Fid(kt: list[float]) -> Event:
58
+ return Event("Fid", kt=kt)
59
+
60
+ @staticmethod
61
+ def Adc(phase: float) -> Event:
62
+ return Event("Adc", phase=phase)
63
+
64
+ def __repr__(self):
65
+ return f"Event.{self.variant}({self.fields})"
66
+
67
+
68
+ @dataclass
69
+ class EventSeq:
70
+ events: list[Event]
71
+
72
+
73
+ @dataclass
74
+ class BlockSeq:
75
+ blocks: list
76
+
77
+
78
+ @dataclass
79
+ class Block:
80
+ min_duration: float = 0.0
81
+ rf: object = None
82
+ gx: object = None
83
+ gy: object = None
84
+ gz: object = None
85
+ adc: object = None
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: toolapi
3
+ Version: 0.1.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Requires-Dist: mrzerocore>=0.2.4 ; extra == 'test'
8
+ Provides-Extra: test
9
+ Requires-Python: >=3.8
@@ -0,0 +1,8 @@
1
+ toolapi/__init__.py,sha256=OPS53F62Vw295g8LgV5RCTmthOZGMlEuzXsw12KSVfk,86
2
+ toolapi/_core.abi3.so,sha256=UndORhsNKMePNJ3kl-dPSO__6RG_QvBoIoRdQYTB0Rg,3148737
3
+ toolapi/_core.pyi,sha256=U-jt6G3vvAoYdOeauqXEK2O7gMr76r-Xp7frjRLl4H4,136
4
+ toolapi/value.py,sha256=84KK7tdAEDshf4IXJL2vaYZO2EPKpKN9yHPa1uoxyZQ,1756
5
+ toolapi-0.1.0.dist-info/METADATA,sha256=sa2_OPM_tVAtDQ1HRT0tBgCwF-B2Sdf4kTO2Ix4_pJU,328
6
+ toolapi-0.1.0.dist-info/WHEEL,sha256=Mw_80IGV4SSdpqr23_KRqWvlBnVbqsS6QrsRbX3IheI,107
7
+ toolapi.libs/libgcc_s-0bf60adc.so.1,sha256=9fhX5YpiwtHdsiLMLz77Pw9jjIEGriteV7UOUrrwvpk,527681
8
+ toolapi-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.11.5)
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-abi3-musllinux_1_2_aarch64
Binary file