plesty-lib 0.1.0__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.
- plesty_lib-0.1.0.dist-info/METADATA +91 -0
- plesty_lib-0.1.0.dist-info/RECORD +43 -0
- plesty_lib-0.1.0.dist-info/WHEEL +4 -0
- plesty_lib-0.1.0.dist-info/licenses/COPYING +674 -0
- plesty_lib-0.1.0.dist-info/licenses/LICENSE +184 -0
- plestylib/__init__.py +7 -0
- plestylib/data/__init__.py +30 -0
- plestylib/data/array.py +313 -0
- plestylib/data/ctype_manager.py +101 -0
- plestylib/data/table.py +52 -0
- plestylib/data/types.py +107 -0
- plestylib/data/units.py +164 -0
- plestylib/device/__init__.py +6 -0
- plestylib/device/async_wrapper.py +278 -0
- plestylib/device/base_device_sync.py +204 -0
- plestylib/device/base_tcp_scpi_device.py +124 -0
- plestylib/device/base_visa_scpi_device.py +102 -0
- plestylib/device/device_utils.py +77 -0
- plestylib/device/funcs.py +788 -0
- plestylib/device/params.py +494 -0
- plestylib/service/__init__.py +46 -0
- plestylib/service/tcp_ip_client.py +163 -0
- plestylib/service/tcp_ip_server.py +205 -0
- plestylib/sim/__init__.py +6 -0
- plestylib/sim/data_generator.py +259 -0
- plestylib/solver/__init__.py +25 -0
- plestylib/solver/iceblock.py +90 -0
- plestylib/solver/scpi.py +91 -0
- plestylib/test/auto_test_func_system.py +99 -0
- plestylib/test/auto_test_sync_device.py +58 -0
- plestylib/test/device_test.py +125 -0
- plestylib/test/test_data_array.py +110 -0
- plestylib/traffic/__init__.py +133 -0
- plestylib/traffic/serial.py +121 -0
- plestylib/traffic/tcp_ip.py +106 -0
- plestylib/traffic/usb_utils.py +68 -0
- plestylib/traffic/utils.py +120 -0
- plestylib/traffic/visa.py +95 -0
- plestylib/utils/__init__.py +6 -0
- plestylib/utils/dll_utils.py +19 -0
- plestylib/utils/error_utils.py +29 -0
- plestylib/utils/logger.py +25 -0
- plestylib/utils/registry.py +24 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: plesty-lib
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A library for the Plesty ecosystem.
|
|
5
|
+
Author-email: Yunshuang Yuan <yunshuang.yuan@fkp.uni-hannover.de>
|
|
6
|
+
Maintainer-email: Plesty Development Team <yunshuang.yuan@fkp.uni-hannover.de>
|
|
7
|
+
License-Expression: LGPL-3.0-or-later
|
|
8
|
+
License-File: COPYING
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
|
+
Requires-Dist: numpy>=1.24
|
|
12
|
+
Requires-Dist: plesty-sdk
|
|
13
|
+
Requires-Dist: pyserial>=3.5
|
|
14
|
+
Requires-Dist: pyusb>=1.2.1
|
|
15
|
+
Requires-Dist: pyvisa>=1.13
|
|
16
|
+
Requires-Dist: pyzmq>=25.0
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# PlestyLib
|
|
21
|
+
|
|
22
|
+
PlestyLib is the core Python library in the PLESTY ecosystem for building standardized device APIs for laboratory and experimental automation.
|
|
23
|
+
|
|
24
|
+
It provides reusable abstractions for:
|
|
25
|
+
|
|
26
|
+
1. Device lifecycle and synchronous device models
|
|
27
|
+
2. Transport/traffic management (Serial, VISA, TCP/IP)
|
|
28
|
+
3. Command and operation solvers (for example SCPI and operation-message protocols)
|
|
29
|
+
4. Parameter and function metadata systems
|
|
30
|
+
5. Auto testing helpers, logging, and error-handling utilities
|
|
31
|
+
|
|
32
|
+
## Requirements
|
|
33
|
+
|
|
34
|
+
1. Python 3.12+
|
|
35
|
+
2. Runtime dependencies are defined in pyproject.toml
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
Install from package index:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install plesty-lib
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or install from source in editable mode:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install -e .
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
### 1. Create a device class from a base device
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from plestylib.device.base_visa_scpi_device import BaseVisaScpiDevice
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class PowermeterDevice(BaseVisaScpiDevice):
|
|
60
|
+
def __init__(self, address: str):
|
|
61
|
+
super().__init__(address)
|
|
62
|
+
self.register_config("POWER", dtype=float, read_only=True, command="MEAS:SCAL:POW")
|
|
63
|
+
self.register_config("WAVELENGTH", dtype=int, unit="nm", command="SENS:CORR:WAV")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 2. Use the device
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
address = "USB0::0x1313::0x8078::P0000001::INSTR"
|
|
70
|
+
|
|
71
|
+
with PowermeterDevice(address) as dev:
|
|
72
|
+
print(dev.identity())
|
|
73
|
+
print(dev.query("POWER"))
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Architecture Overview
|
|
77
|
+
|
|
78
|
+
PlestyLib encourages a layered device API design:
|
|
79
|
+
|
|
80
|
+
1. Base device model: operation entry points and parameter/function systems
|
|
81
|
+
2. Command/operation solver: map standardized calls to protocol payloads
|
|
82
|
+
3. Traffic manager: transport-specific I/O with real hardware
|
|
83
|
+
4. Optional wrappers: async and TCP/IP service/client patterns
|
|
84
|
+
|
|
85
|
+
This separation keeps implementations testable and easier to maintain.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
Plesty is licensed under the GNU Lesser General Public License v3.0 or later
|
|
91
|
+
(LGPL-3.0-or-later). See the LICENSE file.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
plestylib/__init__.py,sha256=yDyGbfL2flxrqe8QyqaEiHVWe85Bsg5bPRUUgi58GlU,175
|
|
2
|
+
plestylib/data/__init__.py,sha256=QGNQp3EQEFKupyb0IIaVfp92tTfctu5BbeTYr2rhzOM,593
|
|
3
|
+
plestylib/data/array.py,sha256=PbJvwv4CqOGPNUOgFu85ADj5lMoUbges148hpgZj23w,12273
|
|
4
|
+
plestylib/data/ctype_manager.py,sha256=7Qtb56WxHZEjc4c3rWwlwvk6oiU9wetRcptpnShmVW4,3998
|
|
5
|
+
plestylib/data/table.py,sha256=FT3V7-0_0GiWegROdkVfVA9hmbO5jkI4Qj9zyX5Q_yo,1715
|
|
6
|
+
plestylib/data/types.py,sha256=3UDqKq7DySvJbW0uW__LFYBPuMGaQFk884VOVy196_A,3348
|
|
7
|
+
plestylib/data/units.py,sha256=DEi5UE8PBw0ZxC2tJmxT4LZSdbSemkHod7bVSUQa4dU,4990
|
|
8
|
+
plestylib/device/__init__.py,sha256=l4LHY6ukcvY_V2FoEMU9bDbAzetDdzaKR-M6U2ga80Y,174
|
|
9
|
+
plestylib/device/async_wrapper.py,sha256=SOG7EDeJf5ezPKhtKMcZRxq-2RuT8ShTmubXAsXnKys,10053
|
|
10
|
+
plestylib/device/base_device_sync.py,sha256=53UY6ddA8Wt_cXoEU3ZMoS4YSMrfdu1XkOpzMppXPJs,8822
|
|
11
|
+
plestylib/device/base_tcp_scpi_device.py,sha256=LmUJNGrcgJPecTNN9l1h8bTnirqB_FinBv1ouDjI17k,4688
|
|
12
|
+
plestylib/device/base_visa_scpi_device.py,sha256=1bH9u0v5LWdm0hXPgvtxiUDeA2DHR2HyXU5MTfIJ36w,4068
|
|
13
|
+
plestylib/device/device_utils.py,sha256=yunOrsQe2DKQKuNk5UgFRKVBeZN5_tJi9Hk0Ku1hMh8,3006
|
|
14
|
+
plestylib/device/funcs.py,sha256=3FE7fmUqNdDS447ddYjVP0-FsHpjFrDnZrkh4cv2Wz8,33396
|
|
15
|
+
plestylib/device/params.py,sha256=2NnZEsQCjQpn8DmX_dUg8SowqPi7kQyvi8NRtWDyHVI,22934
|
|
16
|
+
plestylib/service/__init__.py,sha256=5ypXJxgaouvErM5IsM-ONfCizW47XiEdxJv1-YeIECs,1500
|
|
17
|
+
plestylib/service/tcp_ip_client.py,sha256=06JyQecAB8Mz7XWtRWs-uWz2zbJBKyFNRSsVcqm9XM4,4185
|
|
18
|
+
plestylib/service/tcp_ip_server.py,sha256=e1eAOpBmujqk7DyxRxOWt4WCJJihM_XqmigHIPOl8DU,5652
|
|
19
|
+
plestylib/sim/__init__.py,sha256=l4LHY6ukcvY_V2FoEMU9bDbAzetDdzaKR-M6U2ga80Y,174
|
|
20
|
+
plestylib/sim/data_generator.py,sha256=42aD4R7z0-OmfyXVmxRwv8KgGpCjL8SlLvZozTaQN2s,10686
|
|
21
|
+
plestylib/solver/__init__.py,sha256=DH_87l6SHc5CnGEDF71yelalWopIUAuPpMHCSQeIj6Q,637
|
|
22
|
+
plestylib/solver/iceblock.py,sha256=X7SQjW5KPsF9NfpsJuwLNJl6pkREOo_0xeqQS-pAFpk,2695
|
|
23
|
+
plestylib/solver/scpi.py,sha256=pYC1JIoaOr7PVTfv1w-VA-TxjYx87FPWxAlyqOeZ1lc,3264
|
|
24
|
+
plestylib/test/auto_test_func_system.py,sha256=lhPuE3MWrMYwlmqe904xyhBiYQoS-wZG43_GAThGOk0,3789
|
|
25
|
+
plestylib/test/auto_test_sync_device.py,sha256=rqmjtQtcQ_o24-8Tci4WSyGI_CE_2Y0Guv7zwjhFVsM,2840
|
|
26
|
+
plestylib/test/device_test.py,sha256=zGcRqGfSZ1dMY7yZBObZ_hOUB7g0_ILmAukZIP_V12A,3701
|
|
27
|
+
plestylib/test/test_data_array.py,sha256=i5txlmeW4wP_S1AhMrx95R0XoMva7-wnNDNDZVsvv0Q,3330
|
|
28
|
+
plestylib/traffic/__init__.py,sha256=I9F2E4LTFtRA1lOSgqqHXNhuDNY_9nO-IXeZPQ9MqK8,4972
|
|
29
|
+
plestylib/traffic/serial.py,sha256=Z36xtZ8BltL1GMFlOh1exl8xp8eldZSHxQUJTUYeOGc,5546
|
|
30
|
+
plestylib/traffic/tcp_ip.py,sha256=5aVFMuZMTTrPFQhXRL1WIM_9Pww2s9p8eTmPI0A4IX8,4528
|
|
31
|
+
plestylib/traffic/usb_utils.py,sha256=tOz3ORjPcFxGGaVQ9iP-ci0sPADJ3ymbvQbSn8OuxAI,2536
|
|
32
|
+
plestylib/traffic/utils.py,sha256=nAdCEHVwAVDh01ldzb2Pkt_ZAHfGJku1RneEsMIKYpU,3822
|
|
33
|
+
plestylib/traffic/visa.py,sha256=kmx21Zmhvzb3HGt5ZlwqgPBHWjDaG3JxFDoJ5IdW4iY,3766
|
|
34
|
+
plestylib/utils/__init__.py,sha256=l4LHY6ukcvY_V2FoEMU9bDbAzetDdzaKR-M6U2ga80Y,174
|
|
35
|
+
plestylib/utils/dll_utils.py,sha256=aZyovRZSHjy0bXLrWJ-0ZkzgwJqlFPKMPnhsPvD3m6k,475
|
|
36
|
+
plestylib/utils/error_utils.py,sha256=wSbnDob3FEoI_BpSsLGlo-qRB-QrjVXQh1XEoYpYiqA,1152
|
|
37
|
+
plestylib/utils/logger.py,sha256=9dsy3aHPI3-FOWEMYmebx_gBOA4cSu2e1o3UGnlebSg,785
|
|
38
|
+
plestylib/utils/registry.py,sha256=Ut7NjNH3E4AB5WrhBNOowfgmSEi4aroBn9sCEj8i-oI,619
|
|
39
|
+
plesty_lib-0.1.0.dist-info/METADATA,sha256=a9XSpNnm-vBwWxX5dQXNjQbij7_IjwD49b5eW3EmOOo,2475
|
|
40
|
+
plesty_lib-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
41
|
+
plesty_lib-0.1.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
42
|
+
plesty_lib-0.1.0.dist-info/licenses/LICENSE,sha256=u-tB81VfiXPInSOlocR38N9_gBIK-bBsjXpgh3sWMvc,8434
|
|
43
|
+
plesty_lib-0.1.0.dist-info/RECORD,,
|