You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+95-1Lines changed: 95 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,101 @@ Python-snap7 is a Python wrapper for the Snap7 library, providing Ethernet commu
18
18
-**snap7/common.py**: Common utilities including library loading
19
19
-**snap7/error.py**: Error handling and exceptions
20
20
21
-
The library uses ctypes to interface with the native Snap7 C library (libsnap7.so/snap7.dll/libsnap7.dylib).
21
+
The library traditionally uses ctypes to interface with the native Snap7 C library (libsnap7.so/snap7.dll/libsnap7.dylib), but now also includes a **pure Python implementation** that removes the dependency on the C library.
22
+
23
+
## Pure Python Implementation
24
+
25
+
### Overview
26
+
27
+
The project includes a complete pure Python implementation of the S7 protocol that eliminates the need for the Snap7 C library. This implementation provides:
28
+
29
+
-**Zero dependencies** on external C libraries
30
+
-**Cross-platform compatibility** without platform-specific binaries
31
+
-**Full S7 protocol support** for basic operations (read/write/connect)
32
+
-**Drop-in replacement** API compatibility with the ctypes version
33
+
34
+
### Architecture
35
+
36
+
**snap7/native/**: Pure Python S7 protocol implementation
37
+
-**snap7/native/client.py**: Core S7Client class with connection management
38
+
-**snap7/native/connection.py**: ISO on TCP implementation (TPKT/COTP layers)
0 commit comments