Skip to main content

laddercodec

The compatibility layer for CLICK ladder data. laddercodec reads and writes CLICK's native representations and enables reliable round-tripping between CLICK and the pyrung/ClickNick toolchain. Tested against v2.60 to v3.9x captures. Zero runtime dependencies.

It's the layer ClickNick pastes through, and it's useful on its own to convert between CLICK ladder data, Python objects, and CSV.

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 ladder data from native CLICK 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.

CLICK format reference — Technical reference for CLICK's native clipboard and program representations, including binary layouts and instruction records.

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 clipboard and program data round-trips stay lossless while those families remain opaque.

Learn more

Encoding guide Encode, decode, and round-trip your first rung
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.2.2

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.2.2
File Size Uploaded
laddercodec-0.2.2.tar.gz 699.0 kB Details

Built distribution (wheel)

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

Total release size: 822.6 kB

Release files / laddercodec-0.2.2.tar.gz

Download URL laddercodec-0.2.2.tar.gz
Size 699.0 kB
Tags Source
SHA-256 checksum
How to use checksums
42356514153607f66497de489ebfd77713d3d535087ccc6a4d1ea28608b847cf
BLAKE2b-256 checksum
How to use checksums
c7c067d0b7c12dd3416a824ec7119867bbe9a56b941c09d5c401990cf18f6a2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 10, 2026.

Transparency log

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

Download URL laddercodec-0.2.2-py3-none-any.whl
Size 123.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
927003f970b4f8a1bb1af443bb8d370e78d32f6faf78e0df5a70592d931d38bb
BLAKE2b-256 checksum
How to use checksums
9420f5c1229250b44bfe92c78c06b45f208a322b1d71fbe5b64780c7b36b0317
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

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