python-snap7 1.3__tar.gz → 1.4.1__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 (44) hide show
  1. {python-snap7-1.3 → python_snap7-1.4.1}/MANIFEST.in +0 -1
  2. python_snap7-1.4.1/PKG-INFO +56 -0
  3. python_snap7-1.4.1/README.rst +21 -0
  4. python_snap7-1.4.1/pyproject.toml +70 -0
  5. python_snap7-1.4.1/python_snap7.egg-info/PKG-INFO +56 -0
  6. {python-snap7-1.3 → python_snap7-1.4.1}/python_snap7.egg-info/SOURCES.txt +12 -10
  7. {python-snap7-1.3 → python_snap7-1.4.1}/python_snap7.egg-info/requires.txt +2 -2
  8. python_snap7-1.4.1/setup.cfg +4 -0
  9. {python-snap7-1.3 → python_snap7-1.4.1}/snap7/__init__.py +5 -4
  10. {python-snap7-1.3 → python_snap7-1.4.1}/snap7/client/__init__.py +179 -164
  11. python_snap7-1.4.1/snap7/common.py +132 -0
  12. python_snap7-1.4.1/snap7/error.py +104 -0
  13. {python-snap7-1.3 → python_snap7-1.4.1}/snap7/exceptions.py +0 -1
  14. {python-snap7-1.3 → python_snap7-1.4.1}/snap7/logo.py +8 -12
  15. {python-snap7-1.3 → python_snap7-1.4.1}/snap7/partner.py +9 -13
  16. {python-snap7-1.3 → python_snap7-1.4.1}/snap7/server/__init__.py +99 -102
  17. {python-snap7-1.3 → python_snap7-1.4.1}/snap7/server/__main__.py +2 -3
  18. python_snap7-1.4.1/snap7/types.py +351 -0
  19. python_snap7-1.4.1/snap7/util/__init__.py +200 -0
  20. python_snap7-1.4.1/snap7/util/db.py +604 -0
  21. python_snap7-1.4.1/snap7/util/getters.py +719 -0
  22. python_snap7-1.4.1/snap7/util/setters.py +536 -0
  23. {python-snap7-1.3/test → python_snap7-1.4.1/tests}/test_client.py +205 -181
  24. {python-snap7-1.3/test → python_snap7-1.4.1/tests}/test_common.py +10 -5
  25. {python-snap7-1.3/test → python_snap7-1.4.1/tests}/test_logo_client.py +15 -8
  26. {python-snap7-1.3/test → python_snap7-1.4.1/tests}/test_mainloop.py +26 -20
  27. {python-snap7-1.3/test → python_snap7-1.4.1/tests}/test_partner.py +8 -8
  28. {python-snap7-1.3/test → python_snap7-1.4.1/tests}/test_server.py +39 -32
  29. python_snap7-1.4.1/tests/test_util.py +608 -0
  30. python-snap7-1.3/PKG-INFO +0 -68
  31. python-snap7-1.3/README.rst +0 -42
  32. python-snap7-1.3/python_snap7.egg-info/PKG-INFO +0 -68
  33. python-snap7-1.3/setup.cfg +0 -13
  34. python-snap7-1.3/setup.py +0 -66
  35. python-snap7-1.3/snap7/common.py +0 -152
  36. python-snap7-1.3/snap7/error.py +0 -104
  37. python-snap7-1.3/snap7/types.py +0 -327
  38. python-snap7-1.3/snap7/util.py +0 -1878
  39. python-snap7-1.3/test/test_util.py +0 -567
  40. {python-snap7-1.3 → python_snap7-1.4.1}/LICENSE +0 -0
  41. {python-snap7-1.3 → python_snap7-1.4.1}/python_snap7.egg-info/dependency_links.txt +0 -0
  42. {python-snap7-1.3 → python_snap7-1.4.1}/python_snap7.egg-info/entry_points.txt +0 -0
  43. {python-snap7-1.3 → python_snap7-1.4.1}/python_snap7.egg-info/top_level.txt +0 -0
  44. {python-snap7-1.3 → python_snap7-1.4.1}/snap7/py.typed +0 -0
@@ -1,2 +1 @@
1
1
  include README.rst
