python-snap7 1.4.1__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.
Files changed (42) hide show
  1. {python_snap7-1.4.1 → python_snap7-2.0.0}/PKG-INFO +6 -5
  2. python_snap7-2.0.0/README.rst +20 -0
  3. {python_snap7-1.4.1 → python_snap7-2.0.0}/pyproject.toml +5 -2
  4. {python_snap7-1.4.1 → python_snap7-2.0.0}/python_snap7.egg-info/PKG-INFO +6 -5
  5. {python_snap7-1.4.1 → python_snap7-2.0.0}/python_snap7.egg-info/SOURCES.txt +4 -3
  6. {python_snap7-1.4.1 → python_snap7-2.0.0}/python_snap7.egg-info/requires.txt +2 -0
  7. python_snap7-2.0.0/snap7/__init__.py +19 -0
  8. python_snap7-1.4.1/snap7/client/__init__.py → python_snap7-2.0.0/snap7/client.py +227 -283
  9. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/common.py +8 -53
  10. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/error.py +66 -0
  11. python_snap7-2.0.0/snap7/logo.py +151 -0
  12. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/partner.py +22 -32
  13. python_snap7-2.0.0/snap7/protocol.py +140 -0
  14. python_snap7-2.0.0/snap7/protocol.pyi +160 -0
  15. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/server/__init__.py +114 -109
  16. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/server/__main__.py +2 -1
  17. python_snap7-2.0.0/snap7/type.py +363 -0
  18. python_snap7-2.0.0/snap7/util/__init__.py +86 -0
  19. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/util/db.py +214 -70
  20. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/util/getters.py +57 -59
  21. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/util/setters.py +38 -34
  22. {python_snap7-1.4.1 → python_snap7-2.0.0}/tests/test_client.py +283 -386
  23. {python_snap7-1.4.1 → python_snap7-2.0.0}/tests/test_common.py +6 -6
  24. {python_snap7-1.4.1 → python_snap7-2.0.0}/tests/test_logo_client.py +45 -42
  25. {python_snap7-1.4.1 → python_snap7-2.0.0}/tests/test_mainloop.py +11 -24
  26. python_snap7-2.0.0/tests/test_partner.py +147 -0
  27. {python_snap7-1.4.1 → python_snap7-2.0.0}/tests/test_server.py +51 -52
  28. {python_snap7-1.4.1 → python_snap7-2.0.0}/tests/test_util.py +96 -95
  29. python_snap7-1.4.1/README.rst +0 -21
  30. python_snap7-1.4.1/snap7/__init__.py +0 -20
  31. python_snap7-1.4.1/snap7/exceptions.py +0 -4
  32. python_snap7-1.4.1/snap7/logo.py +0 -336
  33. python_snap7-1.4.1/snap7/types.py +0 -351
  34. python_snap7-1.4.1/snap7/util/__init__.py +0 -200
  35. python_snap7-1.4.1/tests/test_partner.py +0 -147
  36. {python_snap7-1.4.1 → python_snap7-2.0.0}/LICENSE +0 -0
  37. {python_snap7-1.4.1 → python_snap7-2.0.0}/MANIFEST.in +0 -0
  38. {python_snap7-1.4.1 → python_snap7-2.0.0}/python_snap7.egg-info/dependency_links.txt +0 -0
  39. {python_snap7-1.4.1 → python_snap7-2.0.0}/python_snap7.egg-info/entry_points.txt +0 -0
  40. {python_snap7-1.4.1 → python_snap7-2.0.0}/python_snap7.egg-info/top_level.txt +0 -0
  41. {python_snap7-1.4.1 → python_snap7-2.0.0}/setup.cfg +0 -0
  42. {python_snap7-1.4.1 → python_snap7-2.0.0}/snap7/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-snap7
3
- Version: 1.4.1
3
+ Version: 2.0.0
4
4
  Summary: Python wrapper for the snap7 library
5
5
  Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
6
6
  License: MIT License
@@ -26,6 +26,8 @@ Requires-Dist: pytest; extra == "test"
26
26
  Requires-Dist: mypy; extra == "test"
27
27
  Requires-Dist: types-setuptools; extra == "test"
28
28
  Requires-Dist: ruff; extra == "test"
