python-snap7 3.0.0__tar.gz → 3.1.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 (69) hide show
  1. {python_snap7-3.0.0/python_snap7.egg-info → python_snap7-3.1.0}/PKG-INFO +59 -22
  2. python_snap7-3.1.0/README.rst +81 -0
  3. {python_snap7-3.0.0 → python_snap7-3.1.0}/pyproject.toml +7 -2
  4. {python_snap7-3.0.0 → python_snap7-3.1.0/python_snap7.egg-info}/PKG-INFO +59 -22
  5. {python_snap7-3.0.0 → python_snap7-3.1.0}/python_snap7.egg-info/SOURCES.txt +25 -0
  6. {python_snap7-3.0.0 → python_snap7-3.1.0}/python_snap7.egg-info/entry_points.txt +1 -0
  7. {python_snap7-3.0.0 → python_snap7-3.1.0}/python_snap7.egg-info/requires.txt +10 -0
  8. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/__init__.py +11 -0
  9. python_snap7-3.1.0/snap7/async_client.py +1176 -0
  10. python_snap7-3.1.0/snap7/cli.py +416 -0
  11. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/client.py +1174 -432
  12. python_snap7-3.1.0/snap7/client_base.py +252 -0
  13. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/connection.py +67 -0
  14. python_snap7-3.1.0/snap7/demo.py +471 -0
  15. python_snap7-3.1.0/snap7/discovery.py +137 -0
  16. python_snap7-3.1.0/snap7/log.py +144 -0
  17. python_snap7-3.1.0/snap7/optimizer.py +293 -0
  18. python_snap7-3.1.0/snap7/partner.py +1109 -0
  19. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/s7protocol.py +184 -22
  20. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/server/__init__.py +144 -82
  21. python_snap7-3.1.0/snap7/szl.py +115 -0
  22. python_snap7-3.1.0/snap7/tags.py +820 -0
  23. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/type.py +1 -1
  24. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/util/__init__.py +16 -0
  25. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/util/db.py +4 -2
  26. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/util/getters.py +49 -43
  27. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/util/setters.py +164 -29
  28. python_snap7-3.1.0/snap7/util/symbols.py +547 -0
  29. {python_snap7-3.0.0 → python_snap7-3.1.0}/tests/test_api_surface.py +4 -0
  30. python_snap7-3.1.0/tests/test_async_client.py +384 -0
  31. python_snap7-3.1.0/tests/test_cli.py +170 -0
  32. {python_snap7-3.0.0 → python_snap7-3.1.0}/tests/test_client.py +2 -2
  33. python_snap7-3.1.0/tests/test_demo.py +163 -0
  34. python_snap7-3.1.0/tests/test_discovery.py +167 -0
  35. python_snap7-3.1.0/tests/test_finalize.py +33 -0
  36. python_snap7-3.1.0/tests/test_hypothesis.py +570 -0
  37. python_snap7-3.1.0/tests/test_logging.py +99 -0
  38. python_snap7-3.1.0/tests/test_logo_client.py +371 -0
  39. python_snap7-3.1.0/tests/test_optimizer.py +345 -0
  40. python_snap7-3.1.0/tests/test_partner.py +752 -0
  41. python_snap7-3.1.0/tests/test_property.py +234 -0
  42. python_snap7-3.1.0/tests/test_reconnect.py +447 -0
  43. python_snap7-3.1.0/tests/test_routing.py +225 -0
  44. python_snap7-3.1.0/tests/test_s7protocol.py +580 -0
  45. python_snap7-3.1.0/tests/test_server.py +596 -0
  46. python_snap7-3.1.0/tests/test_stress.py +127 -0
  47. python_snap7-3.1.0/tests/test_tags.py +554 -0
  48. python_snap7-3.1.0/tests/test_typed_access.py +202 -0
  49. {python_snap7-3.0.0 → python_snap7-3.1.0}/tests/test_util.py +688 -13
  50. python_snap7-3.0.0/README.rst +0 -52
  51. python_snap7-3.0.0/snap7/partner.py +0 -680
  52. python_snap7-3.0.0/tests/test_logo_client.py +0 -128
  53. python_snap7-3.0.0/tests/test_partner.py +0 -120
  54. python_snap7-3.0.0/tests/test_server.py +0 -244
  55. {python_snap7-3.0.0 → python_snap7-3.1.0}/LICENSE +0 -0
  56. {python_snap7-3.0.0 → python_snap7-3.1.0}/MANIFEST.in +0 -0
  57. {python_snap7-3.0.0 → python_snap7-3.1.0}/python_snap7.egg-info/dependency_links.txt +0 -0
  58. {python_snap7-3.0.0 → python_snap7-3.1.0}/python_snap7.egg-info/top_level.txt +0 -0
  59. {python_snap7-3.0.0 → python_snap7-3.1.0}/setup.cfg +0 -0
  60. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/datatypes.py +0 -0
  61. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/error.py +0 -0
  62. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/logo.py +0 -0
  63. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/py.typed +0 -0
  64. {python_snap7-3.0.0 → python_snap7-3.1.0}/snap7/server/__main__.py +0 -0
  65. {python_snap7-3.0.0 → python_snap7-3.1.0}/tests/test_behavioral_compatibility.py +0 -0
  66. {python_snap7-3.0.0 → python_snap7-3.1.0}/tests/test_client_e2e.py +0 -0
  67. {python_snap7-3.0.0 → python_snap7-3.1.0}/tests/test_datatypes.py +0 -0
  68. {python_snap7-3.0.0 → python_snap7-3.1.0}/tests/test_mainloop.py +0 -0
  69. {python_snap7-3.0.0 → python_snap7-3.1.0}/tests/test_multipacket.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-snap7