2
-
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.1
2
+ Name: python-snap7
3
+ Version: 1.4.1
4
+ Summary: Python wrapper for the snap7 library
5
+ Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
6
+ License: MIT License
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: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: POSIX
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/x-rst
23
+ License-File: LICENSE
24
+ Provides-Extra: test
25
+ Requires-Dist: pytest; extra == "test"
26
+ Requires-Dist: mypy; extra == "test"
27
+ Requires-Dist: types-setuptools; extra == "test"
28
+ Requires-Dist: ruff; extra == "test"
29
+ Provides-Extra: cli
30
+ Requires-Dist: rich; extra == "cli"
31
+ Requires-Dist: click; extra == "cli"
32
+ Provides-Extra: doc
33
+ Requires-Dist: sphinx; extra == "doc"
34
+ Requires-Dist: sphinx_rtd_theme; extra == "doc"
35
+
36
+ About
37
+ =====
38
+
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
+ with Siemens S7 PLCs.
42
+
43
+ Python-snap7 is tested with Python 3.9+, on Windows, Linux and OS X.
44
+
45
+ The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
46
+
47
+
48
+ Installation
49
+ ============
50
+
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
+
53
+ $ pip install python-snap7
54
+
55
+
56
+ Otherwise, please read the `online installation documentation <https://python-snap7.readthedocs.io/en/latest/installation.html>`_.
@@ -0,0 +1,21 @@
1
+ About
2
+ =====
3
+
4
+ This is a ctypes-based Python wrapper for snap7. Snap7 is an open-source,
5
+ 32/64 bit, multi-platform Ethernet communication suite for interfacing natively
6
+ with Siemens S7 PLCs.
7
+
8
+ Python-snap7 is tested with Python 3.9+, on Windows, Linux and OS X.
9
+
10
+ The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
11
+
12
+
13
+ Installation
14
+ ============
15
+
16
+ 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::
17
+
18
+ $ pip install python-snap7
19
+
20
+
21
+ Otherwise, please read the `online installation documentation <https://python-snap7.readthedocs.io/en/latest/installation.html>`_.
@@ -0,0 +1,70 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "python-snap7"
7
+ version = "1.4.1"
8
+ description = "Python wrapper for the snap7 library"
9
+ readme = "README.rst"
10
+ authors = [
11
+ {name = "Gijs Molenaar", email = "gijsmolenaar@gmail.com"},
12
+ ]
13
+ classifiers = [
14
+ "Development Status :: 5 - Production/Stable",
15
+ "Environment :: Console",
16
+ "Topic :: System :: Hardware",
17
+ "Intended Audience :: Developers",
18
+ "Intended Audience :: Manufacturing",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: POSIX",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ ]
26
+ license = {text = "MIT License"}
27
+ requires-python = ">=3.9"
28
+ keywords = ["snap7", "s7", "siemens", "plc"]
29
+
30
+ [project.urls]
31
+ Homepage = "https://github.com/gijzelaerr/python-snap7"
32
+ Documentation = "https://python-snap7.readthedocs.io/en/latest/"
33
+
34
+ [project.optional-dependencies]
35
+ test = ["pytest", "mypy", "types-setuptools", "ruff"]
36
+ cli = ["rich", "click" ]
37
+ doc = ["sphinx", "sphinx_rtd_theme"]
38
+
39
+ [tool.setuptools.package-data]
40
+ snap7 = ["py.typed", "lib/libsnap7.so", "lib/snap7.dll", "lib/libsnap7.dylib"]
41
+
42
+ [tool.setuptools.packages.find]
43
+ include = ["snap7*"]
44
+
45
+ [project.scripts]
46
+ snap7-server = "snap7.server.__main__:main"
47
+
48
+ [tool.pytest.ini_options]
49
+ testpaths = ["tests"]
50
+ markers =[
51
+ "client",
52
+ "common",
53
+ "logo",
54
+ "mainloop",
55
+ "partner",
56
+ "server",
57
+ "util"
58
+ ]
59
+
60
+ [tool.mypy]
61
+ ignore_missing_imports = true
62
+
63
+ [tool.ruff]
64
+ output-format = "full"
65
+ line-length = 130
66
+ target-version = "py39"
67
+
68
+ [lint]
69
+ ignore = []
70
+ mccabe.max-complexity = 10
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.1
2
+ Name: python-snap7
3
+ Version: 1.4.1
4
+ Summary: Python wrapper for the snap7 library
5
+ Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
6
+ License: MIT License
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: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: POSIX
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/x-rst
23
+ License-File: LICENSE
24
+ Provides-Extra: test
25
+ Requires-Dist: pytest; extra == "test"
26
+ Requires-Dist: mypy; extra == "test"
27
+ Requires-Dist: types-setuptools; extra == "test"
28
+ Requires-Dist: ruff; extra == "test"
29
+ Provides-Extra: cli
30
+ Requires-Dist: rich; extra == "cli"
31
+ Requires-Dist: click; extra == "cli"
32
+ Provides-Extra: doc
33
+ Requires-Dist: sphinx; extra == "doc"
34
+ Requires-Dist: sphinx_rtd_theme; extra == "doc"
35
+
36
+ About
37
+ =====
38
+
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
+ with Siemens S7 PLCs.
42
+
43
+ Python-snap7 is tested with Python 3.9+, on Windows, Linux and OS X.
44
+
45
+ The full documentation is available on `Read The Docs <https://python-snap7.readthedocs.io/en/latest/>`_.
46
+
47
+
48
+ Installation
49
+ ============
50
+
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
+
53
+ $ pip install python-snap7
54
+
55
+
56
+ Otherwise, please read the `online installation documentation <https://python-snap7.readthedocs.io/en/latest/installation.html>`_.
@@ -1,8 +1,7 @@
1
1
  LICENSE
2
2
  MANIFEST.in
3
3
  README.rst
4
- setup.cfg
5
- setup.py
4
+ pyproject.toml
6
5
  python_snap7.egg-info/PKG-INFO
7
6
  python_snap7.egg-info/SOURCES.txt
8
7
  python_snap7.egg-info/dependency_links.txt
@@ -17,14 +16,17 @@ snap7/logo.py
17
16
  snap7/partner.py
18
17
  snap7/py.typed
19
18
  snap7/types.py
20
- snap7/util.py
21
19
  snap7/client/__init__.py
22
20
  snap7/server/__init__.py
23
21
  snap7/server/__main__.py
24
- test/test_client.py
25
- test/test_common.py
26
- test/test_logo_client.py
27
- test/test_mainloop.py
28
- test/test_partner.py
29
- test/test_server.py
30
- test/test_util.py
22
+ snap7/util/__init__.py
23
+ snap7/util/db.py
24
+ snap7/util/getters.py
25
+ snap7/util/setters.py
26
+ tests/test_client.py
27
+ tests/test_common.py
28
+ tests/test_logo_client.py
29
+ tests/test_mainloop.py
30
+ tests/test_partner.py
31
+ tests/test_server.py
32
+ tests/test_util.py
@@ -1,5 +1,6 @@
1
1
 
2
2
  [cli]
3
+ rich
3
4
  click
4
5
 
5
6
  [doc]
@@ -8,7 +9,6 @@ sphinx_rtd_theme
8
9
 
9
10
  [test]
10
11
  pytest
11
- pytest-asyncio
12
12
  mypy
13
- pycodestyle
14
13
  types-setuptools
14
+ ruff
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,7 +1,8 @@
1
1
  """
2
2
  The Snap7 Python library.
3
3
  """
4
- import pkg_resources
4
+
5
+ from importlib.metadata import version, PackageNotFoundError
5
6
 
6
7
  from . import client
7
8
  from . import common
@@ -11,9 +12,9 @@ from . import server
11
12
  from . import types
12
13
  from . import util
13
14
 
14
- __all__ = ['client', 'common', 'error', 'logo', 'server', 'types', 'util']
15
+ __all__ = ["client", "common", "error", "logo", "server", "types", "util"]
15
16
 
16
17
  try:
17
- __version__ = pkg_resources.require("python-snap7")[0].version
18
- except pkg_resources.DistributionNotFound:
18
+ __version__ = version("python-snap7")
19
+ except PackageNotFoundError:
19
20
  __version__ = "0.0rc0"