Skip to main content

Utilities for AutomationDirect CLICK PLCs: Modbus TCP client/server, address helpers, nickname CSV I/O, and DataView CDV I/O.

Project description

pyclickplc

Talk to AutomationDirect CLICK PLCs from Python. Async Modbus TCP client/server, address helpers, nickname CSV and DataView CDV file I/O.

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
        df1 = await plc.addr.read("DF1")  # float

asyncio.run(main())

No PLC on hand? The quickstart uses ClickServer to simulate one locally.

What's included

Modbus clientClickClient 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 serviceModbusService wraps the async client for sync and UI applications with background polling and auto-reconnect.

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

File I/O — Read and write CLICK nickname CSV and DataView CDV files. Compatible with CLICK programming software and ClickNick.

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 display indexing
File I/O Nickname CSV and DataView CDV
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 (mkdocs + mkdocstrings)
make docs-serve               # Serve docs locally
make                          # All of the above

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyclickplc-0.3.0.tar.gz (137.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyclickplc-0.3.0-py3-none-any.whl (52.5 kB view details)

Uploaded Python 3

File details

Details for the file pyclickplc-0.3.0.tar.gz.

File metadata

  • Download URL: pyclickplc-0.3.0.tar.gz
  • Upload date:
  • Size: 137.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyclickplc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 54f972d9248d7f1b2d2fa921a55dcea387552a355d2d5796e1123eb64539ea93
MD5 70c364b9d06a88fa603eb066f5be2d8f
BLAKE2b-256 7f2547d81ccf9b0a03cfbb479dafd430b7d69d903f8e78edf919993b4f5842ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyclickplc-0.3.0.tar.gz:

Publisher: publish.yml on ssweber/pyclickplc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyclickplc-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pyclickplc-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 52.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyclickplc-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b111806033de1695360d7ba9afd494070c3c06a8918ec0a5ad817d9ac5c7cda
MD5 43988e38787a31ded81ad0c42bbb5875
BLAKE2b-256 f19d341c982d27e263215893f7a03d0425bb0ee620c96e61390a82665e822682

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyclickplc-0.3.0-py3-none-any.whl:

Publisher: publish.yml on ssweber/pyclickplc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page