GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - gijzelaerr/python-snap7: a pure Python S7 communication library for interfacing with Siemens S7 PLCs

BranchesTags
Open more actions menu

Latest commit

 

History

698 Commits
698 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
doc
doc
 
 
example
example
 
 
s7
s7
 
 
snap7
snap7
 
 
tests
tests
 
 
tools
tools
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.readthedocs.yaml
.readthedocs.yaml
 
 
AGENTS.md
AGENTS.md
 
 
CHANGES.md
CHANGES.md
 
 
CLAUDE.md
CLAUDE.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
Makefile
Makefile
 
 
README.rst
README.rst
 
 
pyproject.toml
pyproject.toml
 
 
tox.ini
tox.ini
 
 
uv.lock
uv.lock
 
 

Repository files navigation

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.

About

a pure Python S7 communication library for interfacing with Siemens S7 PLCs

python-snap7.readthedocs.org/

Topics

ctypesplcpythons7siemenssnap7wrapper

Resources

Readme
License
Activity

Stars

875 stars

Watchers

49 watching

Forks

286 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.