ni.datastore 0.1.0.dev1__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.
- ni_datastore-0.1.0.dev1/LICENSE +21 -0
- ni_datastore-0.1.0.dev1/PKG-INFO +68 -0
- ni_datastore-0.1.0.dev1/README.md +34 -0
- ni_datastore-0.1.0.dev1/pyproject.toml +113 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/__init__.py +66 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_client.py +652 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/__init__.py +1 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_alias.py +61 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_extension_schema.py +51 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_hardware_item.py +106 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_operator.py +80 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_published_condition.py +83 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_published_measurement.py +188 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_software_item.py +82 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_step.py +150 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_test.py +80 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_test_adapter.py +112 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_test_description.py +82 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_test_result.py +181 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_test_station.py +82 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_uut.py +92 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/_uut_instance.py +100 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/_types/py.typed +0 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/grpc_conversion.py +213 -0
- ni_datastore-0.1.0.dev1/src/ni/datastore/py.typed +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 NI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: ni.datastore
|
|
3
|
+
Version: 0.1.0.dev1
|
|
4
|
+
Summary: APIs for publishing and retrieving data from the NI Measurement Data Store
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: datastore
|
|
7
|
+
Author: NI
|
|
8
|
+
Author-email: opensource@ni.com
|
|
9
|
+
Maintainer: Johann Scholtz
|
|
10
|
+
Maintainer-email: johann.scholtz@emerson.com
|
|
11
|
+
Requires-Python: >=3.9,<4.0
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Manufacturing
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Operating System :: POSIX
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
26
|
+
Requires-Dist: hightime (>=0.3.0.dev0)
|
|
27
|
+
Requires-Dist: ni-datamonikers-v1-client (>=0.1.0.dev0)
|
|
28
|
+
Requires-Dist: ni-measurements-data-v1-client (>=0.1.0.dev0)
|
|
29
|
+
Requires-Dist: ni-measurements-metadata-v1-client (>=0.1.0.dev0)
|
|
30
|
+
Requires-Dist: ni-protobuf-types (>=0.1.0.dev3)
|
|
31
|
+
Requires-Dist: protobuf (>=4.21)
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# Table of Contents
|
|
35
|
+
|
|
36
|
+
- [Table of Contents](#table-of-contents)
|
|
37
|
+
- [Measurement ]
|
|
38
|
+
- [About](#about)
|
|
39
|
+
- [Operating System Support](#operating-system-support)
|
|
40
|
+
- [Python Version Support](#python-version-support)
|
|
41
|
+
|
|
42
|
+
# Measurement Data Store API for Python
|
|
43
|
+
|
|
44
|
+
`datastore-python` contains Python code for writing to and reading from
|
|
45
|
+
the [NI Measurement Data Store](https://github.com/ni/datastore-service).
|
|
46
|
+
It will include examples of how to use the Python API.
|
|
47
|
+
|
|
48
|
+
# About
|
|
49
|
+
|
|
50
|
+
`ni.datastore` is the main Python package in this repo that
|
|
51
|
+
provides APIs for publishing and retrieving data from the NI
|
|
52
|
+
Measurement Data Store
|
|
53
|
+
|
|
54
|
+
NI created and supports this package.
|
|
55
|
+
|
|
56
|
+
## Operating System Support
|
|
57
|
+
|
|
58
|
+
`ni.datastore` supports Windows and Linux operating systems.
|
|
59
|
+
|
|
60
|
+
## Python Version Support
|
|
61
|
+
|
|
62
|
+
`ni.datastore` supports CPython 3.9+.
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
|
|
66
|
+
You can directly install the `ni.datastore` package using `pip` or by listing it as a
|
|
67
|
+
dependency in your project's `pyproject.toml` file.
|
|
68
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Table of Contents
|
|
2
|
+
|
|
3
|
+
- [Table of Contents](#table-of-contents)
|
|
4
|
+
- [Measurement ]
|
|
5
|
+
- [About](#about)
|
|
6
|
+
- [Operating System Support](#operating-system-support)
|
|
7
|
+
- [Python Version Support](#python-version-support)
|
|
8
|
+
|
|
9
|
+
# Measurement Data Store API for Python
|
|
10
|
+
|
|
11
|
+
`datastore-python` contains Python code for writing to and reading from
|
|
12
|
+
the [NI Measurement Data Store](https://github.com/ni/datastore-service).
|
|
13
|
+
It will include examples of how to use the Python API.
|
|
14
|
+
|
|
15
|
+
# About
|
|
16
|
+
|
|
17
|
+
`ni.datastore` is the main Python package in this repo that
|
|
18
|
+
provides APIs for publishing and retrieving data from the NI
|
|
19
|
+
Measurement Data Store
|
|
20
|
+
|
|
21
|
+
NI created and supports this package.
|
|
22
|
+
|
|
23
|
+
## Operating System Support
|
|
24
|
+
|
|
25
|
+
`ni.datastore` supports Windows and Linux operating systems.
|
|
26
|
+
|
|
27
|
+
## Python Version Support
|
|
28
|
+
|
|
29
|
+
`ni.datastore` supports CPython 3.9+.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
You can directly install the `ni.datastore` package using `pip` or by listing it as a
|
|
34
|
+
dependency in your project's `pyproject.toml` file.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ni.datastore"
|
|
3
|
+
version = "0.1.0-dev1"
|
|
4
|
+
license = "MIT"
|
|
5
|
+
description = "APIs for publishing and retrieving data from the NI Measurement Data Store"
|
|
6
|
+
authors = [{name = "NI", email = "opensource@ni.com"}]
|
|
7
|
+
maintainers = [
|
|
8
|
+
{name = "Johann Scholtz", email = "johann.scholtz@emerson.com"},
|
|
9
|
+
{name = "Joel Dixon", email = "joel.dixon@emerson.com"}
|
|
10
|
+
]
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
repository = "https://github.com/ni/datastore-python"
|
|
13
|
+
keywords = ["datastore"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Intended Audience :: Manufacturing",
|
|
18
|
+
"Intended Audience :: Science/Research",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Operating System :: Microsoft :: Windows",
|
|
21
|
+
"Operating System :: POSIX",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.9",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
29
|
+
]
|
|
30
|
+
dynamic = ["dependencies"]
|
|
31
|
+
requires-python = '>=3.9,<4.0'
|
|
32
|
+
|
|
33
|
+
[tool.poetry]
|
|
34
|
+
packages = [{include = "ni", from = "src"}]
|
|
35
|
+
requires-poetry = '>=2.1,<3.0'
|
|
36
|
+
|
|
37
|
+
[tool.poetry.dependencies]
|
|
38
|
+
python = "^3.9"
|
|
39
|
+
protobuf = {version=">=4.21"}
|
|
40
|
+
ni-datamonikers-v1-client = { version = ">=0.1.0.dev0", allow-prereleases = true }
|
|
41
|
+
ni-measurements-data-v1-client = { version = ">=0.1.0.dev0", allow-prereleases = true }
|
|
42
|
+
ni-measurements-metadata-v1-client = { version = ">=0.1.0.dev0", allow-prereleases = true }
|
|
43
|
+
ni-protobuf-types = { version = ">=0.1.0.dev3", allow-prereleases = true }
|
|
44
|
+
hightime = { version = ">=0.3.0.dev0", allow-prereleases = true }
|
|
45
|
+
|
|
46
|
+
[tool.poetry.group.dev.dependencies]
|
|
47
|
+
types-grpcio = ">=1.0"
|
|
48
|
+
types-protobuf = ">=4.21"
|
|
49
|
+
ipykernel = ">=6.0"
|
|
50
|
+
plotly = ">=5.0"
|
|
51
|
+
nbformat = ">=4.2.0"
|
|
52
|
+
ipython = ">=7.0"
|
|
53
|
+
jupyter = ">=1.0"
|
|
54
|
+
|
|
55
|
+
[tool.poetry.group.lint.dependencies]
|
|
56
|
+
bandit = { version = ">=1.7", extras = ["toml"] }
|
|
57
|
+
ni-python-styleguide = ">=0.4.1"
|
|
58
|
+
mypy = ">=1.0"
|
|
59
|
+
pyright = { version = ">=1.1.400", extras = ["nodejs"] }
|
|
60
|
+
|
|
61
|
+
[tool.poetry.group.test.dependencies]
|
|
62
|
+
pytest = ">=7.2"
|
|
63
|
+
pytest-cov = ">=4.0"
|
|
64
|
+
pytest-doctestplus = ">=1.4"
|
|
65
|
+
pytest-mock = ">=3.0"
|
|
66
|
+
|
|
67
|
+
[tool.poetry.group.docs]
|
|
68
|
+
optional = true
|
|
69
|
+
|
|
70
|
+
[tool.poetry.group.docs.dependencies]
|
|
71
|
+
# The latest Sphinx requires a recent Python version.
|
|
72
|
+
Sphinx = [
|
|
73
|
+
{ version = ">=7.4", python = ">=3.9,<3.10" },
|
|
74
|
+
{ version = ">=8.1", python = ">=3.10,<3.11" },
|
|
75
|
+
{ version = ">=8.2", python = "^3.11" },
|
|
76
|
+
]
|
|
77
|
+
sphinx-rtd-theme = ">=1.0.0"
|
|
78
|
+
sphinx-autoapi = ">=1.8.4"
|
|
79
|
+
m2r2 = ">=0.3.2"
|
|
80
|
+
toml = ">=0.10.2"
|
|
81
|
+
|
|
82
|
+
[build-system]
|
|
83
|
+
requires = ["poetry-core>=1.8"]
|
|
84
|
+
build-backend = "poetry.core.masonry.api"
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
[tool.bandit]
|
|
88
|
+
skips = [
|
|
89
|
+
"B101", # assert_used
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
[tool.ni-python-styleguide]
|
|
93
|
+
extend_exclude = "docs,examples"
|
|
94
|
+
|
|
95
|
+
[tool.black]
|
|
96
|
+
extend-exclude = 'docs/|_pb2(_grpc)?\.(py|pyi)$'
|
|
97
|
+
line-length = 100
|
|
98
|
+
|
|
99
|
+
[tool.mypy]
|
|
100
|
+
mypy_path = "src"
|
|
101
|
+
files = "."
|
|
102
|
+
namespace_packages = true
|
|
103
|
+
strict = true
|
|
104
|
+
explicit_package_bases = true
|
|
105
|
+
exclude = ["docs"]
|
|
106
|
+
|
|
107
|
+
[tool.pyright]
|
|
108
|
+
include = ["src/", "tests/"]
|
|
109
|
+
exclude = ["**/*_pb2_grpc.py", "**/*_pb2_grpc.pyi", "**/*_pb2.py", "**/*_pb2.pyi", "src/ni/measurements/data/v1/**/__init__.py*"]
|
|
110
|
+
|
|
111
|
+
[tool.pytest.ini_options]
|
|
112
|
+
addopts = "--doctest-modules --doctest-plus --strict-markers"
|
|
113
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Public API for accessing the NI Data Store Service."""
|
|
2
|
+
|
|
3
|
+
from ni.datamonikers.v1.data_moniker_pb2 import Moniker
|
|
4
|
+
from ni.datastore._client import Client
|
|
5
|
+
from ni.datastore._types._alias import Alias
|
|
6
|
+
from ni.datastore._types._extension_schema import ExtensionSchema
|
|
7
|
+
from ni.datastore._types._hardware_item import HardwareItem
|
|
8
|
+
from ni.datastore._types._operator import Operator
|
|
9
|
+
from ni.datastore._types._published_condition import PublishedCondition
|
|
10
|
+
from ni.datastore._types._published_measurement import PublishedMeasurement
|
|
11
|
+
from ni.datastore._types._software_item import SoftwareItem
|
|
12
|
+
from ni.datastore._types._step import Step
|
|
13
|
+
from ni.datastore._types._test import Test
|
|
14
|
+
from ni.datastore._types._test_adapter import TestAdapter
|
|
15
|
+
from ni.datastore._types._test_description import TestDescription
|
|
16
|
+
from ni.datastore._types._test_result import TestResult
|
|
17
|
+
from ni.datastore._types._test_station import TestStation
|
|
18
|
+
from ni.datastore._types._uut import Uut
|
|
19
|
+
from ni.datastore._types._uut_instance import UutInstance
|
|
20
|
+
from ni.measurements.data.v1.data_store_pb2 import ErrorInformation, Outcome
|
|
21
|
+
from ni.measurements.metadata.v1.metadata_store_pb2 import AliasTargetType
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"Client",
|
|
25
|
+
"Alias",
|
|
26
|
+
"AliasTargetType",
|
|
27
|
+
"ErrorInformation",
|
|
28
|
+
"ExtensionSchema",
|
|
29
|
+
"HardwareItem",
|
|
30
|
+
"Moniker",
|
|
31
|
+
"Operator",
|
|
32
|
+
"Outcome",
|
|
33
|
+
"PublishedCondition",
|
|
34
|
+
"PublishedMeasurement",
|
|
35
|
+
"SoftwareItem",
|
|
36
|
+
"Step",
|
|
37
|
+
"Test",
|
|
38
|
+
"TestAdapter",
|
|
39
|
+
"TestDescription",
|
|
40
|
+
"TestResult",
|
|
41
|
+
"TestStation",
|
|
42
|
+
"Uut",
|
|
43
|
+
"UutInstance",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
# Hide that it was not defined in this top-level package
|
|
47
|
+
Client.__module__ = __name__
|
|
48
|
+
Alias.__module__ = __name__
|
|
49
|
+
AliasTargetType.__module__ = __name__
|
|
50
|
+
ErrorInformation.__module__ = __name__
|
|
51
|
+
ExtensionSchema.__module__ = __name__
|
|
52
|
+
HardwareItem.__module__ = __name__
|
|
53
|
+
Moniker.__module__ = __name__
|
|
54
|
+
Operator.__module__ = __name__
|
|
55
|
+
Outcome.__module__ = __name__
|
|
56
|
+
PublishedCondition.__module__ = __name__
|
|
57
|
+
PublishedMeasurement.__module__ = __name__
|
|
58
|
+
SoftwareItem.__module__ = __name__
|
|
59
|
+
Step.__module__ = __name__
|
|
60
|
+
Test.__module__ = __name__
|
|
61
|
+
TestAdapter.__module__ = __name__
|
|
62
|
+
TestDescription.__module__ = __name__
|
|
63
|
+
TestResult.__module__ = __name__
|
|
64
|
+
TestStation.__module__ = __name__
|
|
65
|
+
Uut.__module__ = __name__
|
|
66
|
+
UutInstance.__module__ = __name__
|