Skip to main content

pyclickplc

Talk to AutomationDirect CLICK PLCs from Python. Async Modbus TCP client and server, the CLICK address model, and readers and writers for CLICK's files: nickname CSV, DataView CDV, PLC data dumps and Project.ini.

It's the wire under pyrung and ClickNick, and it stands on its own as a Modbus client for any CLICK.

Install

uv add pyclickplc
# or
pip install pyclickplc

Requires Python 3.11+.

Quick example

import asyncio
from pyclickplc import ClickClient

async def main():
    async with ClickClient("192.168.1.10", 502) as plc:
        # Read and write registers with native Python types
        await plc.ds.write(1, 100)
        ds1 = await plc.ds[1]          # int
        await plc.y.write(1, True)     # bool
        values = await plc.addr.read("DF1-DF2")  # {"DF1": 0.0, "DF2": 0.0}

asyncio.run(main())

The quickstart uses ClickServer to simulate a PLC locally, so you don't need hardware to try it.

What's included

Modbus client — ClickClient reads and writes PLC values as native Python types (bool, int, float, str). Access by bank (plc.ds), by address string (plc.addr), or by tag name (plc.tag).

Modbus service — ModbusService wraps the async client for sync and UI applications with background polling and auto-reconnect.

Modbus server — ClickServer simulates a CLICK PLC over Modbus TCP. Use it for development and testing without hardware.

File I/O — Read and write nickname CSV and DataView CDV files and PLC data dumps as CLICK writes them, read installed modules and I/O assignments from a project's Project.ini, and read and set its PLC name.

Learn more

Quickstart Connect, read/write, simulate a traffic light
Client guide Bank accessors, address strings, tags
Types & values Native Python types per bank family
Addressing Normalization, sparse X/Y, XD/YD words
File I/O Nickname CSV, DataView CDV, PLC data dumps, Project.ini
Examples Runnable scripts

Development

uv sync --all-extras --dev    # Install dependencies
make test                     # Run tests (uv run pytest)
make lint                     # Lint (codespell, ruff, ty)
make docs-build               # Build docs (zensical + mkdocstrings)
make docs-serve               # Serve docs locally
make                          # Install, lint and test

Metadata

Release files for pyclickplc 0.11.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 pyclickplc 0.11.2
File Size Uploaded Provenance Actions
pyclickplc-0.11.2.tar.gz 272.4 kB With provenance Details for pyclickplc-0.11.2.tar.gz

Built distribution (wheel)

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

Total release size: 365.3 kB

Release files / pyclickplc-0.11.2.tar.gz

Download URL pyclickplc-0.11.2.tar.gz
Size 272.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d33f2d577aa1127103015eeb96382a560cd889b9e14f896b7d9b71272a3ca90b
BLAKE2b-256 checksum
How to use checksums
06af8e022e92eea758f4e5b2d36ec87159cc2d772d4bdf023f9db51012b0cbe1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 20, 2026.

Transparency log

Release files / pyclickplc-0.11.2-py3-none-any.whl

Download URL pyclickplc-0.11.2-py3-none-any.whl
Size 92.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d844a048fbf17db5ccff390ab73cd58cb61c8842b620ef00e288c867d50bebf
BLAKE2b-256 checksum
How to use checksums
a3765e3e5af2a63369c04bfdc9bfc07f16e9cc42db286abcf1c77efeab3c0260
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 20, 2026.

Transparency log

Security for pyclickplc 0.11.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyclickplc-0.11.2.tar.gz

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 Nov 20, 2026.

Transparency log

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.

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