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.1.tar.gz (138.0 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.1-py3-none-any.whl (52.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyclickplc-0.3.1.tar.gz
  • Upload date:
  • Size: 138.0 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.1.tar.gz
Algorithm Hash digest
SHA256 75d06afba3f052f454038e7755f81ac3c49d47bed02d76a2d59b83994b7482a8
MD5 1c5a3e33c4c1056b3b1d4b43dbf5081f
BLAKE2b-256 04da61820cbb5cd9c6f94e701da89ca326828c386a1ff13615f2e1655c96c596

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyclickplc-0.3.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: pyclickplc-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 52.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b061a1167475dd956baf51541ce36c541587220268536e471bea323ff7efa068
MD5 4d521c26d3023d3243b44c120468b4cc
BLAKE2b-256 067297751ff252abdb637d1f1462bcd010dc422171d7cb5d4caef3488379b4fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyclickplc-0.3.1-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