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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyclickplc-0.3.2.tar.gz
Algorithm Hash digest
SHA256 496e32a2a3c98f15da206b5a172e399d00b2ebbfd7f7872c311cd23a5dc6c706
MD5 96b25e1182558e75c044bdaed328fe0a
BLAKE2b-256 5729d8f9f1c0eceaec665ff91f8ccf41764903210cabbabe183d98048ab61caa

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyclickplc-0.3.2-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.12

File hashes

Hashes for pyclickplc-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 03f25b167d0aa062b02dd337e361797fd2f2493cd8fb52401a34ca96ebfbee7a
MD5 46e6a40a31c7650d5b20434d2fbeb257
BLAKE2b-256 6e579bdc1f66a77505ff34378f3c312accf158f2e0c25566d79826665c08fd11

See more details on using hashes here.

Provenance

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