asyncua
Pure Python OPC-UA client and server library
What it is and what it does
asyncua provides a pure-Python implementation of the OPC UA protocol (IEC 62541) for building industrial automation clients and servers. It offers both high-level APIs for common tasks like connecting to servers, reading/writing node values, and managing subscriptions, as well as low-level access to OPC UA structures. The library is built on asyncio, enabling concurrent operations without explicit threading and reducing the need for locks in multi-operation scenarios.
The package includes a synchronous wrapper for use in non-async code, command-line tools for discovery and node browsing, and extensive test coverage. It supports encryption, certificate-based authentication, history reading, and event subscriptions. The implementation has been tested against multiple OPC UA stacks including Prosys, Kepware, and Beckhoff servers.
Use it for:
- Connect to industrial PLC or SCADA systems to read sensor data and write control commands via OPC UA protocol.
- Build an OPC UA server to expose local data or device state to enterprise monitoring and control systems.
- Create async Python applications that monitor multiple OPC UA nodes concurrently without blocking.
- Integrate manufacturing equipment or building automation systems into Python-based data pipelines.
- Develop command-line tools for OPC UA network discovery, node browsing, and attribute manipulation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
asyncua is an asyncio-based OPC UA client and server library implementing the IEC 62541 standard for industrial automation and control systems communication.
Yes. asyncua is actively maintained, has low install friction, no known vulnerabilities, and fills a genuine need for OPC UA support in Python. The library is mature enough for production use (Beta status, 95%+ test coverage) and offers both high-level convenience and low-level protocol access. The copyleft license is standard for industrial software and poses no barrier to most use cases. Install it if you need to integrate with OPC UA systems or build OPC UA services in Python.
Install
asyncua on PyPI
pip
pip install asyncuauv
uv add asyncuapoetry
poetry add asyncuaInstalling asyncua
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release 46 days ago and 1457 repository stars. Requires Python 3.10 or later and nine runtime dependencies including cryptography and pyopenssl for secure communication.
License in practice
Licensed under GNU Lesser General Public License v3 or later (copyleft). You may use and modify the library freely, but derivative works must be distributed under the same or compatible license terms.
Quickstart
import asyncio
from asyncua import Client
async def main():
async with Client(url='opc.tcp://localhost:4840/freeopcua/server/') as client:
node = client.get_node('i=85')
value = await node.read_value()
print(value)
asyncio.run(main())
Requires Python 3.10 or later and an OPC UA server endpoint to connect to; asyncio and async/await syntax knowledge assumed.
Verify before relying
- Performance characteristics and scalability limits for high-frequency subscriptions or large address spaces.
- Compatibility matrix with specific OPC UA server implementations beyond those mentioned in the description.
- Current state of unimplemented features (WebSocket, XML protocol, automatic reconnection, alarms).
Package facts
| License | GNU Lesser General Public License v3 or later (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — aiosqlite, anyio, cryptography, pyopenssl, python-dateutil, pytz, sortedcontainers, typing-extensions, wait-for2 |
| Maintenance | actively maintained — 46 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 713,641/month — #5,251 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: asyncua-2.0.1-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pyisyPyISY is a Python library for asynchronous…
permissive · top 15,000 on PyPI
homeassistantHome Assistant is an open-source home…
permissive · top 5,000 on PyPI
adafruit-circuitpython-requestsA requests-like HTTP library for CircuitPython…
permissive · top 15,000 on PyPI
aiopulseAsynchronous Python library for controlling…
permissive · top 15,000 on PyPI
pyserial-asyncioAdds async/await support to pyserial for…
permissive · top 15,000 on PyPI
RPi.GPIORPi.GPIO provides Python control over Raspberry…
permissive · top 15,000 on PyPI
async-modbusAsync ModBus provides an asynchronous Python…
unclear · top 15,000 on PyPI
aiounifiAsynchronous Python library for communicating…
permissive · top 15,000 on PyPI
pymodbusPyModbus is a complete Modbus protocol…
permissive · top 5,000 on PyPI
python-hwpxReads, edits, and creates HWPX documents…
permissive · top 15,000 on PyPI