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
Metadata
Release files for laddercodec 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| laddercodec-0.2.0.tar.gz | 672.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| laddercodec-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 796.7 kB
Release files / laddercodec-0.2.0.tar.gz
| Download URL | laddercodec-0.2.0.tar.gz |
|---|---|
| Size | 672.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
679c99cf46a6bf13747316054a0ffffe53ffe9648ba712ddc1154e890c1022ea
|
|
BLAKE2b-256 checksum How to use checksums |
9c62c5ecba3c5824d77ca58ef2ffad0bf7c8eebb16af72089e67080e9a4e83cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 15, 2026.
Transparency logRelease files / laddercodec-0.2.0-py3-none-any.whl
| Download URL | laddercodec-0.2.0-py3-none-any.whl |
|---|---|
| Size | 124.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1dd0ec7aa3b1d9c8b0ca9facdc4f49094891320b5d84f0e6d9e85a89dd6ceca
|
|
BLAKE2b-256 checksum How to use checksums |
ae8f0a24c5cd05d9269e96a725d4691150599be9d6cfeae226fde41b8cd60d5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 15, 2026.
Transparency log