slmp-connect-python 0.1.15__tar.gz → 0.8.0__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.
Files changed (35) hide show
  1. slmp_connect_python-0.8.0/MANIFEST.in +2 -0
  2. slmp_connect_python-0.8.0/PKG-INFO +100 -0
  3. slmp_connect_python-0.8.0/README.md +66 -0
  4. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/pyproject.toml +112 -111
  5. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/__init__.py +206 -196
  6. slmp_connect_python-0.8.0/slmp/_operations.py +1151 -0
  7. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/async_client.py +295 -563
  8. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/cli.py +139 -567
  9. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/client.py +273 -748
  10. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/core.py +182 -122
  11. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/device_ranges.py +102 -89
  12. slmp_connect_python-0.8.0/slmp/error_codes.py +2107 -0
  13. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/errors.py +17 -0
  14. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/utils.py +185 -204
  15. slmp_connect_python-0.8.0/slmp_connect_python.egg-info/PKG-INFO +100 -0
  16. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/SOURCES.txt +4 -9
  17. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/entry_points.txt +0 -2
  18. slmp_connect_python-0.1.15/PKG-INFO +0 -243
  19. slmp_connect_python-0.1.15/README.md +0 -209
  20. slmp_connect_python-0.1.15/slmp_connect_python.egg-info/PKG-INFO +0 -243
  21. slmp_connect_python-0.1.15/tests/test_async_client.py +0 -395
  22. slmp_connect_python-0.1.15/tests/test_bugs_and_edges.py +0 -32
  23. slmp_connect_python-0.1.15/tests/test_cpu_operation_state.py +0 -59
  24. slmp_connect_python-0.1.15/tests/test_device_ranges.py +0 -204
  25. slmp_connect_python-0.1.15/tests/test_device_vectors.py +0 -30
  26. slmp_connect_python-0.1.15/tests/test_shared_spec.py +0 -131
  27. slmp_connect_python-0.1.15/tests/test_slmp.py +0 -2814
  28. slmp_connect_python-0.1.15/tests/test_utils.py +0 -675
  29. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/LICENSE +0 -0
  30. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/setup.cfg +0 -0
  31. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/constants.py +0 -0
  32. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp/py.typed +0 -0
  33. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/dependency_links.txt +0 -0
  34. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/requires.txt +0 -0
  35. {slmp_connect_python-0.1.15 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/top_level.txt +0 -0
@@ -0,0 +1,2 @@
1
+ prune tests
2
+ prune internal_docs
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: slmp-connect-python
3
+ Version: 0.8.0
4
+ Summary: SLMP Connect Python: client library for MELSEC SLMP binary communication
5
+ Author: fa-yoshinobu
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/fa-yoshinobu/plc-comm-slmp-python
8
+ Project-URL: Repository, https://github.com/fa-yoshinobu/plc-comm-slmp-python
9
+ Project-URL: Issues, https://github.com/fa-yoshinobu/plc-comm-slmp-python/issues
10
+ Keywords: slmp,melsec,mitsubishi,plc,3e,4e,binary
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: Topic :: System :: Networking
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Provides-Extra: dev
25
+ Requires-Dist: build>=1.2; extra == "dev"
26
+ Requires-Dist: mypy>=1.10; extra == "dev"
27
+ Requires-Dist: pre-commit>=3.7; extra == "dev"
28
+ Requires-Dist: pytest>=8.0; extra == "dev"
29
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
30
+ Requires-Dist: pytest-cov>=5.0; extra == "dev"
31
+ Requires-Dist: ruff>=0.6; extra == "dev"
32
+ Requires-Dist: twine>=5.1; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ [![CI](https://github.com/fa-yoshinobu/plc-comm-slmp-python/actions/workflows/ci.yml/badge.svg)](https://github.com/fa-yoshinobu/plc-comm-slmp-python/actions/workflows/ci.yml)
36
+ [![Documentation](https://img.shields.io/badge/docs-GitHub_Pages-blue.svg)](https://fa-yoshinobu.github.io/plc-comm-docs-site/slmp/python/GETTING_STARTED/)
37
+ [![PyPI](https://img.shields.io/pypi/v/slmp-connect-python.svg)](https://pypi.org/project/slmp-connect-python/)
38
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
39
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
40
+ [![Static Analysis: Ruff](https://img.shields.io/badge/Lint-Ruff-black.svg)](https://github.com/astral-sh/ruff)
41
+ [![Release](https://img.shields.io/github/v/release/fa-yoshinobu/plc-comm-slmp-python?label=release)](https://github.com/fa-yoshinobu/plc-comm-slmp-python/releases/latest)
42
+ [![Python](https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white)](https://www.python.org/)
43
+ [![MkDocs](https://img.shields.io/badge/MkDocs-526CFE?logo=materialformkdocs&logoColor=white)](https://www.mkdocs.org/)
44
+
45
+ # MELSEC SLMP for Python
46
+
47
+ Python library for MELSEC SLMP (Binary 3E/4E) PLC communication.
48
+
49
+ ## Supported PLC profiles
50
+
51
+ The maintained profile table is in [PLC profiles](docsrc/user/PROFILES.md). Choose one exact canonical PLC profile from that table.
52
+
53
+ ## Supported device types
54
+
55
+ The maintained device and range tables are in [Supported registers](docsrc/user/SUPPORTED_REGISTERS.md). Use that page for supported device families, address syntax, and profile-specific notes.
56
+
57
+ ## Installation
58
+
59
+ ```bash
60
+ pip install slmp-connect-python
61
+ ```
62
+
63
+ ## Quick example
64
+
65
+ ```python
66
+ import asyncio
67
+ from slmp import SlmpConnectionOptions, open_and_connect, read_typed
68
+
69
+ async def main() -> None:
70
+ options = SlmpConnectionOptions(host="192.168.250.100", port=1025, plc_profile="melsec:iq-r")
71
+ async with await open_and_connect(options) as client:
72
+ value = await read_typed(client, "D100", "U")
73
+ print(f"D100={value}")
74
+
75
+ asyncio.run(main())
76
+ ```
77
+
78
+ ## Documentation
79
+
80
+ | Page | Use it for |
81
+ | --- | --- |
82
+ | [Full documentation site](https://fa-yoshinobu.github.io/plc-comm-docs-site/) | Unified docs for all PLC communication libraries. |
83
+ | [Getting started](docsrc/user/GETTING_STARTED.md) | Install the package, connect to your PLC, and run your first SLMP read/write. |
84
+ | [Usage guide](docsrc/user/USAGE_GUIDE.md) | Use the high-level API and common SLMP workflows. |
85
+ | [Supported registers](docsrc/user/SUPPORTED_REGISTERS.md) | Check supported device families, address syntax, and numbering rules. |
86
+ | [PLC profiles](docsrc/user/PROFILES.md) | Choose the canonical MELSEC profile and frame behavior. |
87
+ | [Examples](samples/README.md) | Run maintained Python samples. |
88
+
89
+ ## Hardware verified
90
+
91
+ Live-device verification is maintained in [Latest communication verification](docsrc/user/LATEST_COMMUNICATION_VERIFICATION.md).
92
+ See that page for verified PLC models, transports, dates, limitations, and retained validation notes.
93
+
94
+ ## License and registry
95
+
96
+ | Item | Value |
97
+ | --- | --- |
98
+ | License | [MIT](LICENSE) |
99
+ | Registry | [PyPI](https://pypi.org/project/slmp-connect-python/) |
100
+ | Package | `slmp-connect-python` |
@@ -0,0 +1,66 @@
1
+ [![CI](https://github.com/fa-yoshinobu/plc-comm-slmp-python/actions/workflows/ci.yml/badge.svg)](https://github.com/fa-yoshinobu/plc-comm-slmp-python/actions/workflows/ci.yml)
2
+ [![Documentation](https://img.shields.io/badge/docs-GitHub_Pages-blue.svg)](https://fa-yoshinobu.github.io/plc-comm-docs-site/slmp/python/GETTING_STARTED/)
3
+ [![PyPI](https://img.shields.io/pypi/v/slmp-connect-python.svg)](https://pypi.org/project/slmp-connect-python/)
4
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
+ [![Static Analysis: Ruff](https://img.shields.io/badge/Lint-Ruff-black.svg)](https://github.com/astral-sh/ruff)
7
+ [![Release](https://img.shields.io/github/v/release/fa-yoshinobu/plc-comm-slmp-python?label=release)](https://github.com/fa-yoshinobu/plc-comm-slmp-python/releases/latest)
8
+ [![Python](https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white)](https://www.python.org/)
9
+ [![MkDocs](https://img.shields.io/badge/MkDocs-526CFE?logo=materialformkdocs&logoColor=white)](https://www.mkdocs.org/)
10
+
11
+ # MELSEC SLMP for Python
12
+
13
+ Python library for MELSEC SLMP (Binary 3E/4E) PLC communication.
14
+
15
+ ## Supported PLC profiles
16
+
17
+ The maintained profile table is in [PLC profiles](docsrc/user/PROFILES.md). Choose one exact canonical PLC profile from that table.
18
+
19
+ ## Supported device types
20
+
21
+ The maintained device and range tables are in [Supported registers](docsrc/user/SUPPORTED_REGISTERS.md). Use that page for supported device families, address syntax, and profile-specific notes.
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ pip install slmp-connect-python
27
+ ```
28
+
29
+ ## Quick example
30
+
31
+ ```python
32
+ import asyncio
33
+ from slmp import SlmpConnectionOptions, open_and_connect, read_typed
34
+
35
+ async def main() -> None:
36
+ options = SlmpConnectionOptions(host="192.168.250.100", port=1025, plc_profile="melsec:iq-r")
37
+ async with await open_and_connect(options) as client:
38
+ value = await read_typed(client, "D100", "U")
39
+ print(f"D100={value}")
40
+
41
+ asyncio.run(main())
42
+ ```
43
+
44
+ ## Documentation
45
+
46
+ | Page | Use it for |
47
+ | --- | --- |
48
+ | [Full documentation site](https://fa-yoshinobu.github.io/plc-comm-docs-site/) | Unified docs for all PLC communication libraries. |
49
+ | [Getting started](docsrc/user/GETTING_STARTED.md) | Install the package, connect to your PLC, and run your first SLMP read/write. |
50
+ | [Usage guide](docsrc/user/USAGE_GUIDE.md) | Use the high-level API and common SLMP workflows. |
51
+ | [Supported registers](docsrc/user/SUPPORTED_REGISTERS.md) | Check supported device families, address syntax, and numbering rules. |
52
+ | [PLC profiles](docsrc/user/PROFILES.md) | Choose the canonical MELSEC profile and frame behavior. |
53
+ | [Examples](samples/README.md) | Run maintained Python samples. |
54
+
55
+ ## Hardware verified
56
+
57
+ Live-device verification is maintained in [Latest communication verification](docsrc/user/LATEST_COMMUNICATION_VERIFICATION.md).
58
+ See that page for verified PLC models, transports, dates, limitations, and retained validation notes.
59
+
60
+ ## License and registry
61
+
62
+ | Item | Value |
63
+ | --- | --- |
64
+ | License | [MIT](LICENSE) |
65
+ | Registry | [PyPI](https://pypi.org/project/slmp-connect-python/) |
66
+ | Package | `slmp-connect-python` |
@@ -1,111 +1,112 @@
1
- [build-system]
2
- requires = ["setuptools>=69", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "slmp-connect-python"
7
- version = "0.1.15"
8
- description = "SLMP Connect Python: client library for Mitsubishi SLMP binary communication"
9
- readme = "README.md"
10
- requires-python = ">=3.10"
11
- dependencies = []
12
- authors = [{ name = "fa-yoshinobu" }]
13
- license = "MIT"
14
-
15
- license-files = ["LICENSE"]
16
- keywords = ["slmp", "melsec", "mitsubishi", "plc", "3e", "4e", "binary"]
17
- classifiers = [
18
- "Development Status :: 3 - Alpha",
19
- "Intended Audience :: Developers",
20
- "Programming Language :: Python :: 3",
21
- "Programming Language :: Python :: 3.10",
22
- "Programming Language :: Python :: 3.11",
23
- "Programming Language :: Python :: 3.12",
24
- "Programming Language :: Python :: 3.13",
25
- "Programming Language :: Python :: 3.14",
26
- "Topic :: Software Development :: Libraries :: Python Modules",
27
- "Topic :: System :: Networking",
28
- ]
29
-
30
- [project.urls]
31
- Homepage = "https://github.com/fa-yoshinobu/plc-comm-slmp-python"
32
- Repository = "https://github.com/fa-yoshinobu/plc-comm-slmp-python"
33
- Issues = "https://github.com/fa-yoshinobu/plc-comm-slmp-python/issues"
34
-
35
- [project.optional-dependencies]
36
- dev = [
37
- "build>=1.2",
38
- "mypy>=1.10",
39
- "pre-commit>=3.7",
40
- "pytest>=8.0",
41
- "pytest-asyncio>=0.23",
42
- "pytest-cov>=5.0",
43
- "ruff>=0.6",
44
- "twine>=5.1",
45
- ]
46
-
47
- [project.scripts]
48
- slmp-connection-check = "slmp.cli:connection_check_main"
49
- slmp-device-range-probe = "slmp.cli:device_range_probe_main"
50
- slmp-register-boundary-probe = "slmp.cli:register_boundary_probe_main"
51
- slmp-other-station-check = "slmp.cli:other_station_check_main"
52
- slmp-open-items-recheck = "slmp.cli:open_items_recheck_main"
53
- slmp-g-hg-extended-device-recheck = "slmp.cli:g_hg_extended_device_recheck_main"
54
- slmp-g-hg-extended-device-coverage = "slmp.cli:g_hg_extended_device_coverage_main"
55
- slmp-extended-device-recheck = "slmp.cli:extended_device_recheck_main"
56
- slmp-pending-live-verification = "slmp.cli:pending_live_verification_main"
57
- slmp-init-model-docs = "slmp.cli:init_model_docs_main"
58
- slmp-device-access-matrix-sync = "slmp.cli:device_access_matrix_sync_main"
59
- slmp-manual-write-verification = "slmp.cli:manual_write_verification_main"
60
- slmp-manual-label-verification = "slmp.cli:manual_label_verification_main"
61
- slmp-read-soak = "slmp.cli:read_soak_main"
62
- slmp-mixed-read-load = "slmp.cli:mixed_read_load_main"
63
- slmp-tcp-concurrency = "slmp.cli:tcp_concurrency_main"
64
- slmp-regression-suite = "slmp.cli:regression_suite_main"
65
-
66
- [tool.setuptools.packages.find]
67
- include = ["slmp*"]
68
- exclude = ["tests*", "scripts*", "internal_docs*"]
69
-
70
- [tool.setuptools]
71
- include-package-data = true
72
- exclude-package-data = { "*" = ["TODO.md", ".pre-commit-config.yaml"] }
73
-
74
- [tool.setuptools.package-data]
75
- slmp = ["py.typed"]
76
-
77
- [tool.ruff]
78
- line-length = 120
79
- target-version = "py310"
80
-
81
- [tool.ruff.lint]
82
- select = ["E", "F", "I", "B", "UP"]
83
-
84
- [tool.ruff.lint.isort]
85
- known-first-party = ["slmp"]
86
-
87
- [tool.mypy]
88
- files = ["slmp"]
89
- warn_unused_configs = true
90
- disallow_untyped_defs = true
91
- check_untyped_defs = true
92
- disallow_incomplete_defs = true
93
- no_implicit_optional = true
94
- warn_redundant_casts = true
95
- warn_unused_ignores = true
96
- warn_return_any = true
97
- strict_equality = true
98
-
99
- [tool.coverage.run]
100
- source = ["slmp"]
101
- branch = true
102
-
103
- [tool.pytest.ini_options]
104
- testpaths = ["tests"]
105
- asyncio_mode = "auto"
106
-
107
- [tool.coverage.report]
108
- show_missing = true
109
-
110
-
111
-
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "slmp-connect-python"
7
+ version = "0.8.0"
8
+ description = "SLMP Connect Python: client library for MELSEC SLMP binary communication"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ dependencies = []
12
+ authors = [{ name = "fa-yoshinobu" }]
13
+ license = "MIT"
14
+
15
+ license-files = ["LICENSE"]
16
+ keywords = ["slmp", "melsec", "mitsubishi", "plc", "3e", "4e", "binary"]
17
+ classifiers = [
18
+ "Development Status :: 3 - Alpha",
19
+ "Intended Audience :: Developers",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: 3.14",
26
+ "Topic :: Software Development :: Libraries :: Python Modules",
27
+ "Topic :: System :: Networking",
28
+ ]
29
+
30
+ [project.urls]
31
+ Homepage = "https://github.com/fa-yoshinobu/plc-comm-slmp-python"
32
+ Repository = "https://github.com/fa-yoshinobu/plc-comm-slmp-python"
33
+ Issues = "https://github.com/fa-yoshinobu/plc-comm-slmp-python/issues"
34
+
35
+ [project.optional-dependencies]
36
+ dev = [
37
+ "build>=1.2",
38
+ "mypy>=1.10",
39
+ "pre-commit>=3.7",
40
+ "pytest>=8.0",
41
+ "pytest-asyncio>=0.23",
42
+ "pytest-cov>=5.0",
43
+ "ruff>=0.6",
44
+ "twine>=5.1",
45
+ ]
46
+
47
+ [project.scripts]
48
+ slmp-connection-check = "slmp.cli:connection_check_main"
49
+ slmp-device-range-probe = "slmp.cli:device_range_probe_main"
50
+ slmp-register-boundary-probe = "slmp.cli:register_boundary_probe_main"
51
+ slmp-other-station-check = "slmp.cli:other_station_check_main"
52
+ slmp-open-items-recheck = "slmp.cli:open_items_recheck_main"
53
+ slmp-g-hg-extended-device-recheck = "slmp.cli:g_hg_extended_device_recheck_main"
54
+ slmp-g-hg-extended-device-coverage = "slmp.cli:g_hg_extended_device_coverage_main"
55
+ slmp-extended-device-recheck = "slmp.cli:extended_device_recheck_main"
56
+ slmp-pending-live-verification = "slmp.cli:pending_live_verification_main"
57
+ slmp-init-model-docs = "slmp.cli:init_model_docs_main"
58
+ slmp-manual-label-verification = "slmp.cli:manual_label_verification_main"
59
+ slmp-read-soak = "slmp.cli:read_soak_main"
60
+ slmp-mixed-read-load = "slmp.cli:mixed_read_load_main"
61
+ slmp-tcp-concurrency = "slmp.cli:tcp_concurrency_main"
62
+ slmp-regression-suite = "slmp.cli:regression_suite_main"
63
+
64
+ [tool.setuptools.packages.find]
65
+ include = ["slmp*"]
66
+ exclude = ["tests*", "scripts*", "internal_docs*"]
67
+
68
+ [tool.setuptools]
69
+ include-package-data = true
70
+ exclude-package-data = { "*" = ["TODO.md", ".pre-commit-config.yaml"] }
71
+
72
+ [tool.setuptools.package-data]
73
+ slmp = ["py.typed"]
74
+
75
+ [tool.ruff]
76
+ line-length = 120
77
+ target-version = "py310"
78
+
79
+ [tool.ruff.lint]
80
+ select = ["E", "F", "I", "B", "UP"]
81
+
82
+ [tool.ruff.lint.per-file-ignores]
83
+ "slmp/error_codes.py" = ["E501"]
84
+
85
+ [tool.ruff.lint.isort]
86
+ known-first-party = ["slmp"]
87
+
88
+ [tool.mypy]
89
+ files = ["slmp"]
90
+ warn_unused_configs = true
91
+ disallow_untyped_defs = true
92
+ check_untyped_defs = true
93
+ disallow_incomplete_defs = true
94
+ no_implicit_optional = true
95
+ warn_redundant_casts = true
96
+ warn_unused_ignores = true
97
+ warn_return_any = true
98
+ strict_equality = true
99
+
100
+ [tool.coverage.run]
101
+ source = ["slmp"]
102
+ branch = true
103
+
104
+ [tool.pytest.ini_options]
105
+ testpaths = ["tests"]
106
+ asyncio_mode = "auto"
107
+
108
+ [tool.coverage.report]
109
+ show_missing = true
110
+
111
+
112
+