Releases: gijzelaerr/python-snap7
3.0.0 — Pure Python Rewrite
python-snap7 3.0.0 — Pure Python Rewrite
This is a major release that completely rewrites python-snap7 as a pure Python S7 communication library. The C snap7 shared library is no longer used — the entire protocol stack (TPKT, COTP, and S7) is now implemented in pure Python.
The name "python-snap7" is historical — the library originally started as a Python wrapper around the Snap7 C library. As of this release, the C library is no longer needed, but the name is kept for backwards compatibility.
What's new
- Pure Python implementation — no native dependencies, no shared libraries
- Works everywhere — any platform that runs Python 3.10+, including ARM, Alpine Linux, and other environments where the C library was difficult or impossible to install
- Easier to extend — new features and protocol support can be added directly in Python
- Complete TPKT (RFC 1006) and COTP (ISO 8073) transport layer implementation
- Native S7 protocol PDU encoding/decoding
- Pure Python server implementation for testing and simulation
- Full type annotations with mypy strict mode
- CLI interface for running an S7 server emulator (
pip install "python-snap7[cli]")
Breaking changes
This release completely breaks with the previous approach of wrapping the C snap7 shared library. While the public API is largely the same, this is a fundamental change under the hood. If you experience issues:
- Please report them on the issue tracker with a clear description and the version you are using (
python -c "import snap7; print(snap7.__version__)") - As a workaround, pin to the last pre-3.0 release:
pip install "python-snap7<3"
Thanks
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
- @AndreasScharf — bug reports
- @Robatronic — bug reports
- @hirotasoshu — feedback
- @PoitrasJ — bug reports
2.1.1
Fix Read the Docs build configuration for pre-3.0 documentation.
- Fix
.readthedocs.yamlto install from pyproject.toml extras instead of missingrequirements-dev.txt - Add mock imports in
doc/conf.pyso autodoc works without the native snap7 C library on RTD - Use
sphinx_rtd_themefor consistent styling
v2.1.0
What's Changed
Bug Fixes
- Fix PLC setter functions for memoryview compatibility (#575)
- Cache
error_text()instead ofcheck_error()(#552)
Improvements
- Add ASCII validation in
set_string()withisascii()(#561) - Update
read_multi.pyexample (#563) - Code quality improvements and comprehensive documentation (#568)
- Fix typo: ussage -> usage (#564)
CI/CD & Infrastructure
- Modernize CI/CD: switch to uv, fix Python 3.11+ compatibility (#576)
- Drop Ubuntu 20.04 from CI matrix (#562)
Supported Python versions
- Python 3.10, 3.11, 3.12, 3.13, 3.14
Full Changelog: 2.0.2...2.1.0
2.0.2
What's Changed
- we dont need
enum_tools.autoenumby @gijzelaerr in #548
Full Changelog: 2.0.1...2.0.2
2.0.1
What's Changed
- better parsing to avoid bugs when variables name contain whitespaces by @Novecento99 in #529
- update docstring to match new API #537 by @gijzelaerr in #538
- fix indentation of docs by @gijzelaerr in #544
- make test timezone aware by @gijzelaerr in #543
New Contributors
- @Novecento99 made their first contribution in #529
Full Changelog: 2.0.0...2.0.1
2.0.0
major release with backwards compatibility changes
This release is a restructure of the codebase, cleaning up old inconsistencies and spelling mistakes. Although attempts were made to keep the API backwards compatible, a method argument might have changed here and there. This release is also 100% typed, helping us find and fix tiny bugs and mistakes.
This makes the python-snap7 'done', all functionality is implemented and no changes in the API are expected anymore.
Most important changes
- Improve typing by @nikteliy in #516
- Improve use of enum types by @gijzelaerr in #515
Full Changelog: 1.4.1...2.0.0
1.4.1
What's Changed
- update container workflow by @gijzelaerr in #509
- avoid creating compressed tags set by @nikteliy in #510
- Make client and server a contextmanager by @gijzelaerr #512
- Drop Python 3.8 from metadata and doc by @gijzelaerr #513
- Drop Snap7Library singleton and use python functools caching by @gijzelaerr #514
- Doc: Typo and samples for CPU State and CP State @lupaulus #508
Full Changelog: 1.4...1.4.1
1.4
What's Changed
- Fix #431 by @nikteliy in #432
- Add arm32v7 wheel (Issue #376) by @nikteliy in #442
- Update github actions by @nikteliy in #443
- Fix utils by @nikteliy in #444
- Add reusable action by @nikteliy in #446
- append arm in installation doc by @Tathar in #450
- Fix example by @FiloCara in #452
- Fix #451 by @nikteliy in #453
- Add pre-commit by @nikteliy in #460
- add missing lreal to util.py by @spreeker in #487
- Prepare for 1.4 by @gijzelaerr in #477
- Issue 474 fix by @nikteliy in #501
- try to fix more builds by @gijzelaerr in #502
- Also include submodules by @gijzelaerr in #503
- fix build by @nikteliy in #504
- use venv everywhere by @gijzelaerr in #505
- fix bad cli_as_callback implementation by @gijzelaerr in #506
- add python 3.12 wheels, drop 3.8 and older by @gijzelaerr in #474
New Contributors
- @kaisersource made their first contribution in #425
- @Tathar made their first contribution in #450
- @FiloCara made their first contribution in #452
Full Changelog: 1.3...1.4
1.3
What's Changed
- drop python 3.6 versions in checks by @swamper123 in #369
- fix set_string by @swamper123 in #368
- use https for links by @imba-tjd in #370
- use more pythonic syntax by @imba-tjd in #373
- fixed DB class not allowing to write BYTE values to rows by @vmsh0 in #377
- Deprecate old osx by @gijzelaerr in #383
- Add support to read/write space-padded fixed-length strings by @vmsh0 in #378
- DB usability improvements by @vmsh0 in #385
- Make all internal imports relative by @vmsh0 in #386
- fixed typo in portnumber by @Cube707 in #408
- fix linux build by @gijzelaerr in #410
- implement
__main__.pyenty points by @Cube707 in #409
New Contributors
- @imba-tjd made their first contribution in #370
- @vmsh0 made their first contribution in #377
- @Cube707 made their first contribution in #408
Full Changelog: 1.2...1.3
1.2
What's Changed
- 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
New Contributors
- @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: 1.1...1.2