ni.measurementlink.sessionmanagement.v1.client 0.1.0.dev0__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.

Potentially problematic release.


This version of ni.measurementlink.sessionmanagement.v1.client might be problematic. Click here for more details.

Files changed (20) hide show
  1. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/PKG-INFO +80 -0
  2. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/README.md +26 -0
  3. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/pyproject.toml +155 -0
  4. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/__init__.py +107 -0
  5. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_client.py +405 -0
  6. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_constants.py +32 -0
  7. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/__init__.py +46 -0
  8. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_configuration.py +111 -0
  9. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_dotenvpath.py +73 -0
  10. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_grpcdevice.py +96 -0
  11. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_nidaqmx.py +54 -0
  12. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_nidcpower.py +63 -0
  13. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_nidigital.py +64 -0
  14. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_nidmm.py +64 -0
  15. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_nifgen.py +63 -0
  16. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_niscope.py +64 -0
  17. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_drivers/_niswitch.py +82 -0
  18. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_reservation.py +2769 -0
  19. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/_types.py +507 -0
  20. ni_measurementlink_sessionmanagement_v1_client-0.1.0.dev0/src/ni/measurementlink/sessionmanagement/v1/client/py.typed +0 -0
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.3
2
+ Name: ni.measurementlink.sessionmanagement.v1.client
3
+ Version: 0.1.0.dev0
4
+ Summary: Client gRPC APIs for the session management service
5
+ License: MIT
6
+ Keywords: ni-apis,sessionmanagement
7
+ Author: NI
8
+ Author-email: opensource@ni.com
9
+ Maintainer: Brad Keryan
10
+ Maintainer-email: brad.keryan@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
+ Provides-Extra: drivers
27
+ Provides-Extra: nidaqmx
28
+ Provides-Extra: nidcpower
29
+ Provides-Extra: nidigital
30
+ Provides-Extra: nidmm
31
+ Provides-Extra: nifgen
32
+ Provides-Extra: niscope
33
+ Provides-Extra: niswitch
34
+ Requires-Dist: deprecation (>=2.1)
35
+ Requires-Dist: ni-grpc-extensions (>=0.1.0.dev0)
36
+ Requires-Dist: ni-grpcdevice-v1-proto (>=0.1.0.dev0)
37
+ Requires-Dist: ni-measurementlink-discovery-v1-client (>=0.1.0.dev0)
38
+ Requires-Dist: ni-measurementlink-pinmap-v1-proto (>=0.1.0.dev0)
39
+ Requires-Dist: ni-measurementlink-proto (>=0.1.0.dev0)
40
+ Requires-Dist: ni-measurementlink-sessionmanagement-v1-proto (>=0.1.0.dev0)
41
+ Requires-Dist: nidaqmx[grpc] (>=0.8.0) ; extra == "drivers" or extra == "nidaqmx"
42
+ Requires-Dist: nidcpower[grpc] (>=1.4.4) ; extra == "drivers" or extra == "nidcpower"
43
+ Requires-Dist: nidigital[grpc] (>=1.4.4) ; extra == "drivers" or extra == "nidigital"
44
+ Requires-Dist: nidmm[grpc] (>=1.4.4) ; extra == "drivers" or extra == "nidmm"
45
+ Requires-Dist: nifgen[grpc] (>=1.4.4) ; extra == "drivers" or extra == "nifgen"
46
+ Requires-Dist: niscope[grpc] (>=1.4.4) ; extra == "drivers" or extra == "niscope"
47
+ Requires-Dist: niswitch[grpc] (>=1.4.4) ; extra == "drivers" or extra == "niswitch"
48
+ Requires-Dist: protobuf (>=4.21)
49
+ Requires-Dist: python-decouple (>=3.8)
50
+ Requires-Dist: pywin32 (>=303) ; sys_platform == "win32"
51
+ Requires-Dist: traceloggingdynamic (>=1.0) ; sys_platform == "win32"
52
+ Project-URL: Repository, https://github.com/ni/ni-apis-python
53
+ Description-Content-Type: text/markdown
54
+
55
+ # Table of Contents
56
+
57
+ - [Table of Contents](#table-of-contents)
58
+ - [About](#about)
59
+ - [Operating System Support](#operating-system-support)
60
+ - [Python Version Support](#python-version-support)
61
+
62
+ # About
63
+
64
+ `ni.measurementlink.sessionmanagement.v1.client` is a Python package that provides a client API for
65
+ the [ni.measurementlink.sessionmanagement.v1 package](https://github.com/ni/ni-apis/tree/main/ni/measurementlink/sessionmanagement/v1).
66
+
67
+ NI created and supports this package.
68
+
69
+ ## Operating System Support
70
+
71
+ `ni.measurementlink.sessionmanagement.v1.client` supports Windows and Linux operating systems.
72
+
73
+ ## Python Version Support
74
+
75
+ `ni.measurementlink.sessionmanagement.v1.client` supports CPython 3.9+.
76
+
77
+ ## Installation
78
+
79
+ You can directly install the `ni.measurementlink.sessionmanagement.v1.client` package using `pip` or by listing it as a
80
+ dependency in your project's `pyproject.toml` file.
@@ -0,0 +1,26 @@
1
+ # Table of Contents
2
+
3
+ - [Table of Contents](#table-of-contents)
4
+ - [About](#about)
5
+ - [Operating System Support](#operating-system-support)
6
+ - [Python Version Support](#python-version-support)
7
+
8
+ # About
9
+
10
+ `ni.measurementlink.sessionmanagement.v1.client` is a Python package that provides a client API for
11
+ the [ni.measurementlink.sessionmanagement.v1 package](https://github.com/ni/ni-apis/tree/main/ni/measurementlink/sessionmanagement/v1).
12
+
13
+ NI created and supports this package.
14
+
15
+ ## Operating System Support
16
+
17
+ `ni.measurementlink.sessionmanagement.v1.client` supports Windows and Linux operating systems.
18
+
19
+ ## Python Version Support
20
+
21
+ `ni.measurementlink.sessionmanagement.v1.client` supports CPython 3.9+.
22
+
23
+ ## Installation
24
+
25
+ You can directly install the `ni.measurementlink.sessionmanagement.v1.client` package using `pip` or by listing it as a
26
+ dependency in your project's `pyproject.toml` file.
@@ -0,0 +1,155 @@
1
+ [tool.poetry]
2
+ name = "ni.measurementlink.sessionmanagement.v1.client"
3
+ version = "0.1.0-dev0"
4
+ license = "MIT"
5
+ description = "Client gRPC APIs for the session management service"
6
+ authors = ["NI <opensource@ni.com>"]
7
+ maintainers = [
8
+ "Brad Keryan <brad.keryan@emerson.com>",
9
+ "Joe Friedrichsen <joe.friedrichsen@emerson.com>",
10
+ ]
11
+ readme = "README.md"
12
+ repository = "https://github.com/ni/ni-apis-python"
13
+ keywords = ["ni-apis", "sessionmanagement"]
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
+ packages = [{include = "ni", from = "src"}]
31
+
32
+ [tool.poetry.dependencies]
33
+ python = "^3.9"
34
+ protobuf = {version=">=4.21"}
35
+ pywin32 = { version = ">=303", platform = "win32" }
36
+ deprecation = ">=2.1"
37
+ traceloggingdynamic = { version = ">=1.0", platform = "win32" }
38
+ python-decouple = ">=3.8"
39
+ nidaqmx = { version = ">=0.8.0", extras = ["grpc"], optional = true }
40
+ nidcpower = { version = ">=1.4.4", extras = ["grpc"], optional = true }
41
+ nidigital = { version = ">=1.4.4", extras = ["grpc"], optional = true }
42
+ nidmm = { version = ">=1.4.4", extras = ["grpc"], optional = true }
43
+ nifgen = { version = ">=1.4.4", extras = ["grpc"], optional = true }
44
+ niscope = { version = ">=1.4.4", extras = ["grpc"], optional = true }
45
+ niswitch = { version = ">=1.4.4", extras = ["grpc"], optional = true }
46
+ ni-measurementlink-sessionmanagement-v1-proto = { version = ">=0.1.0.dev0", allow-prereleases = true }
47
+ ni-measurementlink-pinmap-v1-proto = { version = ">=0.1.0.dev0", allow-prereleases = true }
48
+ ni-measurementlink-proto = { version = ">=0.1.0.dev0", allow-prereleases = true }
49
+ ni-grpcdevice-v1-proto = { version = ">=0.1.0.dev0", allow-prereleases = true }
50
+ ni-grpc-extensions = { version = ">=0.1.0.dev0", allow-prereleases = true }
51
+ ni-measurementlink-discovery-v1-client = { version = ">=0.1.0.dev0", allow-prereleases = true }
52
+
53
+ [tool.poetry.group.dev.dependencies]
54
+ types-grpcio = ">=1.0"
55
+ types-protobuf = ">=4.21"
56
+
57
+ [tool.poetry.group.lint.dependencies]
58
+ bandit = { version = ">=1.7", extras = ["toml"] }
59
+ ni-python-styleguide = ">=0.4.1"
60
+ mypy = ">=1.0"
61
+ pyright = { version = ">=1.1.400", extras = ["nodejs"] }
62
+
63
+ [tool.poetry.group.test.dependencies]
64
+ pytest = ">=7.2"
65
+ pytest-cov = ">=4.0"
66
+ pytest-doctestplus = ">=1.4"
67
+ pytest-mock = ">=3.0"
68
+ # Use a prerelease version of hightime for testing.
69
+ hightime = { version = ">=0.3.0.dev0", allow-prereleases = true }
70
+
71
+ [tool.poetry.extras]
72
+ drivers = [
73
+ "nidaqmx",
74
+ "nidcpower",
75
+ "nidigital",
76
+ "nidmm",
77
+ "nifgen",
78
+ "niscope",
79
+ "niswitch",
80
+ ]
81
+ nidaqmx = ["nidaqmx"]
82
+ nidcpower = ["nidcpower"]
83
+ nidigital = ["nidigital"]
84
+ nidmm = ["nidmm"]
85
+ nifgen = ["nifgen"]
86
+ niscope = ["niscope"]
87
+ niswitch = ["niswitch"]
88
+
89
+ [tool.poetry.group.docs]
90
+ optional = true
91
+
92
+ [tool.poetry.group.docs.dependencies]
93
+ # The latest Sphinx requires a recent Python version.
94
+ Sphinx = { version = ">=8.2", python = "^3.11" }
95
+ sphinx-rtd-theme = ">=1.0.0"
96
+ sphinx-autoapi = ">=1.8.4"
97
+ m2r2 = ">=0.3.2"
98
+ toml = ">=0.10.2"
99
+
100
+ [build-system]
101
+ requires = ["poetry-core>=1.8"]
102
+ build-backend = "poetry.core.masonry.api"
103
+
104
+
105
+ [tool.bandit]
106
+ skips = [
107
+ "B101", # assert_used
108
+ ]
109
+
110
+ [tool.ni-python-styleguide]
111
+ extend_exclude = "docs,*_pb2_grpc.py,*_pb2_grpc.pyi,*_pb2.py,*_pb2.pyi"
112
+
113
+ [tool.black]
114
+ extend-exclude = 'docs/|_pb2(_grpc)?\.(py|pyi)$'
115
+ line-length = 100
116
+
117
+ [tool.mypy]
118
+ mypy_path = "src"
119
+ files = "."
120
+ namespace_packages = true
121
+ strict = true
122
+ explicit_package_bases = true
123
+ exclude = ["docs"]
124
+
125
+ [[tool.mypy.overrides]]
126
+ module = [
127
+ "decouple",
128
+ "deprecation",
129
+ "ni_grpc_extensions.channelpool",
130
+ "nidaqmx",
131
+ "nidcpower",
132
+ "nidigital",
133
+ "nidmm",
134
+ "nifgen",
135
+ "niscope",
136
+ "niswitch"
137
+ ]
138
+ ignore_missing_imports = true
139
+
140
+ [[tool.mypy.overrides]]
141
+ module = "ni.measurementlink.sessionmanagement.v1.client._drivers._grpcdevice"
142
+ disable_error_code = ["no-any-return"]
143
+
144
+
145
+ [[tool.mypy.overrides]]
146
+ module = "ni_grpc_extensions.channelpool"
147
+ ignore_missing_imports = true
148
+
149
+ [tool.pyright]
150
+ include = ["src/"]
151
+ exclude = ["**/*_pb2_grpc.py", "**/*_pb2_grpc.pyi", "**/*_pb2.py", "**/*_pb2.pyi"]
152
+
153
+ [tool.pytest.ini_options]
154
+ addopts = "--doctest-modules --doctest-plus --strict-markers"
155
+ testpaths = ["tests"]
@@ -0,0 +1,107 @@
1
+ """Public API for accessing the measurement plug-in management service."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import warnings
6
+ from typing import Any
7
+
8
+ from deprecation import DeprecatedWarning
9
+
10
+ from ni.measurementlink.sessionmanagement.v1.client._client import (
11
+ SessionManagementClient,
12
+ )
13
+ from ni.measurementlink.sessionmanagement.v1.client._constants import (
14
+ GRPC_SERVICE_CLASS,
15
+ GRPC_SERVICE_INTERFACE_NAME,
16
+ INSTRUMENT_TYPE_NI_DAQMX,
17
+ INSTRUMENT_TYPE_NI_DCPOWER,
18
+ INSTRUMENT_TYPE_NI_DIGITAL_PATTERN,
19
+ INSTRUMENT_TYPE_NI_DMM,
20
+ INSTRUMENT_TYPE_NI_FGEN,
21
+ INSTRUMENT_TYPE_NI_HSDIO,
22
+ INSTRUMENT_TYPE_NI_MODEL_BASED_INSTRUMENT,
23
+ INSTRUMENT_TYPE_NI_RELAY_DRIVER,
24
+ INSTRUMENT_TYPE_NI_RFMX,
25
+ INSTRUMENT_TYPE_NI_RFPM,
26
+ INSTRUMENT_TYPE_NI_RFSA,
27
+ INSTRUMENT_TYPE_NI_RFSG,
28
+ INSTRUMENT_TYPE_NI_SCOPE,
29
+ INSTRUMENT_TYPE_NI_SWITCH_EXECUTIVE_VIRTUAL_DEVICE,
30
+ INSTRUMENT_TYPE_NONE,
31
+ SITE_SYSTEM_PINS,
32
+ )
33
+ from ni.measurementlink.sessionmanagement.v1.client._reservation import (
34
+ BaseReservation,
35
+ MultiplexerSessionContainer,
36
+ MultiSessionReservation,
37
+ SingleSessionReservation,
38
+ )
39
+ from ni.measurementlink.sessionmanagement.v1.client._types import (
40
+ ChannelMapping,
41
+ Connection,
42
+ MultiplexerSessionInformation,
43
+ PinMapContext,
44
+ SessionInformation,
45
+ SessionInitializationBehavior,
46
+ TypedConnection,
47
+ TypedConnectionWithMultiplexer,
48
+ TypedMultiplexerSessionInformation,
49
+ TypedSessionInformation,
50
+ )
51
+
52
+ __all__ = [
53
+ "BaseReservation",
54
+ "ChannelMapping",
55
+ "Client",
56
+ "Connection",
57
+ "GRPC_SERVICE_CLASS",
58
+ "GRPC_SERVICE_INTERFACE_NAME",
59
+ "INSTRUMENT_TYPE_NI_DAQMX",
60
+ "INSTRUMENT_TYPE_NI_DCPOWER",
61
+ "INSTRUMENT_TYPE_NI_DIGITAL_PATTERN",
62
+ "INSTRUMENT_TYPE_NI_DMM",
63
+ "INSTRUMENT_TYPE_NI_FGEN",
64
+ "INSTRUMENT_TYPE_NI_HSDIO",
65
+ "INSTRUMENT_TYPE_NI_MODEL_BASED_INSTRUMENT",
66
+ "INSTRUMENT_TYPE_NI_RELAY_DRIVER",
67
+ "INSTRUMENT_TYPE_NI_RFMX",
68
+ "INSTRUMENT_TYPE_NI_RFPM",
69
+ "INSTRUMENT_TYPE_NI_RFSA",
70
+ "INSTRUMENT_TYPE_NI_RFSG",
71
+ "INSTRUMENT_TYPE_NI_SCOPE",
72
+ "INSTRUMENT_TYPE_NI_SWITCH_EXECUTIVE_VIRTUAL_DEVICE",
73
+ "INSTRUMENT_TYPE_NONE",
74
+ "MultiSessionReservation",
75
+ "PinMapContext",
76
+ "MultiplexerSessionContainer",
77
+ "MultiplexerSessionInformation",
78
+ "SessionInformation",
79
+ "SessionInitializationBehavior",
80
+ "SessionManagementClient",
81
+ "SingleSessionReservation",
82
+ "SITE_SYSTEM_PINS",
83
+ "TypedConnection",
84
+ "TypedConnectionWithMultiplexer",
85
+ "TypedMultiplexerSessionInformation",
86
+ "TypedSessionInformation",
87
+ ]
88
+
89
+
90
+ def __getattr__(name: str) -> Any:
91
+ if name == "Reservation":
92
+ warnings.warn(
93
+ DeprecatedWarning(
94
+ name,
95
+ deprecated_in="1.1.0",
96
+ removed_in=None,
97
+ details="Use MultiSessionReservation instead.",
98
+ ),
99
+ stacklevel=2,
100
+ )
101
+ return MultiSessionReservation
102
+ else:
103
+ raise AttributeError(f"module {__name__} has no attribute {name}")
104
+
105
+
106
+ Client = SessionManagementClient
107
+ """Alias for compatibility with code that uses session_management.Client."""