Darra OPC UA Client SDK — Python bindings (六语言对齐 C# 基准, 完全免费)
Project description
darra-opcua
Darra OPC UA Client SDK — Python 绑定。六语言 (C# / C / C++ / Python / Java / Rust) 完全对齐, C# 为接口基准。
- 主页: https://opcua.darra.xyz
- 文档: https://opcua.darra.xyz/docs/sdk/python
- 仓库: https://github.com/DarraTechnology/DarraOpcUaClient
- 反馈: jtl1207@darra.xyz
简介
Darra OPC UA Client 是独立的 OPC UA 客户端 SDK, 通过原生
Darra.OpcUa.Core.dll (随包安装) 提供完整的 OPC UA 1.04 客户端能力:
- 会话管理 / 自动重连
- 节点浏览 / 属性读写
- 订阅与监控项 / 自动重建
- 历史数据访问
- 事件订阅
- 安全 (None / Sign / SignAndEncrypt) + 用户令牌 (Anonymous / UserName / Certificate)
- 服务发现 (Discovery)
不包含 Server 实现 (Darra 的 Server 由 Darra.PLC.Service 提供)。
安装
pip install darra-opcua
当前 Wheel 仅打包 Windows x64 (依赖
Darra.OpcUa.Core.dll)。 Linux / macOS 后续版本提供。
快速示例
from darra_opcua import Session, NodeId, AttributeId
# 1. 连接 OPC UA Server
session = Session.connect("opc.tcp://127.0.0.1:4840")
# 2. 浏览根节点
for r in session.browse(NodeId.numeric(0, 84)):
print(f"{r.browse_name} -> {r.node_id}")
# 3. 读节点值
val = session.read_value(NodeId.string(2, "MyVar"))
print("Value =", val)
# 4. 创建订阅 + 监控项 (1000ms 采样)
sub_id = session.create_subscription(publishing_interval=1000.0)
session.create_monitored_item(sub_id, NodeId.string(2, "MyVar"))
# 5. 关闭
session.close()
更多示例: examples/demo.py
状态
- 当前版本: 0.6.0 (Beta)
- 协议: OPC UA 1.04
- Python: 3.8 - 3.12
- 平台: Windows x64 (主), Linux x64 / macOS 跟进中
- 与 C# / Rust / Java SDK 完全对齐 (相同方法名 / 相同枚举 / 相同行为)
许可证
MIT — 完全免费, 商用闭源亦可. 详见 https://opcua.darra.xyz/docs/faq/licensing
链接
- 完整 API 文档: https://opcua.darra.xyz/docs/sdk/python
- 常见问题: https://opcua.darra.xyz/docs/faq
- 其他语言: C# / C / C++ / Rust / Java
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file darra_opcua-0.6.0.tar.gz.
File metadata
- Download URL: darra_opcua-0.6.0.tar.gz
- Upload date:
- Size: 155.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da338111991b7677387772f9ec61b20adf4168524cdffb8d1cb9221df392a5ec
|
|
| MD5 |
38f3b5ba215c13512f3963921496b8ef
|
|
| BLAKE2b-256 |
db092bcb41eabab0a2aa28270a900cc5705a7906fcdb6a768172c908d63307ce
|
Provenance
The following attestation bundles were made for darra_opcua-0.6.0.tar.gz:
Publisher:
publish-pypi.yml on jtl1207/Darra_OPCUA_Publish
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
darra_opcua-0.6.0.tar.gz -
Subject digest:
da338111991b7677387772f9ec61b20adf4168524cdffb8d1cb9221df392a5ec - Sigstore transparency entry: 1391767534
- Sigstore integration time:
-
Permalink:
jtl1207/Darra_OPCUA_Publish@307d81b3177d74bfd6c9247177360089d74a908f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jtl1207
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@307d81b3177d74bfd6c9247177360089d74a908f -
Trigger Event:
push
-
Statement type:
File details
Details for the file darra_opcua-0.6.0-py3-none-any.whl.
File metadata
- Download URL: darra_opcua-0.6.0-py3-none-any.whl
- Upload date:
- Size: 164.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdda1c1181458fd8d4782cef432ea6fd633d98669a37a9a1263f090fa67ec91b
|
|
| MD5 |
ac9bada6989cb0126802b029747c3a6a
|
|
| BLAKE2b-256 |
37c395ee19241238d8382837e6320dd3b5136cbe094b30dfe98937afd81625af
|