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.2.0.tar.gz (131.8 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.2.0-py3-none-any.whl (49.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyclickplc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0f399b380e03897ea226e9a1e9b81f4390b085575dbb975d553951e312ccb130
MD5 fbc4e805d0753ecb9b3b4dce93addc84
BLAKE2b-256 7a9b1af0750fae1a1d64b68aa09ba771844b5122178b41115bedf11b46219fa3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyclickplc-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 49.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14f98c9d6dde07a5cd2a0ee8d3424277a8c1adaeb8fdc68daa9d20230bb06f0e
MD5 89b592aea0ee771074391b1ada5c2c0c
BLAKE2b-256 2cd877eb4f918107fcdb5271ee8f34a71e127d1f6afc3915b12b4fa49c13b1e5

See more details on using hashes here.

Provenance

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