Skip to main content

PLCOpener Tools

Python 3.7+ License

PLCOpener is a professional Python package for extracting and inserting Structured Text (ST) code in PLCOpen XML files (compatible with CODESYS, TwinCAT, etc.).

It allows developers to bridge the gap between monolithic XML exports and modern software engineering practices like Git version control, external code analysis, and automated refactoring.

Features

  • Folder Reconstruction: Rebuilds the project tree structure on your filesystem.
  • Resource Management: Automatically detects and groups files by PLC applications/resources.
  • Resilient Parsing: Robust handling of malformed or incomplete XML project files.
  • CLI & Library: Full support for both command-line automation and programmatic use.

Installation

pip install .

Quick Start

1. Extracting ST code

plcopen-extract project.xml -o my_workspace

2. Modifying and Re-inserting

After editing the .st files in my_workspace, push the changes back:

plcopen-insert project.xml --st-dir my_workspace -o updated_project.xml

Documentation

For a detailed project description and complete examples, please see DESCRIPTION.md.

Usage Example (Library)

from plcopener import ProjectExtractor, ProjectInserter

# Extract
ProjectExtractor("project.xml").extract("st_output")

# Insert
ProjectInserter("project.xml").insert("st_output", output_path="updated.xml")

Metadata

Release files for plcopener 0.1.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 plcopener 0.1.0
File Size Uploaded Provenance Actions
plcopener-0.1.0.tar.gz 25.0 kB Without provenance Details for plcopener-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plcopener 0.1.0
File Interpreter ABI Platform Actions
plcopener-0.1.0-py3-none-any.whl Python 3 none any Details for plcopener-0.1.0-py3-none-any.whl

Total release size: 50.8 kB

Release files / plcopener-0.1.0.tar.gz

Download URL plcopener-0.1.0.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
872b8323a9dc5ebfbae33e30e141a18685bf2b2870593cbbed7835c22783103f
BLAKE2b-256 checksum
How to use checksums
6eaec98cae0cac09bd0c7c157ae6d1f73fd6569a29698dbc34ebd2b5d2d76a09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / plcopener-0.1.0-py3-none-any.whl

Download URL plcopener-0.1.0-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
002d25daf6bd28224e1bdc7c50c4cc5ec7c41ff83753ca11122d891b2ad1eef0
BLAKE2b-256 checksum
How to use checksums
c761b994ec01990e5224a5e025a42563bcbf85affb276451bf2c2134c06d660d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for plcopener 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

0.1.0 This release

2 release files No 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