Reverse engineered prompt

GitHub

Build me a Python 3.10+ OPC UA toolkit that works as both a client and a server. I want the main API to be async so I can connect to a server, open a session, browse nodes, read and write values, call methods, and create subscriptions for data changes and events, ideally with clean async context manager support.

It should also let me run my own OPC UA server, add and remove nodes, expose methods, support history reads, basic user handling, certificates, and encryption. Please include a simple sync wrapper too, for cases where someone does not want to use async code.

I would also like a few minimal examples for both client and server, plus command line tools for discovering servers, listing nodes, reading, writing, calling methods, subscribing, and starting a demo server. Keep the API friendly for normal use, but still make lower level OPC UA structures available when needed. Good tests and decent docs matter, so please include those as part of the build. Feel free to check current docs online if you need to.

Have a live product UI? Try website reverse