29
+ Requires-Dist: tox; extra == "test"
30
+ Requires-Dist: types-click; extra == "test"
29
31
  Provides-Extra: cli
30
32
  Requires-Dist: rich; extra == "cli"
31
33
  Requires-Dist: click; extra == "cli"
@@ -36,8 +38,7 @@ Requires-Dist: sphinx_rtd_theme; extra == "doc"
36
38
  About
37
39
  =====
38
40
 
39
- This is a ctypes-based Python wrapper for snap7. Snap7 is an open-source,
40
- 32/64 bit, multi-platform Ethernet communication suite for interfacing natively
41
+ This is a Python wrapper for Snap7, an open-source, 32/64 bit, multi-platform Ethernet communication suite for interfacing natively
41
42
  with Siemens S7 PLCs.
42
43
 
43
44
  Python-snap7 is tested with Python 3.9+, on Windows, Linux and OS X.
@@ -48,9 +49,9 @@ The full documentation is available on `Read The Docs <https://python-snap7.read
48
49
  Installation
49
50
  ============
50
51
 
51
- If you are running Windows, Mac OS X or GNU/Linux on an Intel x64 or ARM 64 compatible platform you can use the binary wheel installation::
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::
52
53
 
53
54
  $ pip install python-snap7
54
55
 
55
56
 
56
- Otherwise, please read the `online installation documentation <https://python-snap7.readthedocs.io/en/latest/installation.html>`_.
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,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-snap7"
7
- version = "1.4.1"
7
+ version = "2.0.0"
8
8
  description = "Python wrapper for the snap7 library"
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", "mypy", "types-setuptools", "ruff"]
35
+ test = ["pytest", "mypy", "types-setuptools", "ruff", "tox", "types-click"]
36
36
  cli = ["rich", "click" ]
37
37
  doc = ["sphinx", "sphinx_rtd_theme"]
38
38
 
@@ -59,6 +59,9 @@ markers =[
59
59
 
60
60
  [tool.mypy]
61
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"]
62
65
 
63
66
  [tool.ruff]
64
67
  output-format = "full"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-snap7
3
- Version: 1.4.1
3
+ Version: 2.0.0
4
4
  Summary: Python wrapper for the snap7 library
5
5
  Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
6
6
  License: MIT License
@@ -26,6 +26,8 @@ Requires-Dist: pytest; extra == "test"
26
26
  Requires-Dist: mypy; extra == "test"
27
27
  Requires-Dist: types-setuptools; extra == "test"
28
28
  Requires-Dist: ruff; extra == "test"
29
+ Requires-Dist: tox; extra == "test"
30
+ Requires-Dist: types-click; extra == "test"
29
31
  Provides-Extra: cli
30
32
  Requires-Dist: rich; extra == "cli"
31
33
  Requires-Dist: click; extra == "cli"
@@ -36,8 +38,7 @@ Requires-Dist: sphinx_rtd_theme; extra == "doc"
36
38
  About
37
39
  =====
38
40
 
39
- This is a ctypes-based Python wrapper for snap7. Snap7 is an open-source,
40
- 32/64 bit, multi-platform Ethernet communication suite for interfacing natively
41
+ This is a Python wrapper for Snap7, an open-source, 32/64 bit, multi-platform Ethernet communication suite for interfacing natively
41
42
  with Siemens S7 PLCs.
42
43
 
43
44
  Python-snap7 is tested with Python 3.9+, on Windows, Linux and OS X.
@@ -48,9 +49,9 @@ The full documentation is available on `Read The Docs <https://python-snap7.read
48
49
  Installation
49
50
  ============
50
51
 
51
- If you are running Windows, Mac OS X or GNU/Linux on an Intel x64 or ARM 64 compatible platform you can use the binary wheel installation::
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::
52
53
 
53
54
  $ pip install python-snap7
54
55
 
55
56
 
56
- Otherwise, please read the `online installation documentation <https://python-snap7.readthedocs.io/en/latest/installation.html>`_.
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/types.py
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
@@ -12,3 +12,5 @@ pytest
12
12
  mypy
13
13
  types-setuptools
14
14
  ruff
15
+ tox
16
+ types-click
@@ -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"