syndesi 0.4.1__tar.gz → 0.4.4__tar.gz
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.
- syndesi-0.4.4/PKG-INFO +96 -0
- syndesi-0.4.4/README.md +74 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/pyproject.toml +7 -3
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/__init__.py +16 -1
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/adapter.py +187 -108
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/auto.py +26 -15
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/adapter_backend.py +57 -39
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/adapter_session.py +30 -32
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/backend.py +7 -2
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/descriptors.py +1 -1
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/ip_backend.py +45 -42
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/serialport_backend.py +23 -19
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/stop_condition_backend.py +54 -30
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/visa_backend.py +5 -5
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/ip.py +33 -27
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/ip_server.py +9 -3
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/serialport.py +20 -7
- syndesi-0.4.4/syndesi/adapters/stop_condition.py +114 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/timeout.py +2 -28
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/visa.py +11 -3
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/backend_status.py +7 -9
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/console.py +0 -53
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/shell.py +3 -16
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/shell_tools.py +0 -5
- syndesi-0.4.4/syndesi/component.py +79 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/protocols/delimited.py +7 -22
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/protocols/modbus.py +9 -8
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/protocols/protocol.py +7 -1
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/protocols/raw.py +4 -4
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/protocols/scpi.py +6 -5
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/scripts/syndesi.py +2 -4
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/tools/backend_api.py +6 -32
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/tools/backend_logger.py +0 -1
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/tools/errors.py +28 -9
- syndesi-0.4.4/syndesi/tools/internal.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/tools/log.py +0 -87
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/tools/types.py +0 -43
- syndesi-0.4.4/syndesi/version.py +7 -0
- syndesi-0.4.4/syndesi.egg-info/PKG-INFO +96 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi.egg-info/SOURCES.txt +2 -0
- syndesi-0.4.1/PKG-INFO +0 -123
- syndesi-0.4.1/README.md +0 -101
- syndesi-0.4.1/syndesi/adapters/stop_condition.py +0 -163
- syndesi-0.4.1/syndesi/version.py +0 -3
- syndesi-0.4.1/syndesi.egg-info/PKG-INFO +0 -123
- {syndesi-0.4.1 → syndesi-0.4.4}/LICENSE +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/setup.cfg +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/__main__.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/__init__.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/__init__.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/adapter_manager.py +0 -0
- syndesi-0.4.1/syndesi/cli/__init__.py → syndesi-0.4.4/syndesi/adapters/backend/backend_status.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/backend_tools.py +1 -1
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/timed_queue.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/adapters/backend/timeout.py +0 -0
- {syndesi-0.4.1/syndesi/protocols → syndesi-0.4.4/syndesi/cli}/__init__.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/backend_console.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/backend_wrapper.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/terminal.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/terminal_apps.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/cli/terminal_tools.py +0 -0
- {syndesi-0.4.1/syndesi/scripts → syndesi-0.4.4/syndesi/protocols}/__init__.py +0 -0
- {syndesi-0.4.1/syndesi/tools → syndesi-0.4.4/syndesi/scripts}/__init__.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/scripts/syndesi_backend.py +0 -0
- /syndesi-0.4.1/syndesi/tools/internal.py → /syndesi-0.4.4/syndesi/tools/__init__.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/tools/exceptions.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi/tools/log_settings.py +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi.egg-info/dependency_links.txt +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi.egg-info/entry_points.txt +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi.egg-info/requires.txt +0 -0
- {syndesi-0.4.1 → syndesi-0.4.4}/syndesi.egg-info/top_level.txt +0 -0
syndesi-0.4.4/PKG-INFO
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: syndesi
|
|
3
|
+
Version: 0.4.4
|
|
4
|
+
Summary: Syndesi
|
|
5
|
+
Author-email: Sébastien Deriaz <sebastien.deriaz1@gmail.com>
|
|
6
|
+
License: GPL
|
|
7
|
+
Keywords: python,syndesi,interface,ethernet,serial,visa
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Education
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: Unix
|
|
12
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: prompt_toolkit
|
|
18
|
+
Requires-Dist: pyserial
|
|
19
|
+
Requires-Dist: rich
|
|
20
|
+
Requires-Dist: platformdirs
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# Syndesi Python Implementation
|
|
24
|
+
|
|
25
|
+
Syndesi description is available [here](https://github.com/syndesi-project/Syndesi/README.md)
|
|
26
|
+
|
|
27
|
+
Syndesi is a modular Python framework designed to streamline communication and control of a wide range of electronic instruments and devices. By providing a unified abstraction layer for adapters, protocols, and device drivers, Syndesi enables seamless integration with test equipment such as multimeters, oscilloscopes, power supplies, UART/USB devices, and more. Its flexible architecture supports both high-level and low-level operations, making it ideal for automation, data acquisition, and custom device interfacing in laboratory, industrial, and research environments.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
The syndesi Python package can be installed through pip
|
|
32
|
+
|
|
33
|
+
``pip install syndesi``
|
|
34
|
+
|
|
35
|
+
The package can also be installed locally by cloning this repository
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/syndesi-project/Syndesi
|
|
39
|
+
cd Syndesi
|
|
40
|
+
pip install .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
The user can work with any of the three following layers :
|
|
46
|
+
|
|
47
|
+
- Adapters : low-level communication (IP, UART, ...)
|
|
48
|
+
- Protocols : Encapsulated protocols (Delimited, Modbus, ...)
|
|
49
|
+
- Drivers : Device or application specific commands
|
|
50
|
+
|
|
51
|
+
### Adapters
|
|
52
|
+
|
|
53
|
+
The adapter allows the user to read and write raw data through IP, serial and VISA
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from syndesi import IP
|
|
57
|
+
|
|
58
|
+
my_adapter = IP('192.168.1.12', port=5025)
|
|
59
|
+
|
|
60
|
+
my_adapter.write(b'ping\n')
|
|
61
|
+
|
|
62
|
+
my_adapter.read() # -> b'pong'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
from syndesi import SerialPort
|
|
67
|
+
|
|
68
|
+
arduino = SerialPort('/dev/ttyUSB0', baudrate=115200) # COMx on Windows
|
|
69
|
+
arduino.query(b'get_temperature\n') # -> 20.5
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Protocols
|
|
73
|
+
|
|
74
|
+
Protocols encapsulate and format data
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
from syndesi import IP, Delimited
|
|
78
|
+
|
|
79
|
+
my_server = Delimited(IP('test.server.local', port=1234))
|
|
80
|
+
|
|
81
|
+
my_server.query('Hello world\n') # -> Hello world (\n is removed by Delimited)
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Drivers
|
|
86
|
+
|
|
87
|
+
A driver only requires an adapter, the protocol (if used) is instanciated internally
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
from syndesi_drivers.instruments.mutlimeters.siglent.SDM3055 import SDM3055
|
|
91
|
+
from syndesi.adapters import IP
|
|
92
|
+
|
|
93
|
+
mm = SDM3055(IP("192.168.1.123"))
|
|
94
|
+
|
|
95
|
+
voltage = mm.measure_dc_voltage()
|
|
96
|
+
```
|
syndesi-0.4.4/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Syndesi Python Implementation
|
|
2
|
+
|
|
3
|
+
Syndesi description is available [here](https://github.com/syndesi-project/Syndesi/README.md)
|
|
4
|
+
|
|
5
|
+
Syndesi is a modular Python framework designed to streamline communication and control of a wide range of electronic instruments and devices. By providing a unified abstraction layer for adapters, protocols, and device drivers, Syndesi enables seamless integration with test equipment such as multimeters, oscilloscopes, power supplies, UART/USB devices, and more. Its flexible architecture supports both high-level and low-level operations, making it ideal for automation, data acquisition, and custom device interfacing in laboratory, industrial, and research environments.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
The syndesi Python package can be installed through pip
|
|
10
|
+
|
|
11
|
+
``pip install syndesi``
|
|
12
|
+
|
|
13
|
+
The package can also be installed locally by cloning this repository
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/syndesi-project/Syndesi
|
|
17
|
+
cd Syndesi
|
|
18
|
+
pip install .
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
The user can work with any of the three following layers :
|
|
24
|
+
|
|
25
|
+
- Adapters : low-level communication (IP, UART, ...)
|
|
26
|
+
- Protocols : Encapsulated protocols (Delimited, Modbus, ...)
|
|
27
|
+
- Drivers : Device or application specific commands
|
|
28
|
+
|
|
29
|
+
### Adapters
|
|
30
|
+
|
|
31
|
+
The adapter allows the user to read and write raw data through IP, serial and VISA
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from syndesi import IP
|
|
35
|
+
|
|
36
|
+
my_adapter = IP('192.168.1.12', port=5025)
|
|
37
|
+
|
|
38
|
+
my_adapter.write(b'ping\n')
|
|
39
|
+
|
|
40
|
+
my_adapter.read() # -> b'pong'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from syndesi import SerialPort
|
|
45
|
+
|
|
46
|
+
arduino = SerialPort('/dev/ttyUSB0', baudrate=115200) # COMx on Windows
|
|
47
|
+
arduino.query(b'get_temperature\n') # -> 20.5
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Protocols
|
|
51
|
+
|
|
52
|
+
Protocols encapsulate and format data
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from syndesi import IP, Delimited
|
|
56
|
+
|
|
57
|
+
my_server = Delimited(IP('test.server.local', port=1234))
|
|
58
|
+
|
|
59
|
+
my_server.query('Hello world\n') # -> Hello world (\n is removed by Delimited)
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Drivers
|
|
64
|
+
|
|
65
|
+
A driver only requires an adapter, the protocol (if used) is instanciated internally
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
from syndesi_drivers.instruments.mutlimeters.siglent.SDM3055 import SDM3055
|
|
69
|
+
from syndesi.adapters import IP
|
|
70
|
+
|
|
71
|
+
mm = SDM3055(IP("192.168.1.123"))
|
|
72
|
+
|
|
73
|
+
voltage = mm.measure_dc_voltage()
|
|
74
|
+
```
|
|
@@ -11,7 +11,7 @@ dynamic = ["version"]
|
|
|
11
11
|
description = "Syndesi"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.10"
|
|
14
|
-
license = { text = "GPL" }
|
|
14
|
+
license = { text = "GPL" }
|
|
15
15
|
authors = [{ name = "Sébastien Deriaz", email = "sebastien.deriaz1@gmail.com" }]
|
|
16
16
|
keywords = ["python", "syndesi", "interface", "ethernet", "serial", "visa"]
|
|
17
17
|
classifiers = [
|
|
@@ -42,8 +42,6 @@ include = ["syndesi*"]
|
|
|
42
42
|
[tool.ruff]
|
|
43
43
|
target-version = "py311"
|
|
44
44
|
line-length = 100
|
|
45
|
-
select = ["D","E","F","I","B"] # include pydocstyle rules ("D")
|
|
46
|
-
#ignore = ["D203","D213"] # pick your preferences
|
|
47
45
|
|
|
48
46
|
[tool.ruff.lint]
|
|
49
47
|
select = ["E", "F", "W", "I", "UP", "B"]
|
|
@@ -71,3 +69,9 @@ exclude = ["^tests/fixtures/"]
|
|
|
71
69
|
skips = ["B101"]
|
|
72
70
|
exclude = ["tests"]
|
|
73
71
|
|
|
72
|
+
[tool.pylint]
|
|
73
|
+
# Disable too-many-arguments, this is the case for adapters/protocols/drivers
|
|
74
|
+
# All arguments are necessary and it would not make sense to group them / move them
|
|
75
|
+
# too-many-positional-arguments is kept however because it makes sense
|
|
76
|
+
# Also disable W1203 to allow f-strings in logging lines
|
|
77
|
+
disable = ["R0913", "W1203"]
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Syndesi module
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from .adapters.ip import IP
|
|
2
6
|
from .adapters.serialport import SerialPort
|
|
7
|
+
from .adapters.timeout import Timeout
|
|
3
8
|
from .adapters.visa import Visa
|
|
4
9
|
from .protocols.delimited import Delimited
|
|
5
10
|
from .protocols.modbus import Modbus
|
|
@@ -7,4 +12,14 @@ from .protocols.raw import Raw
|
|
|
7
12
|
from .protocols.scpi import SCPI
|
|
8
13
|
from .tools.log import log
|
|
9
14
|
|
|
10
|
-
__all__ = [
|
|
15
|
+
__all__ = [
|
|
16
|
+
"IP",
|
|
17
|
+
"SerialPort",
|
|
18
|
+
"Visa",
|
|
19
|
+
"Delimited",
|
|
20
|
+
"Modbus",
|
|
21
|
+
"Raw",
|
|
22
|
+
"SCPI",
|
|
23
|
+
"log",
|
|
24
|
+
"Timeout",
|
|
25
|
+
]
|