3
- Version: 3.0.0
3
+ Version: 3.1.0
4
4
  Summary: Pure Python S7 communication library for Siemens PLCs
5
5
  Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
6
6
  License: MIT
@@ -23,8 +23,10 @@ Description-Content-Type: text/x-rst
23
23
  License-File: LICENSE
24
24
  Provides-Extra: test
25
25
  Requires-Dist: pytest; extra == "test"
26
+ Requires-Dist: pytest-asyncio; extra == "test"
26
27
  Requires-Dist: pytest-cov; extra == "test"
27
28
  Requires-Dist: pytest-html; extra == "test"
29
+ Requires-Dist: hypothesis; extra == "test"
28
30
  Requires-Dist: mypy; extra == "test"
29
31
  Requires-Dist: types-setuptools; extra == "test"
30
32
  Requires-Dist: ruff; extra == "test"
@@ -35,9 +37,15 @@ Requires-Dist: uv; extra == "test"
35
37
  Provides-Extra: cli
36
38
  Requires-Dist: rich; extra == "cli"
37
39
  Requires-Dist: click; extra == "cli"
40
+ Provides-Extra: demo
41
+ Requires-Dist: psutil; extra == "demo"
42
+ Requires-Dist: rich; extra == "demo"
43
+ Requires-Dist: click; extra == "demo"
38
44
  Provides-Extra: doc
39
45
  Requires-Dist: sphinx; extra == "doc"
40
46
  Requires-Dist: sphinx_rtd_theme; extra == "doc"
47
+ Provides-Extra: discovery
48
+ Requires-Dist: pnio-dcp; extra == "discovery"
41
49
  Dynamic: license-file
42
50
 
43
51
  About
@@ -54,34 +62,63 @@ Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
54
62
  The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
55
63
 
56
64
 
57
- Version 3.0 - Pure Python Rewrite
58
- ==================================
65
+ Quick Start
66
+ ===========
59
67
 
60
- Version 3.0 is a ground-up rewrite of python-snap7. The library no longer wraps the
61
- C snap7 shared library — instead, the entire S7 protocol stack (TPKT, COTP, and S7)
62
- is now implemented in pure Python. This is a **breaking change** from all previous
63
- versions.
68
+ Connect to any S7 PLC::
64
69
 
65
- **Why this matters:**
70
+ import snap7
66
71
 
67
- * **Portability**: No more platform-specific shared libraries (`.dll`, `.so`, `.dylib`).
68
- python-snap7 now works on any platform that runs Python — including ARM, Alpine Linux,
69
- and other environments where the C library was difficult or impossible to install.
70
- * **Easier installation**: Just ``pip install python-snap7``. No native dependencies,
71
- no compiler toolchains, no manual library setup.
72
- * **Easier to extend**: New features and protocol support can be added directly in Python.
72
+ client = snap7.Client()
73
+ client.connect("192.168.1.10", 0, 1)
74
+ data = client.db_read(1, 0, 4)
75
+ client.disconnect()
76
+
77
+ No native libraries or platform-specific dependencies are required.
78
+
79
+ Async support::
80
+
81
+ import asyncio
82
+ import snap7
83
+
84
+ async def main():
85
+ async with snap7.AsyncClient() as client:
86
+ await client.connect("192.168.1.10", 0, 1)
87
+ data = await client.db_read(1, 0, 4)
73
88
 
