Skip to main content

A Cython Modbus TCP client with heartbeat and multi-connection management.

Project description

modbus-tcp-cython

A Cython Modbus TCP client with structured protocol parsing, heartbeat reconnects, and multi-connection management.

Build locally

python -m venv .venv
. .venv/bin/activate
python -m pip install -U pip setuptools wheel Cython
python -m pip install .

Basic usage

from modbus_tcp import ModbusTcpClient

client = ModbusTcpClient("192.168.180.18", 26, timeout=5.0)
client.connect()

try:
    values = client.read_holding_registers(unit_id=3, start_address=2, quantity=1)
    print(values)
finally:
    client.close()

Multi-connection usage

from modbus_tcp import ModbusTcpManager

with ModbusTcpManager() as manager:
    manager.add_client(
        name="line_1",
        host="192.168.180.18",
        port=26,
        unit_id=3,
        heartbeat_address=2,
        heartbeat_interval=5.0,
    )
    manager.start_all()

    print(manager.read_holding_registers("line_1", 2, 1))

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

modbus_tcp_cython-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distributions

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

modbus_tcp_cython-0.1.0-cp314-cp314-win_amd64.whl (85.6 kB view details)

Uploaded CPython 3.14Windows x86-64

modbus_tcp_cython-0.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (735.6 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

modbus_tcp_cython-0.1.0-cp314-cp314-macosx_11_0_arm64.whl (105.2 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

modbus_tcp_cython-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl (108.2 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

modbus_tcp_cython-0.1.0-cp313-cp313-win_amd64.whl (84.0 kB view details)

Uploaded CPython 3.13Windows x86-64

modbus_tcp_cython-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (746.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

modbus_tcp_cython-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (104.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

modbus_tcp_cython-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl (107.6 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

modbus_tcp_cython-0.1.0-cp312-cp312-win_amd64.whl (84.0 kB view details)

Uploaded CPython 3.12Windows x86-64

modbus_tcp_cython-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (753.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

modbus_tcp_cython-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (105.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

modbus_tcp_cython-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl (108.6 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

modbus_tcp_cython-0.1.0-cp311-cp311-win_amd64.whl (85.6 kB view details)

Uploaded CPython 3.11Windows x86-64

modbus_tcp_cython-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (778.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

modbus_tcp_cython-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (107.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

modbus_tcp_cython-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl (111.0 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

Details for the file modbus_tcp_cython-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for modbus_tcp_cython-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d435a18a2aa65f95dfb1dc0249449b562b296503c6abcbc8aa10fd47800c1f0d
MD5 b76759822b48bf3ac4c1ab9efa253cd9
BLAKE2b-256 510fb1edbbb0181dc9b028201bf254d8d6a6fcd0da6e2d2ff16ecdf0f592d4ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0.tar.gz:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7a56a0a1604eabee7c18cf919c3d8e0327e1261ff4792a04151e17f1f2086b19
MD5 a631dee2119ea56daa7f4fef8e838daf
BLAKE2b-256 ab92165cf4af72c763df6fa491cf9042c17da2b3904d44d254c066faf1d9185d

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp314-cp314-win_amd64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eff53673e876d27d1b6ba9e02b8cee5c0d143261d23553f90f83032fd3e41a2d
MD5 c442611302a6468a5590c2a68ad192fc
BLAKE2b-256 3376dae8b383d372cc50a11a8bf1cfb99047d68aba387b512b308e66d475430e

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 40a2723d28c0185e755e5a359a196f1a692bed6fda5076b6ec0fc93c984cf016
MD5 e4c47b2a6ab51429102dc3f87c3ec6a9
BLAKE2b-256 b7d8e5db6b11e4f06e06472d1f7bffc79eb070aff3791f919e8a07be39943e82

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 291bec9a34e08e52d9ed6e02ece756809d1f4c6bf014ca1c6aff3181a6d28f69
MD5 a666bf344964096828069f5054359020
BLAKE2b-256 222cd66bda602784502521c736327b539dbe4cc8fe693250000d575c6800b840

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5ff1eefbebbb9faf06f9ebac5d930acb94e2edbcc84baa61b1d0ecd8bf3cfd1b
MD5 ba18e7616348e6c446015e46fc350230
BLAKE2b-256 b44c0ad9df263dac87065d9992da7d858787c1e756aad5d7150a12376566b2c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd15275f7c926c500aa9b0d56aa0f262922dc3d91aa79c67a5e315f0d197d529
MD5 de387ccedfcf01502551bbcb411d2e97
BLAKE2b-256 3a7a5a39951264ce8587fc9eb5e3d8badb1353cc9bbfa5c1b647242f56c66f59

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a0b78e69d4ae6a13f12b6a48e1bf886f9809395d0314273972a7c3f3ba0d2a7
MD5 5794ee0e8272814d321665f35ae755cf
BLAKE2b-256 89072af244f722bbe50994ba443167c8c3371c94d9a6fa04387ec70727471be4

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 81bbce4fac8c6c29d9bfdd2f50cf86745ff556a8efe912ddcbfa5285e6f43857
MD5 945cfe9e134f3569aed95ea201a992b5
BLAKE2b-256 6f63f30203d4ae80451b3e58170adfaad777eda8eb71839745a62dab82d7dd7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 83b26e8d4bdebec5970016f889d7326e72cea2e39d1f029bc8742fae645e4481
MD5 d1357a436fefeb0a468be30ea8b2b9d7
BLAKE2b-256 ea86d7cef9a79e610c87459316b44e2230aa5e38031097b134955ccb3b7bb8bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6924ce31ac54b7f4e3f4d8d4f503b6035be9b78569b03512ed32834afd20705e
MD5 e105df0d9d3d3949e65b24f91146d49a
BLAKE2b-256 bc221a79c731282f1d985458a5f3333bf271a064b251d8a29a3f744a34cc0db6

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d9d03e02885b5cd46c9195a692b1e06aada23be45fc9b8dc27e1acdf86289e33
MD5 be11e5f32492273a833238f87fc977fe
BLAKE2b-256 30e934258425555e1e20ad9ca49cf83655f9470f37889b020b5fb3f3d8d58145

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ad88e45a84651cf3057e08f0169380de0ef18425249af7c3271fc7317570b1e0
MD5 3380046be71f74f372b0dc91f2c86d99
BLAKE2b-256 be5c39b4aea96a948ea6b04c573e491bafcfae5b197485bad9f01462e8b2bd9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 47e167f8be184f0e1dcedb90b92738a193e065a0a440e4174efd82c65cb7d758
MD5 bdf93161e26481e6c3b04426b86bee5e
BLAKE2b-256 ba75d67fb168a02e92926edad449dc665672c208e5e2ae636673fd2b51b291f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 de043f49d5495597d03145d6125dea857bc035fd85bf50c935d49af6c05cfbf4
MD5 daade698f25de3b2d84b4f8eab6ea652
BLAKE2b-256 7ae378430f8915ab676cd4829629a32047d2602de6ed5867250b65bbd28db6a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e1b010df29936316e83ecd300e166af9f5506a19ad44401761e0cbcde7257905
MD5 87b6091a9f270c938c8496fa3d0de80e
BLAKE2b-256 a269925467febaab1b1abd89bab81886ff52c3723af51425a5d7d5b45c0ce18e

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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

File details

Details for the file modbus_tcp_cython-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for modbus_tcp_cython-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4217babec9336b6d237f50b2669fa14ab39c007dd9a3b69f0bfbdc589e20b2f7
MD5 402ebe498d7a1d2fc8d0ee5aa704e26f
BLAKE2b-256 73026cf0e5edac2407eaf3923db3bd658654e12ff9f8e7e5889e68dad3389d77

See more details on using hashes here.

Provenance

The following attestation bundles were made for modbus_tcp_cython-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: wheels.yml on wangzihao223/modbus_tcp

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