Metadata-Version: 2.4
Name: s7commplus
Version: 0.1.0
Summary: Pure Python S7CommPlus client and server emulator for Siemens S7-1200/1500 PLCs
Author-email: Gijs Molenaar <gijsmolenaar@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/gijzelaerr/s7commplus
Project-URL: Repository, https://github.com/gijzelaerr/s7commplus
Project-URL: Issues, https://github.com/gijzelaerr/s7commplus/issues
Project-URL: Documentation, https://s7commplus.readthedocs.io/
Keywords: s7commplus,s7,siemens,plc,industrial-automation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Hardware
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: s7commplus/session_auth/LICENSE-HarpoS7
Requires-Dist: cryptography>=41
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Requires-Dist: pytest-bdd<9,>=8.1; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: hypothesis; extra == "test"
Requires-Dist: mypy; extra == "test"
Requires-Dist: ruff; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=7.2; extra == "docs"
Requires-Dist: furo>=2024.8.6; extra == "docs"
Dynamic: license-file

# s7commplus

Pure-Python S7CommPlus communication for Siemens S7-1200 and S7-1500 PLCs.
It supports S7CommPlus V1, V2 (TLS), and V3; synchronous and asyncio clients;
and a server emulator for testing. The synchronous client additionally supports
legacy V1 SessionKey authentication; the asyncio client rejects that path
during connection with an actionable error.

```bash
pip install s7commplus
```

```python
from s7commplus import Client

with Client() as client:
    client.connect("192.168.1.10", 0, 1)
    data = client.db_read(1, 0, 4)
```

S7CommPlus is used by newer S7-1200/1500 PLCs when classic PUT/GET access is
disabled. This is an unofficial implementation and is not affiliated with,
endorsed by, or supported by Siemens AG. Test against an isolated controller
before using it in production or safety-relevant environments.

Some older PLCs advertise only their SessionKey family instead of a complete
public-key fingerprint. The synchronous `Client` tries the bounded set of
bundled keys from that family on fresh sessions and caches the confirmed key
for the PLC. Set `allow_legacy_key_fallback=False` on `connect()` when key
probing must be disabled.

## Development

```bash
python -m pip install -e '.[test]'
pytest
mypy s7commplus
ruff check s7commplus tests
ruff format --check s7commplus tests
```

Documentation is built by Read the Docs and validated in CI:

```bash
python -m pip install -e '.[docs]'
sphinx-build -W --keep-going -b html docs docs/_build/html
```

The session-authentication implementation derives from HarpoS7; its MIT
license is included at `s7commplus/session_auth/LICENSE-HarpoS7`.
