python-snap7 2.1.0__tar.gz → 3.0.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 (41) hide show
  1. {python_snap7-2.1.0/python_snap7.egg-info → python_snap7-3.0.0}/PKG-INFO +37 -2
  2. python_snap7-3.0.0/README.rst +52 -0
  3. {python_snap7-2.1.0 → python_snap7-3.0.0}/pyproject.toml +2 -2
  4. {python_snap7-2.1.0 → python_snap7-3.0.0/python_snap7.egg-info}/PKG-INFO +37 -2
  5. {python_snap7-2.1.0 → python_snap7-3.0.0}/python_snap7.egg-info/requires.txt +1 -0
  6. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/client.py +192 -234
  7. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/connection.py +63 -3
  8. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/datatypes.py +22 -21
  9. python_snap7-3.0.0/snap7/error.py +444 -0
  10. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/s7protocol.py +39 -10
  11. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/type.py +2 -2
  12. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/util/__init__.py +20 -0
  13. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/util/db.py +26 -1
  14. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/util/getters.py +71 -19
  15. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/util/setters.py +230 -32
  16. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_client.py +243 -2
  17. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_client_e2e.py +7 -1
  18. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_multipacket.py +98 -2
  19. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_util.py +174 -0
  20. python_snap7-2.1.0/README.rst +0 -18
  21. python_snap7-2.1.0/snap7/error.py +0 -202
  22. {python_snap7-2.1.0 → python_snap7-3.0.0}/LICENSE +0 -0
  23. {python_snap7-2.1.0 → python_snap7-3.0.0}/MANIFEST.in +0 -0
  24. {python_snap7-2.1.0 → python_snap7-3.0.0}/python_snap7.egg-info/SOURCES.txt +0 -0
  25. {python_snap7-2.1.0 → python_snap7-3.0.0}/python_snap7.egg-info/dependency_links.txt +0 -0
  26. {python_snap7-2.1.0 → python_snap7-3.0.0}/python_snap7.egg-info/entry_points.txt +0 -0
  27. {python_snap7-2.1.0 → python_snap7-3.0.0}/python_snap7.egg-info/top_level.txt +0 -0
  28. {python_snap7-2.1.0 → python_snap7-3.0.0}/setup.cfg +0 -0
  29. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/__init__.py +0 -0
  30. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/logo.py +0 -0
  31. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/partner.py +0 -0
  32. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/py.typed +0 -0
  33. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/server/__init__.py +0 -0
  34. {python_snap7-2.1.0 → python_snap7-3.0.0}/snap7/server/__main__.py +0 -0
  35. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_api_surface.py +0 -0
  36. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_behavioral_compatibility.py +0 -0
  37. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_datatypes.py +0 -0
  38. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_logo_client.py +0 -0
  39. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_mainloop.py +0 -0
  40. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_partner.py +0 -0
  41. {python_snap7-2.1.0 → python_snap7-3.0.0}/tests/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-snap7
3
- Version: 2.1.0
3
+ Version: 3.0.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,6 +23,7 @@ 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-cov; extra == "test"
26
27
  Requires-Dist: pytest-html; extra == "test"
27
28
  Requires-Dist: mypy; extra == "test"
28
29
  Requires-Dist: types-setuptools; extra == "test"
@@ -44,11 +45,45 @@ About
44
45
 
45
46
  Python-snap7 is a pure Python S7 communication library for interfacing with Siemens S7 PLCs.
46
47
 
48
+ The name "python-snap7" is historical — the library originally started as a Python wrapper
49
+ around the `Snap7 <http://snap7.sourceforge.net/>`_ C library. As of version 3.0, the C
50
+ library is no longer used, but the name is kept for backwards compatibility.
51
+
47
52
  Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
48
53
 
49
54
  The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
50
55
 
51
56
 
