skillfed

asyncua

Pure Python OPC-UA client and server library

asyncua v2.0.1 713.6K downloads/30d#5,251 on PyPI1,457
Copyleft license GNU Lesser General Public License v3 or later Active released

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 asyncua

uv

uv add asyncua

poetry

poetry add asyncua

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Operating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

OPC UA client server libraryasyncio industrial automationIEC 62541 protocol implementationOPC UA async Pythonindustrial IoT communicationSCADA protocol clientmanufacturing device integration
industrial-automationopc-uaasyncio

More Python Modules packages