74
- **If you experience issues with 3.0:**
89
+ asyncio.run(main())
75
90
 
76
- 1. Please report them on the `issue tracker <https://github.com/gijzelaerr/python-snap7/issues>`_
77
- with a clear description of the problem and the version you are using
78
- (``python -c "import snap7; print(snap7.__version__)"``).
79
- 2. As a workaround, you can pin to the last pre-3.0 release::
80
91
 
81
- $ pip install "python-snap7<3"
92
+ What's New in 3.1
93
+ =================
82
94
 
83
- The latest stable pre-3.0 release is version 2.1.0. Documentation for pre-3.0
84
- versions is available at `Read The Docs <https://python-snap7.readthedocs.io/en/v2/>`_.
95
+ * **AsyncClient** for ``asyncio`` support
96
+ * **Tag API** -- read/write by name: ``client.read_tag("DB1.DBD0:REAL")``
97
+ with PLC4X and nodeS7 dialect support
98
+ * **Multi-variable read optimizer** -- merges scattered reads into minimal
99
+ PDU exchanges
100
+ * **S7 routing** -- connect to PLCs on remote subnets via a gateway PLC
101
+ * **Heartbeat monitoring** and auto-reconnect with exponential backoff
102
+ * **Structured logging** with PLC connection context
103
+ * **PROFINET DCP** network discovery
104
+ * **CLI tools** for PLC interaction (``pip install "python-snap7[cli]"``)
105
+ * Numerous bug fixes -- see `CHANGES.md <https://github.com/gijzelaerr/python-snap7/blob/master/CHANGES.md>`_
106
+ for the full list
107
+
108
+
109
+ Version 3.0 -- Pure Python Rewrite
110
+ ====================================
111
+
112
+ Version 3.0 was a ground-up rewrite of python-snap7. The library no longer wraps
113
+ the C snap7 shared library -- instead, the entire S7 protocol stack (TPKT, COTP,
114
+ and S7) is implemented in pure Python.
115
+
116
+ * **Portability**: No more platform-specific shared libraries (``.dll``, ``.so``, ``.dylib``).
117
+ Works on any platform that runs Python -- including ARM, Alpine Linux, and other
118
+ environments where the C library was difficult or impossible to install.
119
+ * **Easier installation**: Just ``pip install python-snap7``. No native dependencies,
120
+ no compiler toolchains, no manual library setup.
121
+ * **Easier to extend**: New features and protocol support can be added directly in Python.
85
122
 
86
123
 
87
124
  Installation
@@ -0,0 +1,81 @@
1
+ About
2
+ =====
3
+
4
+ Python-snap7 is a pure Python S7 communication library for interfacing with Siemens S7 PLCs.
5
+
6
+ The name "python-snap7" is historical — the library originally started as a Python wrapper
7
+ around the `Snap7 <http://snap7.sourceforge.net/>`_ C library. As of version 3.0, the C
8
+ library is no longer used, but the name is kept for backwards compatibility.
9
+
10
+ Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
11
+
12
+ The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
13
+
14
+
15
+ Quick Start
16
+ ===========
17
+
18
+ Connect to any S7 PLC::
19
+
20
+ import snap7
21
+
22
+ client = snap7.Client()
23
+ client.connect("192.168.1.10", 0, 1)
24
+ data = client.db_read(1, 0, 4)
25
+ client.disconnect()
26
+
27
+ No native libraries or platform-specific dependencies are required.
28
+
29
+ Async support::
30
+
31
+ import asyncio
32
+ import snap7
33
+
34
+ async def main():
35
+ async with snap7.AsyncClient() as client:
36
+ await client.connect("192.168.1.10", 0, 1)
37
+ data = await client.db_read(1, 0, 4)
38
+
39
+ asyncio.run(main())
40
+
41
+
42
+ What's New in 3.1
43
+ =================
44
+
45
+ * **AsyncClient** for ``asyncio`` support
46
+ * **Tag API** -- read/write by name: ``client.read_tag("DB1.DBD0:REAL")``
47
+ with PLC4X and nodeS7 dialect support
48
+ * **Multi-variable read optimizer** -- merges scattered reads into minimal
49
+ PDU exchanges
50
+ * **S7 routing** -- connect to PLCs on remote subnets via a gateway PLC
51
+ * **Heartbeat monitoring** and auto-reconnect with exponential backoff
52
+ * **Structured logging** with PLC connection context
53
+ * **PROFINET DCP** network discovery
54
+ * **CLI tools** for PLC interaction (``pip install "python-snap7[cli]"``)
55
+ * Numerous bug fixes -- see `CHANGES.md <https://github.com/gijzelaerr/python-snap7/blob/master/CHANGES.md>`_
56
+ for the full list
57
+
58
+
59
+ Version 3.0 -- Pure Python Rewrite
60
+ ====================================
61
+
62
+ Version 3.0 was a ground-up rewrite of python-snap7. The library no longer wraps
63
+ the C snap7 shared library -- instead, the entire S7 protocol stack (TPKT, COTP,
64
+ and S7) is implemented in pure Python.
65
+
66
+ * **Portability**: No more platform-specific shared libraries (``.dll``, ``.so``, ``.dylib``).
67
+ Works on any platform that runs Python -- including ARM, Alpine Linux, and other
68
+ environments where the C library was difficult or impossible to install.
69
+ * **Easier installation**: Just ``pip install python-snap7``. No native dependencies,
70
+ no compiler toolchains, no manual library setup.
71
+ * **Easier to extend**: New features and protocol support can be added directly in Python.
72
+
73
+
74
+ Installation
75
+ ============
76
+
77
+ Install using pip::
78
+
79
+ $ pip install python-snap7
80
+
81
+ No native libraries or platform-specific dependencies are required — python-snap7 is a pure Python package that works on all platforms.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-snap7"
7
- version = "3.0.0"
7
+ version = "3.1.0"
8
8
  description = "Pure Python S7 communication library for Siemens PLCs"
