Skip to main content
https://img.shields.io/pypi/v/python-snap7.svg https://img.shields.io/pypi/pyversions/python-snap7.svg https://img.shields.io/github/license/gijzelaerr/python-snap7.svg https://github.com/gijzelaerr/python-snap7/actions/workflows/test.yml/badge.svg https://readthedocs.org/projects/python-snap7/badge/

python-snap7

python-snap7 is a pure-Python library for communicating with Siemens S7 PLCs using the classic S7 protocol. It supports S7-300 and S7-400 controllers, as well as S7-1200 and S7-1500 controllers with PUT/GET access enabled. It supports Python 3.10+ on Windows, Linux, and macOS without native dependencies.

S7-1200 and S7-1500

On S7-1200 and S7-1500 controllers, python-snap7 only works when PUT/GET access is enabled in TIA Portal, and it cannot access optimized data blocks. PUT/GET is unauthenticated and disabled by default, so leaving it disabled is the more secure configuration.

If PUT/GET is disabled, or you need optimized data blocks or symbolic access, use s7commplus instead:

pip install s7commplus

s7commplus is a separate, younger project that implements S7CommPlus, the protocol these controllers speak natively. Check the firmware versions validated so far before relying on it, and see the PLC support matrix for what python-snap7 supports on each controller family.

Installation

Install from PyPI:

pip install python-snap7

Quick start

from s7 import Client

client = Client()
client.connect("192.168.1.10", 0, 1)
data = client.db_read(1, 0, 4)
client.disconnect()

The s7 package is the recommended import. The snap7 package name is also available for backwards compatibility.

Documentation

Read the full documentation at python-snap7.readthedocs.io.

The safe volunteer hardware-test procedure is in Real-PLC acceptance testing. The CPUs and firmware versions it has passed on are listed under Tested and Verified Hardware.

Metadata

Release files for python-snap7 3.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-snap7 3.5.0
File Size Uploaded Provenance Actions
python_snap7-3.5.0.tar.gz 317.5 kB With provenance Details for python_snap7-3.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-snap7 3.5.0
File Interpreter ABI Platform Actions
python_snap7-3.5.0-py3-none-any.whl Python 3 none any Details for python_snap7-3.5.0-py3-none-any.whl

Total release size: 481.0 kB

Release files / python_snap7-3.5.0.tar.gz

Download URL python_snap7-3.5.0.tar.gz
Size 317.5 kB
Tags Source
SHA-256 checksum
How to use checksums
baef4b06863f64115159c203e6aaaa0100e651e0332d606bacd3f416e3375f27
BLAKE2b-256 checksum
How to use checksums
5348233736999874d20b20fe748bec1edb0609682c1dbd60f510996b7e2ea6fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / python_snap7-3.5.0-py3-none-any.whl

Download URL python_snap7-3.5.0-py3-none-any.whl
Size 163.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86be44d0b272eca5bcc964bc04cf76f3858e119ec54bea16a9bed6faa895685f
BLAKE2b-256 checksum
How to use checksums
5c95bbf4abb6f40be51edd92c5613d98b7c224ffb356035d927b036f2d91c180
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for python-snap7 3.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for python_snap7-3.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.5.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page