Installation
The core python-snap7 package is pure Python and has no runtime dependencies. Install it with pip:
$ pip install python-snap7
Optional features
Install only the extras needed by your application:
Extra |
Install command |
Purpose |
|---|---|---|
|
|
The |
|
|
Live demo server with host metrics and terminal display. |
|
|
PROFINET DCP device discovery. |
|
|
Experimental S7-200 serial PPI support via pySerial. |
|
|
Sphinx and the theme used to build this documentation. |
Extras can be combined:
$ pip install "python-snap7[cli,discovery,ppi]"
No Snap7 shared library or platform-specific binary is required. Optional dependencies may have their own platform requirements; for example, PPI needs a serial interface and discovery needs access to a supported network interface.
Upgrading from 2.x
Version 3.0 is a complete rewrite. Previous versions wrapped the C snap7 shared library; version 3.0 implements the entire protocol stack in pure Python. While the public API is largely the same, this is a fundamental change under the hood.
If you experience issues after upgrading:
Please report them on the issue tracker with a clear description and your version (
python -c "import snap7; print(snap7.__version__)").As a workaround, pin to the last pre-3.0 release:
$ pip install "python-snap7<3"
The latest stable pre-3.0 release is version 2.1.1.