Skip to main content

Python client for LiRAYS-SCADA, backed by the local Rust implementation

Project description

lirays Python client

Python client for LiRAYS-SCADA that wraps the local Rust client implementation from clients/rust-client.

Design

  • Rust extension built with PyO3.
  • Local path dependency on ../rust-client (does not pull the client from crates.io).
  • Blocking Python API for ergonomic usage while Rust runs async internally.
  • Includes .pyi stubs and py.typed for typing support.

Build and install (dev)

cd clients/python-client
maturin develop

Build wheel

cd clients/python-client
maturin build --release

Quick usage

from lirays import Client, FloatVar

client = Client.connect("127.0.0.1", 8245, tls=False)
client.create_folders(["demo_py"], timeout_ms=8000)
client.create_float_variables([FloatVar(name="signal")], parent_id="/demo_py", timeout_ms=8000)
values = client.get_values(["/demo_py/signal"], timeout_ms=8000)
print(values)
client.disconnect()

API surface

Exposed classes:

  • Client
  • ConnectionOptions
  • IntegerVar
  • FloatVar
  • TextVar
  • BooleanVar
  • VariableMetadataPatch
  • FolderInfo
  • VarInfo
  • Subscription

Demo scripts

See clients/python-client/demo/README.md for demo scenarios and CLI options.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

lirays-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file lirays-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lirays-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f356e00544ccfbab47c33eb4c04d77343fe376db70e7b2050526806355f7e3dd
MD5 b015636e2715503ed7e98479a04a34e2
BLAKE2b-256 e049ed3359c50907657bc69e9901c7fe6a7b530b4b3074b3cd658bb2e33a82f6

See more details on using hashes here.

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