python-snap7 1.4__tar.gz → 2.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.
- {python_snap7-1.4 → python_snap7-2.0.0}/PKG-INFO +28 -4
- python_snap7-2.0.0/README.rst +20 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/pyproject.toml +10 -6
- {python_snap7-1.4 → python_snap7-2.0.0}/python_snap7.egg-info/PKG-INFO +28 -4
- {python_snap7-1.4 → python_snap7-2.0.0}/python_snap7.egg-info/SOURCES.txt +4 -3
- {python_snap7-1.4 → python_snap7-2.0.0}/python_snap7.egg-info/requires.txt +2 -0
- python_snap7-2.0.0/snap7/__init__.py +19 -0
- python_snap7-1.4/snap7/client/__init__.py → python_snap7-2.0.0/snap7/client.py +300 -343
- python_snap7-2.0.0/snap7/common.py +87 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/snap7/error.py +66 -0
- python_snap7-2.0.0/snap7/logo.py +151 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/snap7/partner.py +22 -32
- python_snap7-2.0.0/snap7/protocol.py +140 -0
- python_snap7-2.0.0/snap7/protocol.pyi +160 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/snap7/server/__init__.py +148 -135
- {python_snap7-1.4 → python_snap7-2.0.0}/snap7/server/__main__.py +2 -1
- python_snap7-2.0.0/snap7/type.py +363 -0
- python_snap7-2.0.0/snap7/util/__init__.py +86 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/snap7/util/db.py +214 -70
- {python_snap7-1.4 → python_snap7-2.0.0}/snap7/util/getters.py +57 -59
- {python_snap7-1.4 → python_snap7-2.0.0}/snap7/util/setters.py +38 -34
- {python_snap7-1.4 → python_snap7-2.0.0}/tests/test_client.py +310 -404
- {python_snap7-1.4 → python_snap7-2.0.0}/tests/test_common.py +11 -7
- {python_snap7-1.4 → python_snap7-2.0.0}/tests/test_logo_client.py +45 -42
- {python_snap7-1.4 → python_snap7-2.0.0}/tests/test_mainloop.py +11 -24
- python_snap7-2.0.0/tests/test_partner.py +147 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/tests/test_server.py +58 -56
- {python_snap7-1.4 → python_snap7-2.0.0}/tests/test_util.py +96 -95
- python_snap7-1.4/README.rst +0 -21
- python_snap7-1.4/snap7/__init__.py +0 -20
- python_snap7-1.4/snap7/common.py +0 -157
- python_snap7-1.4/snap7/exceptions.py +0 -4
- python_snap7-1.4/snap7/logo.py +0 -336
- python_snap7-1.4/snap7/types.py +0 -324
- python_snap7-1.4/snap7/util/__init__.py +0 -200
- python_snap7-1.4/tests/test_partner.py +0 -147
- {python_snap7-1.4 → python_snap7-2.0.0}/LICENSE +0 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/MANIFEST.in +0 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/python_snap7.egg-info/dependency_links.txt +0 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/python_snap7.egg-info/entry_points.txt +0 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/python_snap7.egg-info/top_level.txt +0 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/setup.cfg +0 -0
- {python_snap7-1.4 → python_snap7-2.0.0}/snap7/py.typed +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-snap7
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Python wrapper for the snap7 library
|
|
5
5
|
Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
|
|
6
|
-
License: MIT
|
|
6
|
+
License: MIT License
|
|
7
7
|
Project-URL: Homepage, https://github.com/gijzelaerr/python-snap7
|
|
8
8
|
Project-URL: Documentation, https://python-snap7.readthedocs.io/en/latest/
|
|
9
|
+
Keywords: snap7,s7,siemens,plc
|
|
9
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
11
|
Classifier: Environment :: Console
|
|
11
12
|
Classifier: Topic :: System :: Hardware
|
|
@@ -13,21 +14,44 @@ Classifier: Intended Audience :: Developers
|
|
|
13
14
|
Classifier: Intended Audience :: Manufacturing
|
|
14
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
15
16
|
Classifier: Operating System :: POSIX
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/x-rst
|
|
22
23
|
License-File: LICENSE
|
|
23
24
|
Provides-Extra: test
|
|
24
25
|
Requires-Dist: pytest; extra == "test"
|
|
25
26
|
Requires-Dist: mypy; extra == "test"
|
|
26
27
|
Requires-Dist: types-setuptools; extra == "test"
|
|
27
28
|
Requires-Dist: ruff; extra == "test"
|
|
29
|
+
Requires-Dist: tox; extra == "test"
|
|
30
|
+
Requires-Dist: types-click; extra == "test"
|
|
28
31
|
Provides-Extra: cli
|
|
29
32
|
Requires-Dist: rich; extra == "cli"
|
|
30
33
|
Requires-Dist: click; extra == "cli"
|
|
31
34
|
Provides-Extra: doc
|
|
32
35
|
Requires-Dist: sphinx; extra == "doc"
|
|
33
36
|
Requires-Dist: sphinx_rtd_theme; extra == "doc"
|
|
37
|
+
|
|
38
|
+
About
|
|
39
|
+
=====
|
|
40
|
+
|
|
41
|
+
This is a Python wrapper for Snap7, an open-source, 32/64 bit, multi-platform Ethernet communication suite for interfacing natively
|
|
42
|
+
with Siemens S7 PLCs.
|
|
43
|
+
|
|
44
|
+
Python-snap7 is tested with Python 3.9+, on Windows, Linux and OS X.
|
|
45
|
+
|
|
46
|
+
The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Installation
|
|
50
|
+
============
|
|
51
|
+
|
|
52
|
+
If you are running Windows (amd64), Mac OS X (amd64/aarch64), GNU/Linux (amd64/arm64) or a compatible platform you can install the binary wheel using::
|
|
53
|
+
|
|
54
|
+
$ pip install python-snap7
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Otherwise, please follow the `online installation instructions <https://python-snap7.readthedocs.io/en/latest/installation.html>`_ to install python-snap7 from source.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
About
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
This is a Python wrapper for Snap7, an open-source, 32/64 bit, multi-platform Ethernet communication suite for interfacing natively
|
|
5
|
+
with Siemens S7 PLCs.
|
|
6
|
+
|
|
7
|
+
Python-snap7 is tested with Python 3.9+, on Windows, Linux and OS X.
|
|
8
|
+
|
|
9
|
+
The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Installation
|
|
13
|
+
============
|
|
14
|
+
|
|
15
|
+
If you are running Windows (amd64), Mac OS X (amd64/aarch64), GNU/Linux (amd64/arm64) or a compatible platform you can install the binary wheel using::
|
|
16
|
+
|
|
17
|
+
$ pip install python-snap7
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Otherwise, please follow the `online installation instructions <https://python-snap7.readthedocs.io/en/latest/installation.html>`_ to install python-snap7 from source.
|
|
@@ -4,8 +4,9 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-snap7"
|
|
7
|
-
version = "
|
|
7
|
+
version = "2.0.0"
|
|
8
8
|
description = "Python wrapper for the snap7 library"
|
|
9
|
+
readme = "README.rst"
|
|
9
10
|
authors = [
|
|
10
11
|
{name = "Gijs Molenaar", email = "gijsmolenaar@gmail.com"},
|
|
11
12
|
]
|
|
@@ -17,21 +18,21 @@ classifiers = [
|
|
|
17
18
|
"Intended Audience :: Manufacturing",
|
|
18
19
|
"License :: OSI Approved :: MIT License",
|
|
19
20
|
"Operating System :: POSIX",
|
|
20
|
-
"Programming Language :: Python :: 3.8",
|
|
21
21
|
"Programming Language :: Python :: 3.9",
|
|
22
22
|
"Programming Language :: Python :: 3.10",
|
|
23
23
|
"Programming Language :: Python :: 3.11",
|
|
24
24
|
"Programming Language :: Python :: 3.12",
|
|
25
25
|
]
|
|
26
|
-
license = {text = "MIT"}
|
|
27
|
-
requires-python = ">=3.
|
|
26
|
+
license = {text = "MIT License"}
|
|
27
|
+
requires-python = ">=3.9"
|
|
28
|
+
keywords = ["snap7", "s7", "siemens", "plc"]
|
|
28
29
|
|
|
29
30
|
[project.urls]
|
|
30
31
|
Homepage = "https://github.com/gijzelaerr/python-snap7"
|
|
31
32
|
Documentation = "https://python-snap7.readthedocs.io/en/latest/"
|
|
32
33
|
|
|
33
34
|
[project.optional-dependencies]
|
|
34
|
-
test = ["pytest", "mypy", "types-setuptools", "ruff"]
|
|
35
|
+
test = ["pytest", "mypy", "types-setuptools", "ruff", "tox", "types-click"]
|
|
35
36
|
cli = ["rich", "click" ]
|
|
36
37
|
doc = ["sphinx", "sphinx_rtd_theme"]
|
|
37
38
|
|
|
@@ -58,11 +59,14 @@ markers =[
|
|
|
58
59
|
|
|
59
60
|
[tool.mypy]
|
|
60
61
|
ignore_missing_imports = true
|
|
62
|
+
strict = true
|
|
63
|
+
# https://github.com/python/mypy/issues/2427#issuecomment-1419206807
|
|
64
|
+
disable_error_code = ["method-assign", "attr-defined"]
|
|
61
65
|
|
|
62
66
|
[tool.ruff]
|
|
63
67
|
output-format = "full"
|
|
64
68
|
line-length = 130
|
|
65
|
-
target-version = "
|
|
69
|
+
target-version = "py39"
|
|
66
70
|
|
|
67
71
|
[lint]
|
|
68
72
|
ignore = []
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-snap7
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Python wrapper for the snap7 library
|
|
5
5
|
Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
|
|
6
|
-
License: MIT
|
|
6
|
+
License: MIT License
|
|
7
7
|
Project-URL: Homepage, https://github.com/gijzelaerr/python-snap7
|
|
8
8
|
Project-URL: Documentation, https://python-snap7.readthedocs.io/en/latest/
|
|
9
|
+
Keywords: snap7,s7,siemens,plc
|
|
9
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
11
|
Classifier: Environment :: Console
|
|
11
12
|
Classifier: Topic :: System :: Hardware
|
|
@@ -13,21 +14,44 @@ Classifier: Intended Audience :: Developers
|
|
|
13
14
|
Classifier: Intended Audience :: Manufacturing
|
|
14
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
15
16
|
Classifier: Operating System :: POSIX
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/x-rst
|
|
22
23
|
License-File: LICENSE
|
|
23
24
|
Provides-Extra: test
|
|
24
25
|
Requires-Dist: pytest; extra == "test"
|
|
25
26
|
Requires-Dist: mypy; extra == "test"
|
|
26
27
|
Requires-Dist: types-setuptools; extra == "test"
|
|
27
28
|
Requires-Dist: ruff; extra == "test"
|
|
29
|
+
Requires-Dist: tox; extra == "test"
|
|
30
|
+
Requires-Dist: types-click; extra == "test"
|
|
28
31
|
Provides-Extra: cli
|
|
29
32
|
Requires-Dist: rich; extra == "cli"
|
|
30
33
|
Requires-Dist: click; extra == "cli"
|
|
31
34
|
Provides-Extra: doc
|
|
32
35
|
Requires-Dist: sphinx; extra == "doc"
|
|
33
36
|
Requires-Dist: sphinx_rtd_theme; extra == "doc"
|
|
37
|
+
|
|
38
|
+
About
|
|
39
|
+
=====
|
|
40
|
+
|
|
41
|
+
This is a Python wrapper for Snap7, an open-source, 32/64 bit, multi-platform Ethernet communication suite for interfacing natively
|
|
42
|
+
with Siemens S7 PLCs.
|
|
43
|
+
|
|
44
|
+
Python-snap7 is tested with Python 3.9+, on Windows, Linux and OS X.
|
|
45
|
+
|
|
46
|
+
The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Installation
|
|
50
|
+
============
|
|
51
|
+
|
|
52
|
+
If you are running Windows (amd64), Mac OS X (amd64/aarch64), GNU/Linux (amd64/arm64) or a compatible platform you can install the binary wheel using::
|
|
53
|
+
|
|
54
|
+
$ pip install python-snap7
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Otherwise, please follow the `online installation instructions <https://python-snap7.readthedocs.io/en/latest/installation.html>`_ to install python-snap7 from source.
|
|
@@ -9,14 +9,15 @@ 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/client.py
|
|
12
13
|
snap7/common.py
|
|
13
14
|
snap7/error.py
|
|
14
|
-
snap7/exceptions.py
|
|
15
15
|
snap7/logo.py
|
|
16
16
|
snap7/partner.py
|
|
17
|
+
snap7/protocol.py
|
|
18
|
+
snap7/protocol.pyi
|
|
17
19
|
snap7/py.typed
|
|
18
|
-
snap7/
|
|
19
|
-
snap7/client/__init__.py
|
|
20
|
+
snap7/type.py
|
|
20
21
|
snap7/server/__init__.py
|
|
21
22
|
snap7/server/__main__.py
|
|
22
23
|
snap7/util/__init__.py
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The Snap7 Python library.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
6
|
+
|
|
7
|
+
from .client import Client
|
|
8
|
+
from .server import Server
|
|
9
|
+
from .logo import Logo
|
|
10
|
+
from .partner import Partner
|
|
11
|
+
from .util.db import Row, DB
|
|
12
|
+
from .type import Area, Block, WordLen, SrvEvent, SrvArea
|
|
13
|
+
|
|
14
|
+
__all__ = ["Client", "Server", "Logo", "Partner", "Row", "DB", "Area", "Block", "WordLen", "SrvEvent", "SrvArea"]
|
|
15
|
+
|
|
16
|
+
try:
|
|
17
|
+
__version__ = version("python-snap7")
|
|
18
|
+
except PackageNotFoundError:
|
|
19
|
+
__version__ = "0.0rc0"
|