python-snap7 2.0.1__tar.gz → 2.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.
- {python_snap7-2.0.1 → python_snap7-2.1.0}/PKG-INFO +13 -14
- python_snap7-2.1.0/README.rst +18 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/pyproject.toml +12 -12
- {python_snap7-2.0.1 → python_snap7-2.1.0}/python_snap7.egg-info/PKG-INFO +13 -14
- {python_snap7-2.0.1 → python_snap7-2.1.0}/python_snap7.egg-info/SOURCES.txt +8 -4
- python_snap7-2.1.0/python_snap7.egg-info/entry_points.txt +2 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/python_snap7.egg-info/requires.txt +2 -1
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/__init__.py +17 -2
- python_snap7-2.1.0/snap7/client.py +1965 -0
- python_snap7-2.1.0/snap7/connection.py +396 -0
- python_snap7-2.1.0/snap7/datatypes.py +311 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/error.py +91 -59
- python_snap7-2.1.0/snap7/logo.py +222 -0
- python_snap7-2.1.0/snap7/partner.py +680 -0
- python_snap7-2.1.0/snap7/s7protocol.py +1480 -0
- python_snap7-2.1.0/snap7/server/__init__.py +2681 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/server/__main__.py +3 -16
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/type.py +1 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/util/__init__.py +2 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/util/db.py +7 -3
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/util/setters.py +38 -43
- python_snap7-2.1.0/tests/test_api_surface.py +444 -0
- python_snap7-2.1.0/tests/test_behavioral_compatibility.py +401 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/tests/test_client.py +106 -128
- python_snap7-2.1.0/tests/test_client_e2e.py +784 -0
- python_snap7-2.1.0/tests/test_datatypes.py +252 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/tests/test_logo_client.py +12 -15
- {python_snap7-2.0.1 → python_snap7-2.1.0}/tests/test_mainloop.py +73 -11
- python_snap7-2.1.0/tests/test_multipacket.py +347 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/tests/test_partner.py +3 -30
- {python_snap7-2.0.1 → python_snap7-2.1.0}/tests/test_server.py +97 -33
- {python_snap7-2.0.1 → python_snap7-2.1.0}/tests/test_util.py +9 -1
- python_snap7-2.0.1/README.rst +0 -20
- python_snap7-2.0.1/python_snap7.egg-info/entry_points.txt +0 -2
- python_snap7-2.0.1/snap7/client.py +0 -1519
- python_snap7-2.0.1/snap7/common.py +0 -87
- python_snap7-2.0.1/snap7/logo.py +0 -151
- python_snap7-2.0.1/snap7/partner.py +0 -219
- python_snap7-2.0.1/snap7/protocol.py +0 -140
- python_snap7-2.0.1/snap7/protocol.pyi +0 -160
- python_snap7-2.0.1/snap7/server/__init__.py +0 -546
- python_snap7-2.0.1/tests/test_common.py +0 -42
- {python_snap7-2.0.1 → python_snap7-2.1.0}/LICENSE +0 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/MANIFEST.in +0 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/python_snap7.egg-info/dependency_links.txt +0 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/python_snap7.egg-info/top_level.txt +0 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/setup.cfg +0 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/py.typed +0 -0
- {python_snap7-2.0.1 → python_snap7-2.1.0}/snap7/util/getters.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-snap7
|
|
3
|
-
Version: 2.0
|
|
4
|
-
Summary: Python
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: Pure Python S7 communication library for Siemens PLCs
|
|
5
5
|
Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
|
|
6
|
-
License: MIT
|
|
6
|
+
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/gijzelaerr/python-snap7
|
|
8
8
|
Project-URL: Documentation, https://python-snap7.readthedocs.io/en/latest/
|
|
9
9
|
Keywords: snap7,s7,siemens,plc
|
|
@@ -12,22 +12,23 @@ Classifier: Environment :: Console
|
|
|
12
12
|
Classifier: Topic :: System :: Hardware
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: Intended Audience :: Manufacturing
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
15
|
Classifier: Operating System :: POSIX
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
-
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Requires-Python: >=3.10
|
|
23
22
|
Description-Content-Type: text/x-rst
|
|
24
23
|
License-File: LICENSE
|
|
25
24
|
Provides-Extra: test
|
|
26
25
|
Requires-Dist: pytest; extra == "test"
|
|
26
|
+
Requires-Dist: pytest-html; extra == "test"
|
|
27
27
|
Requires-Dist: mypy; extra == "test"
|
|
28
28
|
Requires-Dist: types-setuptools; extra == "test"
|
|
29
29
|
Requires-Dist: ruff; extra == "test"
|
|
30
30
|
Requires-Dist: tox; extra == "test"
|
|
31
|
+
Requires-Dist: tox-uv; extra == "test"
|
|
31
32
|
Requires-Dist: types-click; extra == "test"
|
|
32
33
|
Requires-Dist: uv; extra == "test"
|
|
33
34
|
Provides-Extra: cli
|
|
@@ -36,15 +37,14 @@ Requires-Dist: click; extra == "cli"
|
|
|
36
37
|
Provides-Extra: doc
|
|
37
38
|
Requires-Dist: sphinx; extra == "doc"
|
|
38
39
|
Requires-Dist: sphinx_rtd_theme; extra == "doc"
|
|
39
|
-
|
|
40
|
+
Dynamic: license-file
|
|
40
41
|
|
|
41
42
|
About
|
|
42
43
|
=====
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
with Siemens S7 PLCs.
|
|
45
|
+
Python-snap7 is a pure Python S7 communication library for interfacing with Siemens S7 PLCs.
|
|
46
46
|
|
|
47
|
-
Python-snap7 is tested with Python 3.
|
|
47
|
+
Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
|
|
48
48
|
|
|
49
49
|
The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
|
|
50
50
|
|
|
@@ -52,9 +52,8 @@ The full documentation is available on `Read The Docs <https://python-snap7.read
|
|
|
52
52
|
Installation
|
|
53
53
|
============
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Install using pip::
|
|
56
56
|
|
|
57
57
|
$ pip install python-snap7
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
Otherwise, please follow the `online installation instructions <https://python-snap7.readthedocs.io/en/latest/installation.html>`_ to install python-snap7 from source.
|
|
59
|
+
No native libraries or platform-specific dependencies are required - python-snap7 is a pure Python package that works on all platforms.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
About
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
Python-snap7 is a pure Python S7 communication library for interfacing with Siemens S7 PLCs.
|
|
5
|
+
|
|
6
|
+
Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
|
|
7
|
+
|
|
8
|
+
The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Installation
|
|
12
|
+
============
|
|
13
|
+
|
|
14
|
+
Install using pip::
|
|
15
|
+
|
|
16
|
+
$ pip install python-snap7
|
|
17
|
+
|
|
18
|
+
No native libraries or platform-specific dependencies are required - python-snap7 is a pure Python package that works on all platforms.
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-snap7"
|
|
7
|
-
version = "2.0
|
|
8
|
-
description = "Python
|
|
7
|
+
version = "2.1.0"
|
|
8
|
+
description = "Pure Python S7 communication library for Siemens PLCs"
|
|
9
9
|
readme = "README.rst"
|
|
10
10
|
authors = [
|
|
11
11
|
{name = "Gijs Molenaar", email = "gijsmolenaar@gmail.com"},
|
|
@@ -16,16 +16,15 @@ classifiers = [
|
|
|
16
16
|
"Topic :: System :: Hardware",
|
|
17
17
|
"Intended Audience :: Developers",
|
|
18
18
|
"Intended Audience :: Manufacturing",
|
|
19
|
-
"License :: OSI Approved :: MIT License",
|
|
20
19
|
"Operating System :: POSIX",
|
|
21
|
-
"Programming Language :: Python :: 3.9",
|
|
22
20
|
"Programming Language :: Python :: 3.10",
|
|
23
21
|
"Programming Language :: Python :: 3.11",
|
|
24
22
|
"Programming Language :: Python :: 3.12",
|
|
25
23
|
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Programming Language :: Python :: 3.14",
|
|
26
25
|
]
|
|
27
|
-
license = {text = "MIT
|
|
28
|
-
requires-python = ">=3.
|
|
26
|
+
license = {text = "MIT"}
|
|
27
|
+
requires-python = ">=3.10"
|
|
29
28
|
keywords = ["snap7", "s7", "siemens", "plc"]
|
|
30
29
|
|
|
31
30
|
[project.urls]
|
|
@@ -33,24 +32,25 @@ Homepage = "https://github.com/gijzelaerr/python-snap7"
|
|
|
33
32
|
Documentation = "https://python-snap7.readthedocs.io/en/latest/"
|
|
34
33
|
|
|
35
34
|
[project.optional-dependencies]
|
|
36
|
-
test = ["pytest", "mypy", "types-setuptools", "ruff", "tox", "types-click", "uv"]
|
|
35
|
+
test = ["pytest", "pytest-html", "mypy", "types-setuptools", "ruff", "tox", "tox-uv", "types-click", "uv"]
|
|
37
36
|
cli = ["rich", "click" ]
|
|
38
|
-
doc = ["sphinx", "sphinx_rtd_theme"
|
|
37
|
+
doc = ["sphinx", "sphinx_rtd_theme"]
|
|
39
38
|
|
|
40
39
|
[tool.setuptools.package-data]
|
|
41
|
-
snap7 = ["py.typed"
|
|
40
|
+
snap7 = ["py.typed"]
|
|
42
41
|
|
|
43
42
|
[tool.setuptools.packages.find]
|
|
44
43
|
include = ["snap7*"]
|
|
45
44
|
|
|
46
45
|
[project.scripts]
|
|
47
|
-
snap7-server = "snap7.server
|
|
46
|
+
snap7-server = "snap7.server:mainloop"
|
|
48
47
|
|
|
49
48
|
[tool.pytest.ini_options]
|
|
50
49
|
testpaths = ["tests"]
|
|
51
50
|
markers =[
|
|
52
51
|
"client",
|
|
53
52
|
"common",
|
|
53
|
+
"e2e: end-to-end tests requiring a real PLC connection",
|
|
54
54
|
"logo",
|
|
55
55
|
"mainloop",
|
|
56
56
|
"partner",
|
|
@@ -67,8 +67,8 @@ disable_error_code = ["method-assign", "attr-defined"]
|
|
|
67
67
|
[tool.ruff]
|
|
68
68
|
output-format = "full"
|
|
69
69
|
line-length = 130
|
|
70
|
-
target-version = "
|
|
70
|
+
target-version = "py310"
|
|
71
71
|
|
|
72
|
-
[lint]
|
|
72
|
+
[tool.ruff.lint]
|
|
73
73
|
ignore = []
|
|
74
74
|
mccabe.max-complexity = 10
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-snap7
|
|
3
|
-
Version: 2.0
|
|
4
|
-
Summary: Python
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: Pure Python S7 communication library for Siemens PLCs
|
|
5
5
|
Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
|
|
6
|
-
License: MIT
|
|
6
|
+
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/gijzelaerr/python-snap7
|
|
8
8
|
Project-URL: Documentation, https://python-snap7.readthedocs.io/en/latest/
|
|
9
9
|
Keywords: snap7,s7,siemens,plc
|
|
@@ -12,22 +12,23 @@ Classifier: Environment :: Console
|
|
|
12
12
|
Classifier: Topic :: System :: Hardware
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: Intended Audience :: Manufacturing
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
15
|
Classifier: Operating System :: POSIX
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
-
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Requires-Python: >=3.10
|
|
23
22
|
Description-Content-Type: text/x-rst
|
|
24
23
|
License-File: LICENSE
|
|
25
24
|
Provides-Extra: test
|
|
26
25
|
Requires-Dist: pytest; extra == "test"
|
|
26
|
+
Requires-Dist: pytest-html; extra == "test"
|
|
27
27
|
Requires-Dist: mypy; extra == "test"
|
|
28
28
|
Requires-Dist: types-setuptools; extra == "test"
|
|
29
29
|
Requires-Dist: ruff; extra == "test"
|
|
30
30
|
Requires-Dist: tox; extra == "test"
|
|
31
|
+
Requires-Dist: tox-uv; extra == "test"
|
|
31
32
|
Requires-Dist: types-click; extra == "test"
|
|
32
33
|
Requires-Dist: uv; extra == "test"
|
|
33
34
|
Provides-Extra: cli
|
|
@@ -36,15 +37,14 @@ Requires-Dist: click; extra == "cli"
|
|
|
36
37
|
Provides-Extra: doc
|
|
37
38
|
Requires-Dist: sphinx; extra == "doc"
|
|
38
39
|
Requires-Dist: sphinx_rtd_theme; extra == "doc"
|
|
39
|
-
|
|
40
|
+
Dynamic: license-file
|
|
40
41
|
|
|
41
42
|
About
|
|
42
43
|
=====
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
with Siemens S7 PLCs.
|
|
45
|
+
Python-snap7 is a pure Python S7 communication library for interfacing with Siemens S7 PLCs.
|
|
46
46
|
|
|
47
|
-
Python-snap7 is tested with Python 3.
|
|
47
|
+
Python-snap7 is tested with Python 3.10+, on Windows, Linux and OS X.
|
|
48
48
|
|
|
49
49
|
The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
|
|
50
50
|
|
|
@@ -52,9 +52,8 @@ The full documentation is available on `Read The Docs <https://python-snap7.read
|
|
|
52
52
|
Installation
|
|
53
53
|
============
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Install using pip::
|
|
56
56
|
|
|
57
57
|
$ pip install python-snap7
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
Otherwise, please follow the `online installation instructions <https://python-snap7.readthedocs.io/en/latest/installation.html>`_ to install python-snap7 from source.
|
|
59
|
+
No native libraries or platform-specific dependencies are required - python-snap7 is a pure Python package that works on all platforms.
|
|
@@ -10,13 +10,13 @@ python_snap7.egg-info/requires.txt
|
|
|
10
10
|
python_snap7.egg-info/top_level.txt
|
|
11
11
|
snap7/__init__.py
|
|
12
12
|
snap7/client.py
|
|
13
|
-
snap7/
|
|
13
|
+
snap7/connection.py
|
|
14
|
+
snap7/datatypes.py
|
|
14
15
|
snap7/error.py
|
|
15
16
|
snap7/logo.py
|
|
16
17
|
snap7/partner.py
|
|
17
|
-
snap7/protocol.py
|
|
18
|
-
snap7/protocol.pyi
|
|
19
18
|
snap7/py.typed
|
|
19
|
+
snap7/s7protocol.py
|
|
20
20
|
snap7/type.py
|
|
21
21
|
snap7/server/__init__.py
|
|
22
22
|
snap7/server/__main__.py
|
|
@@ -24,10 +24,14 @@ snap7/util/__init__.py
|
|
|
24
24
|
snap7/util/db.py
|
|
25
25
|
snap7/util/getters.py
|
|
26
26
|
snap7/util/setters.py
|
|
27
|
+
tests/test_api_surface.py
|
|
28
|
+
tests/test_behavioral_compatibility.py
|
|
27
29
|
tests/test_client.py
|
|
28
|
-
tests/
|
|
30
|
+
tests/test_client_e2e.py
|
|
31
|
+
tests/test_datatypes.py
|
|
29
32
|
tests/test_logo_client.py
|
|
30
33
|
tests/test_mainloop.py
|
|
34
|
+
tests/test_multipacket.py
|
|
31
35
|
tests/test_partner.py
|
|
32
36
|
tests/test_server.py
|
|
33
37
|
tests/test_util.py
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
"""
|
|
2
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.
|
|
3
6
|
"""
|
|
4
7
|
|
|
5
8
|
from importlib.metadata import version, PackageNotFoundError
|
|
6
9
|
|
|
7
10
|
from .client import Client
|
|
8
11
|
from .server import Server
|
|
9
|
-
from .logo import Logo
|
|
10
12
|
from .partner import Partner
|
|
13
|
+
from .logo import Logo
|
|
11
14
|
from .util.db import Row, DB
|
|
12
15
|
from .type import Area, Block, WordLen, SrvEvent, SrvArea
|
|
13
16
|
|
|
14
|
-
__all__ = [
|
|
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
|
+
]
|
|
15
30
|
|
|
16
31
|
try:
|
|
17
32
|
__version__ = version("python-snap7")
|