lab-device-sdk 0.1.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.
lab_device_sdk/device.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Device:
|
|
5
|
+
"""Base class for all device implementations.
|
|
6
|
+
|
|
7
|
+
This class provides the core functionality for device management, including:
|
|
8
|
+
- Device status management
|
|
9
|
+
- Command execution
|
|
10
|
+
- Parameter handling
|
|
11
|
+
- Configuration management
|
|
12
|
+
- Websocket notifications
|
|
13
|
+
|
|
14
|
+
Attributes:
|
|
15
|
+
device_type_id: Unique identifier for the device type
|
|
16
|
+
manufacturer: Name of the device manufacturer
|
|
17
|
+
model: Model name/number of the device
|
|
18
|
+
version: Version of the device firmware/software
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
device_type_id: str = ""
|
|
22
|
+
manufacturer: str = ""
|
|
23
|
+
model: str = ""
|
|
24
|
+
version: str = "0.0.0"
|
|
25
|
+
|
|
26
|
+
def __init__(self, device_id: str, configuration: str | None = None):
|
|
27
|
+
"""Initialize a new device instance.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
device_id: Unique identifier for this device instance
|
|
31
|
+
configuration: Optional configuration string
|
|
32
|
+
"""
|
|
33
|
+
super().__init__()
|
|
34
|
+
self.device_id = device_id
|
|
35
|
+
self.stop_requested = False
|
|
36
|
+
self.configuration = configuration
|
|
37
|
+
self.status = "Disconnected"
|
|
38
|
+
self.status_details = ""
|
|
39
|
+
self.result: Any = None
|
lab_device_sdk/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lab-device-sdk
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Library for classes and functions that are used for the development of device managers.
|
|
5
|
+
Author: Eli Fine
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
8
|
+
Requires-Python: >=3.12.7
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
[](https://github.com/pre-commit/pre-commit)
|
|
12
|
+
[](https://github.com/astral-sh/ruff)
|
|
13
|
+
[](https://github.com/astral-sh/uv)
|
|
14
|
+
[](https://microsoft.github.io/pyright/)
|
|
15
|
+
[](https://github.com/lab-sync/lab-device-sdk/actions)
|
|
16
|
+
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/lab-sync/lab-device-sdk)
|
|
17
|
+
[](https://pypi.org/project/lab-device-sdk/)
|
|
18
|
+
[](https://pepy.tech/project/lab-device-sdk)
|
|
19
|
+
[](https://pypi.org/project/lab-device-sdk/)
|
|
20
|
+
[](https://codecov.io/gh/lab-sync/lab-device-sdk)
|
|
21
|
+
|
|
22
|
+
# Usage
|
|
23
|
+
Documentation is hosted on [ReadTheDocs](https://lab-device-sdk.readthedocs.io/en/latest/?badge=latest).
|
|
24
|
+
|
|
25
|
+
# Development
|
|
26
|
+
This project has a dev container. If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/lab-sync/lab-device-sdk) to get started. Clicking these links will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
|
|
27
|
+
|
|
28
|
+
To publish a new version of the repository, you can run the `Publish` workflow manually and publish to the staging registry from any branch, and you can check the 'Publish to Primary' option when on `main` to publish to the primary registry and create a git tag.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Updating from the template
|
|
35
|
+
This repository uses a copier template. To pull in the latest updates from the template, use the command:
|
|
36
|
+
`copier update --trust --conflict rej --defaults`
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
lab_device_sdk/__init__.py,sha256=ECTom3PQrkTDyyAbofzvCX5gb7lf4Wr88ClvyW5oFOQ,49
|
|
2
|
+
lab_device_sdk/device.py,sha256=4HvG70xPMVyX6R1xIA7MRdQQ_3e3eI4wb_IyRSTJ7FI,1174
|
|
3
|
+
lab_device_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
lab_device_sdk-0.1.3.dist-info/METADATA,sha256=JhdnAhd8ymL7CHqRDrsA7cjgppT8YErIt6RT0VC68IQ,2847
|
|
5
|
+
lab_device_sdk-0.1.3.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
|
6
|
+
lab_device_sdk-0.1.3.dist-info/top_level.txt,sha256=TGLZV-ilGNa9jDBfDpEAG_9raJwZCRr-oEqVn6GdDxo,15
|
|
7
|
+
lab_device_sdk-0.1.3.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lab_device_sdk
|