Binary codec for AutomationDirect CLICK PLC ladder clipboard format
Project description
laddercodec
Binary codec for AutomationDirect CLICK PLC ladder clipboard format. Encodes and decodes the native clipboard binary used by CLICK Programming Software. Tested against v2.60-v3.9x captures. Zero runtime dependencies.
- Documentation: https://ssweber.github.io/laddercodec/
- LLM docs index: https://ssweber.github.io/laddercodec/llms.txt
- LLM full context: https://ssweber.github.io/laddercodec/llms-full.txt
Install
uv add laddercodec
# or
pip install laddercodec
Requires Python 3.11+.
Quick example
from laddercodec import read_csv, encode, decode
# CSV → binary (ready to paste into Click)
rungs = read_csv("my_rung.csv")
binary = encode(rungs[0])
# Binary → structured data
rung = decode(binary)
print(rung.logical_rows)
print(rung.instructions)
What's included
Encoder — encode() takes Rung objects or canonical CSV and produces clipboard binary ready to paste into Click. Supports all standard instruction types, wire topologies, and styled comments.
Decoder — decode() reads clipboard binary back into structured Python objects (contacts, coils, timers, wires, comments). decode_program() reads Click's internal Scr*.tmp program files.
CSV I/O — read_csv() and write_csv() convert between the 33-column canonical CSV format and Rung objects. Multi-file program bundles supported.
Binary format docs — Byte-level reverse engineering of Click's clipboard and program file formats: buffer layout, cell grid, wire flags, instruction blobs, and multi-rung framing.
Status
laddercodec is beta for clipboard encode/decode, CSV I/O, and decode_program().
Email, Home, Position, and Velocity still intentionally surface as raw(...) passthroughs so binary and SCR round-trips stay lossless while those families remain opaque.
Learn more
| Quickstart | Encode, decode, and round-trip your first rung |
| Encoding guide | Build rungs, wire tokens, instruction types, comments |
| Decoding guide | Structured decode, program files, round-trip identity |
| CSV format | 33-column canonical format, bundle layout, topology rules |
| Adding instructions | Extend the codec with new instruction types |
| API reference | Auto-generated from docstrings |
Development
make install # uv sync --all-extras --dev
make test # pytest
make lint # ruff + ty
make golden # regenerate .bin from .csv fixtures
make docs-serve # local docs dev server
make # all of the above
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file laddercodec-0.1.8.tar.gz.
File metadata
- Download URL: laddercodec-0.1.8.tar.gz
- Upload date:
- Size: 348.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a493cca281175d72efa07698d9235129d0949f5f13d83bec912b28e1df4c37a6
|
|
| MD5 |
c07ce8074f3209c7498188bc9b7ca28f
|
|
| BLAKE2b-256 |
fce59a14551b3bb0193e4f8a0c07408dcdcd8ffa8fefe6676491de820787874e
|
Provenance
The following attestation bundles were made for laddercodec-0.1.8.tar.gz:
Publisher:
publish.yml on ssweber/laddercodec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
laddercodec-0.1.8.tar.gz -
Subject digest:
a493cca281175d72efa07698d9235129d0949f5f13d83bec912b28e1df4c37a6 - Sigstore transparency entry: 1310553799
- Sigstore integration time:
-
Permalink:
ssweber/laddercodec@32a7f5e5b1994b2c24666e3b4c929e04e6215342 -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/ssweber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@32a7f5e5b1994b2c24666e3b4c929e04e6215342 -
Trigger Event:
release
-
Statement type:
File details
Details for the file laddercodec-0.1.8-py3-none-any.whl.
File metadata
- Download URL: laddercodec-0.1.8-py3-none-any.whl
- Upload date:
- Size: 123.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e18e46a075146b48dda1e672214238816cc78124518422c0e60a8d0174fe1f53
|
|
| MD5 |
a5405f5d900f99812d7ae72116c0518f
|
|
| BLAKE2b-256 |
04afd7e9b2a6a53c1520ed6bc9569a54551b57ef8022f8d449ce72d9a3dda0f0
|
Provenance
The following attestation bundles were made for laddercodec-0.1.8-py3-none-any.whl:
Publisher:
publish.yml on ssweber/laddercodec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
laddercodec-0.1.8-py3-none-any.whl -
Subject digest:
e18e46a075146b48dda1e672214238816cc78124518422c0e60a8d0174fe1f53 - Sigstore transparency entry: 1310553860
- Sigstore integration time:
-
Permalink:
ssweber/laddercodec@32a7f5e5b1994b2c24666e3b4c929e04e6215342 -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/ssweber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@32a7f5e5b1994b2c24666e3b4c929e04e6215342 -
Trigger Event:
release
-
Statement type: