Skip to main content

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.

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

MPL-2.0

Metadata

Release files for laddercodec 0.1.9

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

Source distribution (sdist)

Source distribution for laddercodec 0.1.9
File Size Uploaded
laddercodec-0.1.9.tar.gz 363.8 kB Details

Built distribution (wheel)

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

Total release size: 489.1 kB

Release files / laddercodec-0.1.9.tar.gz

Download URL laddercodec-0.1.9.tar.gz
Size 363.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7988dc6df355dc5be40260bcde991c6386dab7707f176c005bf829f8102be7ea
BLAKE2b-256 checksum
How to use checksums
a273436a8ea6b85b11a3cbd56c5122fbdbaea634a92ec6304a63b9dbffdf5f4e
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 12, 2026.

Transparency log

Release files / laddercodec-0.1.9-py3-none-any.whl

Download URL laddercodec-0.1.9-py3-none-any.whl
Size 125.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
227b7c1a46b8449117fdb10dc72f8dc1e6a1fc9a93335f5fb3310e93f80bf5d6
BLAKE2b-256 checksum
How to use checksums
6f73cbaac463341a4e0375dbdccbb4f43077a5c318a7de99a1435daafac9ee8c
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

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