9
9
  readme = "README.rst"
10
10
  authors = [
@@ -32,9 +32,11 @@ Homepage = "https://github.com/gijzelaerr/python-snap7"
32
32
  Documentation = "https://python-snap7.readthedocs.io/en/latest/"
33
33
 
34
34
  [project.optional-dependencies]
35
- test = ["pytest", "pytest-cov", "pytest-html", "mypy", "types-setuptools", "ruff", "tox", "tox-uv", "types-click", "uv"]
35
+ test = ["pytest", "pytest-asyncio", "pytest-cov", "pytest-html", "hypothesis", "mypy", "types-setuptools", "ruff", "tox", "tox-uv", "types-click", "uv"]
36
36
  cli = ["rich", "click" ]
37
+ demo = ["psutil", "rich", "click"]
37
38
  doc = ["sphinx", "sphinx_rtd_theme"]
39
+ discovery = ["pnio-dcp"]
38
40
 
39
41
  [tool.setuptools.package-data]
40
42
  snap7 = ["py.typed"]
@@ -44,6 +46,7 @@ include = ["snap7*"]
44
46
 
45
47
  [project.scripts]
46
48
  snap7-server = "snap7.server:mainloop"
49
+ s7 = "snap7.cli:main"
47
50
 
48
51
  [tool.pytest.ini_options]
49
52
  testpaths = ["tests"]
@@ -51,9 +54,11 @@ markers =[
51
54
  "client",
52
55
  "common",
53
56
  "e2e: end-to-end tests requiring a real PLC connection",
57
+ "hypothesis: property-based tests using Hypothesis",
54
58
  "logo",
55
59
  "mainloop",
56
60
  "partner",
61
+ "routing",
57
62
  "server",
58
63
  "util"
59
64
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-snap7
3
- Version: 3.0.0
3
+ Version: 3.1.0
4
4
  Summary: Pure Python S7 communication library for Siemens PLCs
5
5
  Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
6
6
  License: MIT
@@ -23,8 +23,10 @@ Description-Content-Type: text/x-rst
23
23
  License-File: LICENSE
24
24
  Provides-Extra: test
25
25
  Requires-Dist: pytest; extra == "test"
26
+ Requires-Dist: pytest-asyncio; extra == "test"
26
27
  Requires-Dist: pytest-cov; extra == "test"
27
28
  Requires-Dist: pytest-html; extra == "test"
29
+ Requires-Dist: hypothesis; extra == "test"
28
30
  Requires-Dist: mypy; extra == "test"
29
31
  Requires-Dist: types-setuptools; extra == "test"
30
32
  Requires-Dist: ruff; extra == "test"
@@ -35,9 +37,15 @@ Requires-Dist: uv; extra == "test"
35
37
  Provides-Extra: cli
36
38
  Requires-Dist: rich; extra == "cli"
37
39
  Requires-Dist: click; extra == "cli"
40
+ Provides-Extra: demo
41
+ Requires-Dist: psutil; extra == "demo"
42
+ Requires-Dist: rich; extra == "demo"
43
+ Requires-Dist: click; extra == "demo"
38
44
  Provides-Extra: doc
39
45
  Requires-Dist: sphinx; extra == "doc"
40
46
  Requires-Dist: sphinx_rtd_theme; extra == "doc"
47
+ Provides-Extra: discovery
48
+ Requires-Dist: pnio-dcp; extra == "discovery"
41
49
  Dynamic: license-file
42
50
 
43
51
  About
@@ -54,34 +62,63 @@ Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
54
62
  The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
55
63
 
56
64
 
57
- Version 3.0 - Pure Python Rewrite
58
- ==================================
65
+ Quick Start
66
+ ===========
59
67
 
60
- Version 3.0 is a ground-up rewrite of python-snap7. The library no longer wraps the
61
- C snap7 shared library — instead, the entire S7 protocol stack (TPKT, COTP, and S7)
62
- is now implemented in pure Python. This is a **breaking change** from all previous
63
- versions.
68
+ Connect to any S7 PLC::
64
69
 
65
- **Why this matters:**
70
+ import snap7
66
71
 
67
- * **Portability**: No more platform-specific shared libraries (`.dll`, `.so`, `.dylib`).
68
- python-snap7 now works on any platform that runs Python — including ARM, Alpine Linux,
69
- and other environments where the C library was difficult or impossible to install.
70
- * **Easier installation**: Just ``pip install python-snap7``. No native dependencies,
71
- no compiler toolchains, no manual library setup.
72
- * **Easier to extend**: New features and protocol support can be added directly in Python.
72
+ client = snap7.Client()
73
+ client.connect("192.168.1.10", 0, 1)
74
+ data = client.db_read(1, 0, 4)
75
+ client.disconnect()
76
+
77
+ No native libraries or platform-specific dependencies are required.
78
+
79
+ Async support::
80
+
81
+ import asyncio
82
+ import snap7
83
+
84
+ async def main():
85
+ async with snap7.AsyncClient() as client:
86
+ await client.connect("192.168.1.10", 0, 1)
87
+ data = await client.db_read(1, 0, 4)
73
88
 
74
- **If you experience issues with 3.0:**
89
+ asyncio.run(main())
75
90
 
76
- 1. Please report them on the `issue tracker <https://github.com/gijzelaerr/python-snap7/issues>`_
77
- with a clear description of the problem and the version you are using
78
- (``python -c "import snap7; print(snap7.__version__)"``).
79
- 2. As a workaround, you can pin to the last pre-3.0 release::
80
91
 
81
- $ pip install "python-snap7<3"
92
+ What's New in 3.1
93
+ =================
82
94
 
83
- The latest stable pre-3.0 release is version 2.1.0. Documentation for pre-3.0
84
- versions is available at `Read The Docs <https://python-snap7.readthedocs.io/en/v2/>`_.
95
+ * **AsyncClient** for ``asyncio`` support
96
+ * **Tag API** -- read/write by name: ``client.read_tag("DB1.DBD0:REAL")``
97
+ with PLC4X and nodeS7 dialect support
98
+ * **Multi-variable read optimizer** -- merges scattered reads into minimal
99
+ PDU exchanges
100
+ * **S7 routing** -- connect to PLCs on remote subnets via a gateway PLC
101
+ * **Heartbeat monitoring** and auto-reconnect with exponential backoff
102
+ * **Structured logging** with PLC connection context
103
+ * **PROFINET DCP** network discovery
104
+ * **CLI tools** for PLC interaction (``pip install "python-snap7[cli]"``)
105
+ * Numerous bug fixes -- see `CHANGES.md <https://github.com/gijzelaerr/python-snap7/blob/master/CHANGES.md>`_
106
+ for the full list
107
+
108
+
109
+ Version 3.0 -- Pure Python Rewrite
110
+ ====================================
111
+
112
+ Version 3.0 was a ground-up rewrite of python-snap7. The library no longer wraps
113
+ the C snap7 shared library -- instead, the entire S7 protocol stack (TPKT, COTP,
114
+ and S7) is implemented in pure Python.
115
+
116
+ * **Portability**: No more platform-specific shared libraries (``.dll``, ``.so``, ``.dylib``).
117
+ Works on any platform that runs Python -- including ARM, Alpine Linux, and other
118
+ environments where the C library was difficult or impossible to install.
119
+ * **Easier installation**: Just ``pip install python-snap7``. No native dependencies,
120
+ no compiler toolchains, no manual library setup.
121
+ * **Easier to extend**: New features and protocol support can be added directly in Python.
85
122
 
86
123
 
87
124
  Installation
@@ -9,14 +9,23 @@ python_snap7.egg-info/entry_points.txt
9
9
  python_snap7.egg-info/requires.txt
10
10
  python_snap7.egg-info/top_level.txt
11
11
  snap7/__init__.py
12
+ snap7/async_client.py
13
+ snap7/cli.py
12
14
  snap7/client.py
15
+ snap7/client_base.py
13
16
  snap7/connection.py
14
17
  snap7/datatypes.py
18
+ snap7/demo.py
19
+ snap7/discovery.py
15
20
  snap7/error.py
21
+ snap7/log.py
16
22
  snap7/logo.py
23
+ snap7/optimizer.py
17
24
  snap7/partner.py
18
25
  snap7/py.typed
19
26
  snap7/s7protocol.py
27
+ snap7/szl.py
28
+ snap7/tags.py
20
29
  snap7/type.py
21
30
  snap7/server/__init__.py
22
31
  snap7/server/__main__.py
@@ -24,14 +33,30 @@ snap7/util/__init__.py
24
33
  snap7/util/db.py
25
34
  snap7/util/getters.py
26
35
  snap7/util/setters.py
36
+ snap7/util/symbols.py
27
37
  tests/test_api_surface.py
38
+ tests/test_async_client.py
28
39
  tests/test_behavioral_compatibility.py
40
+ tests/test_cli.py
29
41
  tests/test_client.py
30
42
  tests/test_client_e2e.py
31
43
  tests/test_datatypes.py
44
+ tests/test_demo.py
45
+ tests/test_discovery.py
46
+ tests/test_finalize.py
47
+ tests/test_hypothesis.py
48
+ tests/test_logging.py
32
49
  tests/test_logo_client.py
33
50
  tests/test_mainloop.py
34
51
  tests/test_multipacket.py
52
+ tests/test_optimizer.py
35
53
  tests/test_partner.py
54
+ tests/test_property.py
55
+ tests/test_reconnect.py
56
+ tests/test_routing.py
57
+ tests/test_s7protocol.py
36
58
  tests/test_server.py
59
+ tests/test_stress.py
60
+ tests/test_tags.py
61
+ tests/test_typed_access.py
37
62
  tests/test_util.py
@@ -1,2 +1,3 @@
1
1
  [console_scripts]
2
+ s7 = snap7.cli:main
2
3
  snap7-server = snap7.server:mainloop
@@ -3,14 +3,24 @@
3
3
  rich
4
4
  click
5
5
 
6
+ [demo]
7
+ psutil
8
+ rich
9
+ click
10
+
11
+ [discovery]
12
+ pnio-dcp
13
+
6
14
  [doc]
7
15
  sphinx
8
16
  sphinx_rtd_theme
9
17
 
10
18
  [test]
11
19
  pytest
20
+ pytest-asyncio
12
21
  pytest-cov
13
22
  pytest-html
23
+ hypothesis
14
24
  mypy
15
25
  types-setuptools
16
26
  ruff
@@ -8,19 +8,30 @@ Siemens S7 PLCs without requiring the native Snap7 C library.
8
8
  from importlib.metadata import version, PackageNotFoundError
9
9
 
10
10
  from .client import Client
11
+ from .async_client import AsyncClient
11
12
  from .server import Server
12
13
  from .partner import Partner
13
14
  from .logo import Logo
14
15
  from .util.db import Row, DB
16
+ from .tags import NodeS7Tag, PLC4XTag, Tag, from_browse, load_csv, load_json, load_tia_xml, parse_tag
15
17
  from .type import Area, Block, WordLen, SrvEvent, SrvArea
16
18
 
17
19
  __all__ = [
18
20
  "Client",
21
+ "AsyncClient",
19
22
  "Server",
20
23
  "Partner",
21
24
  "Logo",
22
25
  "Row",
23
26
  "DB",
27
+ "Tag",
28
+ "PLC4XTag",
29
+ "NodeS7Tag",
30
+ "parse_tag",
31
+ "load_csv",
32
+ "load_json",
33
+ "load_tia_xml",
34
+ "from_browse",
24
35
  "Area",
25
36
  "Block",
26
37
  "WordLen",