slmp-connect-python 0.1.16__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 (38) 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.16 → slmp_connect_python-0.8.0}/pyproject.toml +112 -114
  5. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/__init__.py +206 -206
  6. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/_operations.py +71 -54
  7. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/async_client.py +61 -50
  8. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/cli.py +101 -580
  9. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/client.py +60 -59
  10. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/core.py +127 -115
  11. {slmp_connect_python-0.1.16 → 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.16 → slmp_connect_python-0.8.0}/slmp/utils.py +58 -56
  14. slmp_connect_python-0.8.0/slmp_connect_python.egg-info/PKG-INFO +100 -0
  15. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/SOURCES.txt +2 -11
  16. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/entry_points.txt +0 -2
  17. slmp_connect_python-0.1.16/PKG-INFO +0 -242
  18. slmp_connect_python-0.1.16/README.md +0 -208
  19. slmp_connect_python-0.1.16/slmp/error_codes.py +0 -2093
  20. slmp_connect_python-0.1.16/slmp_connect_python.egg-info/PKG-INFO +0 -242
  21. slmp_connect_python-0.1.16/tests/test_async_client.py +0 -419
  22. slmp_connect_python-0.1.16/tests/test_bugs_and_edges.py +0 -32
  23. slmp_connect_python-0.1.16/tests/test_cpu_operation_state.py +0 -59
  24. slmp_connect_python-0.1.16/tests/test_device_ranges.py +0 -204
  25. slmp_connect_python-0.1.16/tests/test_device_vectors.py +0 -30
  26. slmp_connect_python-0.1.16/tests/test_error_codes.py +0 -71
  27. slmp_connect_python-0.1.16/tests/test_shared_spec.py +0 -131
  28. slmp_connect_python-0.1.16/tests/test_slmp.py +0 -2861
  29. slmp_connect_python-0.1.16/tests/test_sync_async_parity.py +0 -482
  30. slmp_connect_python-0.1.16/tests/test_utils.py +0 -675
  31. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/LICENSE +0 -0
  32. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/setup.cfg +0 -0
  33. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/constants.py +0 -0
  34. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/errors.py +0 -0
  35. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp/py.typed +0 -0
  36. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/dependency_links.txt +0 -0
  37. {slmp_connect_python-0.1.16 → slmp_connect_python-0.8.0}/slmp_connect_python.egg-info/requires.txt +0 -0
  38. {slmp_connect_python-0.1.16 → 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,114 +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.16"
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.per-file-ignores]
85
- "slmp/error_codes.py" = ["E501"]
86
-
87
- [tool.ruff.lint.isort]
88
- known-first-party = ["slmp"]
89
-
90
- [tool.mypy]
91
- files = ["slmp"]
92
- warn_unused_configs = true
93
- disallow_untyped_defs = true
94
- check_untyped_defs = true
95
- disallow_incomplete_defs = true
96
- no_implicit_optional = true
97
- warn_redundant_casts = true
98
- warn_unused_ignores = true
99
- warn_return_any = true
100
- strict_equality = true
101
-
102
- [tool.coverage.run]
103
- source = ["slmp"]
104
- branch = true
105
-
106
- [tool.pytest.ini_options]
107
- testpaths = ["tests"]
108
- asyncio_mode = "auto"
109
-
110
- [tool.coverage.report]
111
- show_missing = true
112
-
113
-
114
-
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
+