57
+ Version 3.0 - Pure Python Rewrite
58
+ ==================================
59
+
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.
64
+
65
+ **Why this matters:**
66
+
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.
73
+
74
+ **If you experience issues with 3.0:**
75
+
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
+
81
+ $ pip install "python-snap7<3"
82
+
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/>`_.
85
+
86
+
52
87
  Installation
53
88
  ============
54
89
 
@@ -56,4 +91,4 @@ Install using pip::
56
91
 
57
92
  $ pip install python-snap7
58
93
 
59
- No native libraries or platform-specific dependencies are required - python-snap7 is a pure Python package that works on all platforms.
94
+ No native libraries or platform-specific dependencies are required — python-snap7 is a pure Python package that works on all platforms.
@@ -0,0 +1,52 @@
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
+ Version 3.0 - Pure Python Rewrite
16
+ ==================================
17
+
18
+ Version 3.0 is a ground-up rewrite of python-snap7. The library no longer wraps the
19
+ C snap7 shared library — instead, the entire S7 protocol stack (TPKT, COTP, and S7)
20
+ is now implemented in pure Python. This is a **breaking change** from all previous
21
+ versions.
22
+
23
+ **Why this matters:**
24
+
25
+ * **Portability**: No more platform-specific shared libraries (`.dll`, `.so`, `.dylib`).
26
+ python-snap7 now works on any platform that runs Python — including ARM, Alpine Linux,
27
+ and other environments where the C library was difficult or impossible to install.
28
+ * **Easier installation**: Just ``pip install python-snap7``. No native dependencies,
29
+ no compiler toolchains, no manual library setup.
30
+ * **Easier to extend**: New features and protocol support can be added directly in Python.
31
+
32
+ **If you experience issues with 3.0:**
33
+
34
+ 1. Please report them on the `issue tracker <https://github.com/gijzelaerr/python-snap7/issues>`_
35
+ with a clear description of the problem and the version you are using
36
+ (``python -c "import snap7; print(snap7.__version__)"``).
37
+ 2. As a workaround, you can pin to the last pre-3.0 release::
38
+
39
+ $ pip install "python-snap7<3"
40
+
41
+ The latest stable pre-3.0 release is version 2.1.0. Documentation for pre-3.0
42
+ versions is available at `Read The Docs <https://python-snap7.readthedocs.io/en/v2/>`_.
43
+
44
+
45
+ Installation
46
+ ============
47
+
48
+ Install using pip::
49
+
50
+ $ pip install python-snap7
51
+
52
+ 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 = "2.1.0"
7
+ version = "3.0.0"
8
8
  description = "Pure Python S7 communication library for Siemens PLCs"
9
9
  readme = "README.rst"
10
10
  authors = [
@@ -32,7 +32,7 @@ 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-html", "mypy", "types-setuptools", "ruff", "tox", "tox-uv", "types-click", "uv"]
35
+ test = ["pytest", "pytest-cov", "pytest-html", "mypy", "types-setuptools", "ruff", "tox", "tox-uv", "types-click", "uv"]
36
36
  cli = ["rich", "click" ]
37
37
  doc = ["sphinx", "sphinx_rtd_theme"]
38
38
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-snap7
3
- Version: 2.1.0
3
+ Version: 3.0.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,6 +23,7 @@ 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-cov; extra == "test"
26
27
  Requires-Dist: pytest-html; extra == "test"
27
28
  Requires-Dist: mypy; extra == "test"
28
29
  Requires-Dist: types-setuptools; extra == "test"
@@ -44,11 +45,45 @@ About
44
45
 
45
46
  Python-snap7 is a pure Python S7 communication library for interfacing with Siemens S7 PLCs.
46
47
 
48
+ The name "python-snap7" is historical — the library originally started as a Python wrapper
49
+ around the `Snap7 <http://snap7.sourceforge.net/>`_ C library. As of version 3.0, the C
50
+ library is no longer used, but the name is kept for backwards compatibility.
51
+
47
52
  Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
48
53
 
49
54
  The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
50
55
 
51
56
 
57
+ Version 3.0 - Pure Python Rewrite
58
+ ==================================
59
+
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.
64
+
65
+ **Why this matters:**
66
+
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.
73
+
74
+ **If you experience issues with 3.0:**
75
+
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
+
81
+ $ pip install "python-snap7<3"
82
+
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/>`_.
85
+
86
+
52
87
  Installation
53
88
  ============
54
89
 
@@ -56,4 +91,4 @@ Install using pip::
56
91
 
57
92
  $ pip install python-snap7
58
93
 
59
- No native libraries or platform-specific dependencies are required - python-snap7 is a pure Python package that works on all platforms.
94
+ No native libraries or platform-specific dependencies are required — python-snap7 is a pure Python package that works on all platforms.
@@ -9,6 +9,7 @@ sphinx_rtd_theme
9
9
 
10
10
  [test]
11
11
  pytest
12
+ pytest-cov
12
13
  pytest-html
13
14
  mypy
14
15
  types-setuptools