Skip to main content

Python client for LiRAYS SCADA, backed by the Rust lirays crate

Project description

lirays (Python)

Python client for LiRAYS SCADA powered by the Rust lirays crate.

Features

  • Same high-level API surface as the Rust client.
  • Connect with or without PAT auth.
  • Namespace operations: list, create, delete, metadata edit.
  • Value operations: get/set for integer, float, text, and boolean.
  • Bulk creation from JSON schema.
  • Realtime subscription stream for variable values.
  • Optional insecure TLS mode for local self-signed certificates.

Installation

pip install lirays

Quick Start

from lirays import Client, ConnectionOptions, FloatVar

opts = ConnectionOptions("127.0.0.1", 8245, tls=False, pat_token=None)
client = Client.connect_with_options(opts)

client.create_folders(["demo"], timeout_ms=8000)
client.create_float_variables([FloatVar(name="signal")], parent_id="/demo", timeout_ms=8000)
print(client.get_values(["/demo/signal"], timeout_ms=8000))

client.disconnect()

Self-signed TLS (local/dev only)

from lirays import ConnectionOptions, Client

opts = ConnectionOptions("127.0.0.1", 8245, tls=True, allow_insecure_tls=True)
client = Client.connect_with_options(opts)

Development

python -m pip install --upgrade pip maturin pytest
maturin develop
pytest -q

Demo Scenarios

Demo scripts are under demo/ and mirror the Rust demos:

  • basic
  • bulk
  • subscribe
  • tree_stress
  • data_stress
  • all

Release

Push a tag like v0.1.0 to trigger GitHub Actions publishing to PyPI via Trusted Publishing (OIDC).

License

MIT (LICENSE).

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

lirays-0.1.2.tar.gz (14.9 MB view details)

Uploaded Source

Built Distribution

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

lirays-0.1.2-cp39-abi3-manylinux_2_38_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.38+ x86-64

File details

Details for the file lirays-0.1.2.tar.gz.

File metadata

  • Download URL: lirays-0.1.2.tar.gz
  • Upload date:
  • Size: 14.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lirays-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e97010e59b04a7bab5a5bed51a41d62de45c642e07b72214e2c3cb2567f491ff
MD5 7ddd39a45eefc8d07d6b9e287932d486
BLAKE2b-256 d0666c5af0a4f4e99087ddbdc250e4a2f33303f9fea479c6f784990cb69936af

See more details on using hashes here.

Provenance

The following attestation bundles were made for lirays-0.1.2.tar.gz:

Publisher: release.yml on LiRAYSgj/LiRAYS-SCADA-python

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

File details

Details for the file lirays-0.1.2-cp39-abi3-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for lirays-0.1.2-cp39-abi3-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 988862e1c038528e1e208c5d5dc6f5566af2d67ddcd02feb4974ed44656d8f6c
MD5 8cf1f53db65cf6a880c46345328c6999
BLAKE2b-256 425131749fdad0bf16a048a6f1ff40d202e2bd21df5779fe1e18e58290b90817

See more details on using hashes here.

Provenance

The following attestation bundles were made for lirays-0.1.2-cp39-abi3-manylinux_2_38_x86_64.whl:

Publisher: release.yml on LiRAYSgj/LiRAYS-SCADA-python

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