--- id: python-snap7 version: "3.1.2" license: MIT license_treatment: permissive maintenance: active --- # python-snap7 — Pure Python S7 communication library for Siemens PLCs License: permissive · Maintenance: active · Downloads: 255.2K/mo ## What it is and what it does Python-snap7 is a pure Python implementation of the S7 protocol stack for communicating with Siemens S7 PLCs over Ethernet. As of version 3.0, it no longer wraps a C library; instead, the entire protocol stack (TPKT, COTP, and S7) is implemented in pure Python. This eliminates platform-specific shared libraries and makes installation straightforward across Windows, Linux, macOS, and ARM systems. The library provides both synchronous and asynchronous APIs for reading and writing PLC memory, with recent additions including tag-based read/write by symbolic name, multi-variable read optimization, S7 routing for remote PLCs, heartbeat monitoring with auto-reconnect, and PROFINET DCP network discovery. The package targets industrial automation developers who need to interface Python applications with Siemens PLCs. It requires Python 3.10+ but has no external runtime dependencies, making it portable across diverse deployment environments. Version 3.1 adds AsyncClient for asyncio support, structured logging, and CLI tools. Use it for: - Read sensor data and device status from Siemens PLCs in real-time monitoring or data collection applications - Write control commands to PLCs from Python automation scripts or supervisory systems - Build async Python services that communicate with multiple PLCs concurrently without blocking - Discover and interact with PLCs on a network using PROFINET DCP and S7 routing - Integrate PLC communication into Python-based SCADA or industrial IoT platforms ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pure Python library for reading and writing data to Siemens S7 PLCs over Ethernet, with support for synchronous and asynchronous operations. Yes. The library is actively maintained, production-stable (Development Status 5), has zero known vulnerabilities, and eliminates installation friction by being pure Python with no native dependencies. It is well-suited for industrial automation projects targeting Python 3.10+. The recent 3.1 release adds AsyncClient support and modern features. Install it if you need to communicate with Siemens S7 PLCs from Python. ## Install pip install python-snap7 uv add python-snap7 poetry add python-snap7 ## Installing python-snap7 Before you install: Low friction: pure Python package with no native dependencies, works on Python 3.10+. Repository is active with recent release 4 days old and 830 stars. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most industrial and commercial deployments. Quickstart: pip install python-snap7 import snap7 client = snap7.Client() client.connect("192.168.1.10", 0, 1) data = client.db_read(1, 0, 4) client.disconnect() Verify before relying: - Performance characteristics when handling high-frequency reads on large datasets - Compatibility with specific Siemens S7 PLC models and firmware versions - Production-readiness of heartbeat monitoring and auto-reconnect features ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 255.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags siemens plc communication, s7 protocol python, plc data read write, s7 ethernet client, industrial automation interface, siemens plc driver, s7 networking, industrial-automation, siemens-plc, async-support [View on SkillFed](https://skillfed.io/packages/python-snap7) · [View on PyPI](https://pypi.org/project/python-snap7/)