lab-device-sdk 0.1.3__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.
@@ -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
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
12
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
13
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
14
+ [![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
15
+ [![Actions status](https://github.com/lab-sync/lab-device-sdk/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/lab-sync/lab-device-sdk/actions)
16
+ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/lab-sync/lab-device-sdk)
17
+ [![PyPI Version](https://img.shields.io/pypi/v/lab-device-sdk.svg)](https://pypi.org/project/lab-device-sdk/)
18
+ [![Downloads](https://pepy.tech/badge/lab-device-sdk)](https://pepy.tech/project/lab-device-sdk)
19
+ [![Python Versions](https://img.shields.io/pypi/pyversions/lab-device-sdk.svg)](https://pypi.org/project/lab-device-sdk/)
20
+ [![Codecov](https://codecov.io/gh/lab-sync/lab-device-sdk/branch/main/graph/badge.svg)](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,26 @@
1
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
2
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
3
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
4
+ [![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
5
+ [![Actions status](https://github.com/lab-sync/lab-device-sdk/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/lab-sync/lab-device-sdk/actions)
6
+ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/lab-sync/lab-device-sdk)
7
+ [![PyPI Version](https://img.shields.io/pypi/v/lab-device-sdk.svg)](https://pypi.org/project/lab-device-sdk/)
8
+ [![Downloads](https://pepy.tech/badge/lab-device-sdk)](https://pepy.tech/project/lab-device-sdk)
9
+ [![Python Versions](https://img.shields.io/pypi/pyversions/lab-device-sdk.svg)](https://pypi.org/project/lab-device-sdk/)
10
+ [![Codecov](https://codecov.io/gh/lab-sync/lab-device-sdk/branch/main/graph/badge.svg)](https://codecov.io/gh/lab-sync/lab-device-sdk)
11
+
12
+ # Usage
13
+ Documentation is hosted on [ReadTheDocs](https://lab-device-sdk.readthedocs.io/en/latest/?badge=latest).
14
+
15
+ # Development
16
+ 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.
17
+
18
+ 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.
19
+
20
+
21
+
22
+
23
+
24
+ ## Updating from the template
25
+ This repository uses a copier template. To pull in the latest updates from the template, use the command:
26
+ `copier update --trust --conflict rej --defaults`
@@ -0,0 +1,50 @@
1
+ [project]
2
+ name = "lab-device-sdk"
3
+ version = "0.1.3"
4
+ description = "Library for classes and functions that are used for the development of device managers."
5
+ authors = [
6
+ {name = "Eli Fine"},
7
+
8
+ ]
9
+ readme = "README.md"
10
+ requires-python = ">=3.12.7"
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+
14
+ "Programming Language :: Python :: 3.12",
15
+
16
+ ]
17
+ dependencies = [
18
+
19
+ ]
20
+
21
+
22
+ [dependency-groups]
23
+ dev = [
24
+ # Specific to this repository
25
+
26
+
27
+ # Managed by upstream template
28
+ "pyright>=1.1.400",
29
+ "pytest>=8.3.5",
30
+ "pytest-cov>=6.0.0",
31
+ "pytest-randomly>=3.16.0",
32
+
33
+
34
+ ]
35
+
36
+ [tool.setuptools]
37
+ license-files = [] # kludge until this bug is fixed https://github.com/pypa/setuptools/issues/4759
38
+
39
+ [tool.uv]
40
+ package = true
41
+
42
+ [[tool.uv.index]]
43
+ name = "pypi"
44
+ url = "https://pypi.org/simple/"
45
+ publish-url = "https://upload.pypi.org/legacy/"
46
+
47
+ [[tool.uv.index]]
48
+ name = "testpypi"
49
+ url = "https://test.pypi.org/simple/"
50
+ publish-url = "https://test.pypi.org/legacy/"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ from .device import Device
2
+
3
+ __all__ = ["Device"]
@@ -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
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
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
12
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
13
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
14
+ [![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
15
+ [![Actions status](https://github.com/lab-sync/lab-device-sdk/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/lab-sync/lab-device-sdk/actions)
16
+ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/lab-sync/lab-device-sdk)
17
+ [![PyPI Version](https://img.shields.io/pypi/v/lab-device-sdk.svg)](https://pypi.org/project/lab-device-sdk/)
18
+ [![Downloads](https://pepy.tech/badge/lab-device-sdk)](https://pepy.tech/project/lab-device-sdk)
19
+ [![Python Versions](https://img.shields.io/pypi/pyversions/lab-device-sdk.svg)](https://pypi.org/project/lab-device-sdk/)
20
+ [![Codecov](https://codecov.io/gh/lab-sync/lab-device-sdk/branch/main/graph/badge.svg)](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,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/lab_device_sdk/__init__.py
4
+ src/lab_device_sdk/device.py
5
+ src/lab_device_sdk/py.typed
6
+ src/lab_device_sdk.egg-info/PKG-INFO
7
+ src/lab_device_sdk.egg-info/SOURCES.txt
8
+ src/lab_device_sdk.egg-info/dependency_links.txt
9
+ src/lab_device_sdk.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ lab_device_sdk