Major release: new s7 package with S7CommPlus protocol support.
- New
s7package as recommended entry point with protocol auto-detection - S7CommPlus V1, V2 (TLS), and V3 support for S7-1200/1500
- S7CommPlus area read/write (M, I, Q, counters, timers)
- S7CommPlus PLC start/stop via INVOKE
- S7CommPlus object browsing via EXPLORE
- S7CommPlus live symbol browsing (
client.browse()) and datablock listing (experimental) - TIA Portal XML import for SymbolTable (
SymbolTable.from_tia_xml()) (experimental) - Partner BSend/BRecv with correct PBC format, async receive, PDU reference echo
- TCP_NODELAY and SO_KEEPALIVE on all sockets for lower latency
- Structured logging with PLC connection context (
snap7.log) - Command-line interface (
snap7-cli/s7) - Multi-variable read optimizer with parallel dispatch (experimental)
- S7 routing for multi-subnet PLC access (experimental)
- Symbolic addressing via SymbolTable (experimental)
- S7CommPlus CPU state reading and block transfer (upload/download)
- Array read/write helpers (
db_read_array,db_write_array) - Missing data type setters:
set_lint,set_ulint,set_ltime,set_ltod,set_ldt - Unified Tag API:
client.read_tag("DB1.DBD0:REAL")with PLC4X / Siemens STEP7 syntax, replacing the homegrown SymbolTable class. Loaders:load_csv,load_json,load_tia_xmlreturndict[str, Tag] - Dual-dialect tag parsing:
PLC4XTagandNodeS7Tagsubtypes ofTagwith dialect-specificparse()and__str__(round-trip).parse_tag(s, *, strict=True)autodetects dialect from syntax markers (,→ nodeS7,:TYPE→ PLC4X);strict=Falseaccepts bare short forms likeM7.1orIW22. Enables pyS7 / Node-RED tag migration. - Symbolic (LID-based) access for optimized DBs (experimental):
Tag.from_access_string("8A0E0001.A", "REAL")creates a symbolic Tag;client.read_tag(tag)routes to S7CommPlus LID-based access via the PLC's symbol tree. Required for S7-1200/1500 DBs with "Optimized block access" enabled (the TIA Portal V13+ default). - Optimizer excludes counter/timer areas from byte-range merging
- Fixed
get_cpu_infofield offsets for real S7-300/1500 (thanks @qzertywsx) - Fixed
S7SZL.__str__attribute name typo (thanks @qzertywsx) - Dependabot auto-merge for dependency updates
- Documentation restructured: API Reference + Internals sections
- @hs2bws-hash — extensive real PLC testing of Partner BSend/BRecv (#668)
- @QuakeString — read optimizer inspiration via python-snap7-optimized fork
Major release: python-snap7 is now a pure Python S7 communication library. This version completely breaks with the previous approach of wrapping the C snap7 shared library. The entire S7 protocol stack is now implemented in pure Python, greatly improving portability and making it easier to install and extend.
- Breaking: The C snap7 library is no longer required or used
- Complete rewrite of the S7 protocol stack in pure Python
- Native Python implementation of TPKT (RFC 1006) and COTP (ISO 8073) layers
- Native S7 protocol PDU encoding/decoding
- Pure Python server implementation for testing and simulation
- No platform-specific binary dependencies — works on any platform that runs Python
- Improved error handling and connection management
- Full type annotations with mypy strict mode
- CLI interface for running an S7 server emulator (
pip install "python-snap7[cli]")
If you experience issues with 3.0, please report them on the issue tracker with a clear description and the version you are using. As a workaround, pin to the last pre-3.0 release:
$ pip install "python-snap7<3"
Special thanks to the following people for testing, reporting issues, and providing feedback during the 3.0 development:
- @lupaulus — extensive testing and bug reports
- @spreeker — testing and feedback
- @nikteliy — review and feedback on the rewrite
- @amorelettronico — testing
- @razour08 — testing
- @core-engineering — bug reports (#553)
- @AndreasScharf — bug reports (#572)
- @Robatronic — bug reports (#574)
- @hirotasoshu — feedback (#545)
- @PoitrasJ — bug reports (#479)
- fix wheel tag for linux x86_64 by @nikteliy in #297
- Fixed typo area doesn't exist areas does by @Ofloo in #306
- add get_time and set_time in util by @Yingliangzhe in #308
- modification of TIME data type by @Yingliangzhe in #311
- added DATE_AND_TIME Value as Datetime object by @zsisamci in #312
- #273 by @nikteliy in #321
- Add byte type parsing to DB_Row API + set parsing case insensitive by @LoicGRENON in #315
- added missing types in WordLen by @zsisamci in #326
- Add support for read/write unsigned value from bytearray by @LoicGRENON in #316
- fixing ip string paramters to c function by @zsisamci in #329
- Add py.typed marker file by @mthuurne in #342
- require correct package name, fixes issue #344 by @gijzelaerr in #345
- Fix warnings by @nikteliy in #350
- Update license identifier by @Shortfinga in #349
- Update client db_write docs by @pwablito in #352
- Fix db_offset calculation error by @lubbbert in #351
- fix #355 by @swamper123 in #359
- fix #272 by @swamper123 in #360
- fix get_time for small values by @swamper123 in #358
- add more getter methods for utils by @swamper123 in #357
- Prepare for 1.2 by @gijzelaerr in #364
- @Ofloo made their first contribution in #306
- @zsisamci made their first contribution in #312
- @LoicGRENON made their first contribution in #315
- @mthuurne made their first contribution in #342
- @Shortfinga made their first contribution in #349
- @pwablito made their first contribution in #352
- @lubbbert made their first contribution in #351
Full Changelog: https://github.com/gijzelaerr/python-snap7/compare/1.1...1.2
- Make a binary wheel for all platforms (#232)
- Improve doc strings of all functions (#242)
Special thanks for this release to
- Fabian Beitler
- Nikteliy
- Lautaro Nahuel Dapino
- Drop python 2 support (#214)
- Feature request: ReadSZL() (#196)
- Keep argument format across the functions (#193)
- Drop Python2 Tests (#167)
- Support for S5TIME (#163)
- Add type annotations (#157)
- client.full_upload() return bytearray size 65536 (#127)
- Some client tests segfault on Linux (#26)
- Not all functions are implemented yet (#25)
special thanks to Fabian Beitler and Nikteliy for their contributions to the 1.0 release!
- Update read_multi.py (#132)
- Added fixes to snap7/client.py read_area function to allow for Counter and Timer Reads (#121)
- Post to a public docker repository? (#119)
- Implementation of Cli_SetDateTime, Cli_GetDateTime enhancement (#114)
- Fix OSX travis build #99
- util.get_int() broken #101
- Compatibility issue with Python3 #109
- Logo 8 improvements bug #105
- util.get_int() broken (#65, #71)
- fix Add files via upload bug (#59)
Special thanks to Pelle van der Heide for solving issues
- Add del to client, server and partner (#69)
- Add files via upload (#59)
Special thanks to xybsoft for solving issues
- adding some missing functions
- fixing Python3 support (issue #43)
- improving the documentation
More functions added:
- client.plc_stop
- client.plc_cold_start
- client.plc_hot_start
- client.read_multi_vars
Small fix, README.rst was not included in sdist
- Add support for Windows
- Add functions added in Snap7 1.1.0
- Add missing client functions
- fix some partner functions
- simplified API
- Initial release.