python-snap7 3.0.0__py3-none-any.whl

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.
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-snap7
3
+ Version: 3.0.0
4
+ Summary: Pure Python S7 communication library for Siemens PLCs
5
+ Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/gijzelaerr/python-snap7
8
+ Project-URL: Documentation, https://python-snap7.readthedocs.io/en/latest/
9
+ Keywords: snap7,s7,siemens,plc
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Topic :: System :: Hardware
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Manufacturing
15
+ Classifier: Operating System :: POSIX
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/x-rst
23
+ License-File: LICENSE
24
+ Provides-Extra: test
25
+ Requires-Dist: pytest; extra == "test"
26
+ Requires-Dist: pytest-cov; extra == "test"
27
+ Requires-Dist: pytest-html; extra == "test"
28
+ Requires-Dist: mypy; extra == "test"
29
+ Requires-Dist: types-setuptools; extra == "test"
30
+ Requires-Dist: ruff; extra == "test"
31
+ Requires-Dist: tox; extra == "test"
32
+ Requires-Dist: tox-uv; extra == "test"
33
+ Requires-Dist: types-click; extra == "test"
34
+ Requires-Dist: uv; extra == "test"
35
+ Provides-Extra: cli
36
+ Requires-Dist: rich; extra == "cli"
37
+ Requires-Dist: click; extra == "cli"
38
+ Provides-Extra: doc
39
+ Requires-Dist: sphinx; extra == "doc"
40
+ Requires-Dist: sphinx_rtd_theme; extra == "doc"
41
+ Dynamic: license-file
42
+
43
+ About
44
+ =====
45
+
46
+ Python-snap7 is a pure Python S7 communication library for interfacing with Siemens S7 PLCs.
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
+
52
+ Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
53
+
54
+ The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
55
+
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
+
87
+ Installation
88
+ ============
89
+
90
+ Install using pip::
91
+
92
+ $ pip install python-snap7
93
+
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,22 @@
1
+ python_snap7-3.0.0.dist-info/licenses/LICENSE,sha256=PIihE_yP-8gc-ff9ikvQQPOa0biOCZ6Bc-6h3G3xRUQ,1097
2
+ snap7/__init__.py,sha256=zgekgZfrfkLLQw5mh5HrKInKxAVHPSsW9WowV9acd7M,688
3
+ snap7/client.py,sha256=DUynw_F4_jSEuCgrYWNcFNLt8e-SWxdh4vWyhlJRwv8,64518
4
+ snap7/connection.py,sha256=_Q8d3geGu2Zwm97E9G1fY7sVYrR4k_65cFaoJKXmK4s,14465
5
+ snap7/datatypes.py,sha256=zJgPasEV79_H4qHabivIxYX50j74pNg64apBppAKI2Y,11205
6
+ snap7/error.py,sha256=ToGa85aJ64lwdM5gPweqPZJD7xrgFSw2NK36VOYmXUg,21210
7
+ snap7/logo.py,sha256=lFhHELR8r3OAPRnJ_3crE0LpPxzBM2Qn5goD77HlskU,7084
8
+ snap7/partner.py,sha256=ztH7pN_vD6HgcMhynKi4OkFevQfiQjdIW_8ZVl_JKLg,20370
9
+ snap7/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ snap7/s7protocol.py,sha256=_vQaQhrQEhNiFCLAWZYxBhZA3H9Vjh5wC4e_aXXvdK0,50701
11
+ snap7/type.py,sha256=QOY6a6ngjAThzg885UzcsEv1NdKFMbe0NZGrIEtUntY,9395
12
+ snap7/server/__init__.py,sha256=I0CAmomXJcrXOj7GY8MGa4tjL6udBK6yed-DDkLqwgE,97799
13
+ snap7/server/__main__.py,sha256=OdOgyMmFThjSe2jSgvlbkquGYnZcBW6wubs2ldhNSOE,1206
14
+ snap7/util/__init__.py,sha256=ekvLJdNPCKaMl8noPdKOHsVBPFZ1O6jft50dqPKBgIg,1606
15
+ snap7/util/db.py,sha256=xi5OFxntFSQq6wLsc81RFWiHHNJgS9bdr9Vukbp7E0w,27013
16
+ snap7/util/getters.py,sha256=yiXVjOB3b6KDWF3TtkN_qRGbf2YZ7_EkL0-otiin1Xk,24189
17
+ snap7/util/setters.py,sha256=XE-GtFkWysSdFPDv_-cw1r0pOzLXi_OUyS3vUXP4bi4,23180
18
+ python_snap7-3.0.0.dist-info/METADATA,sha256=xABUgx5sXlsnfJUsa7XCg-qC2xwDKZYhmfULqdWShpo,3762
19
+ python_snap7-3.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
20
+ python_snap7-3.0.0.dist-info/entry_points.txt,sha256=_97I-xRqDu-9-dmpJgPgS-5l86GMIgyVRG6pnv0OiUQ,55
21
+ python_snap7-3.0.0.dist-info/top_level.txt,sha256=VpFXm1w5_73qgJEIN_5OzQWINHyYJBtNoOW4DMoizgw,6
22
+ python_snap7-3.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ snap7-server = snap7.server:mainloop
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Gijs Molenaar, Stephan Preeker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ snap7
snap7/__init__.py ADDED
@@ -0,0 +1,34 @@
1
+ """
2
+ The Snap7 Python library.
3
+
4
+ Pure Python implementation of the S7 protocol for communicating with
5
+ Siemens S7 PLCs without requiring the native Snap7 C library.
6
+ """
7
+
8
+ from importlib.metadata import version, PackageNotFoundError
9
+
10
+ from .client import Client
11
+ from .server import Server
12
+ from .partner import Partner
13
+ from .logo import Logo
14
+ from .util.db import Row, DB
15
+ from .type import Area, Block, WordLen, SrvEvent, SrvArea
16
+
17
+ __all__ = [
18
+ "Client",
19
+ "Server",
20
+ "Partner",
21
+ "Logo",
22
+ "Row",
23
+ "DB",
24
+ "Area",
25
+ "Block",
26
+ "WordLen",
27
+ "SrvEvent",
28
+ "SrvArea",
29
+ ]
30
+
31
+ try:
32
+ __version__ = version("python-snap7")
33
+ except PackageNotFoundError:
34
+ __version__ = "0.0rc0"