Commit ebdeefd3 authored by ORD's avatar ORD

Update README

parent de5cf5ae
Pure Python OPC-UA Client and Server, http://freeopcua.github.io/, https://github.com/FreeOpcUa/python-opcua Pure Python OPC-UA Client and Server
http://freeopcua.github.io/, https://github.com/FreeOpcUa/python-opcua
API is similar to the python bindings of freeopcua c++ client and servers. However there are differences due to a different implementation and to make it more pythonic. API is similar to the python bindings of freeopcua c++ client and servers. It offers both a low level interface to send and receive all UA defined structures and high level classes allowing to write a server or a client in a few lines.
Most code is autogenerated from xml specification using same code as the one that is going to be used for freeopcua C++ client and server. Adding more functionnality shoud be trivial. Most code is autogenerated from xml specification using same code as the one that is used for freeopcua C++ client and server, thus adding missing functionnality to client and server shoud be trivial.
with Python3 the server and client do not require any third party libraries. If using python2.7 or pypy you need to install enum34, trollius(asyncio), and futures(concurrent.futures), with pip for example. Server and client can be run with pypy. Using Python3.4 the server and client do not require any third party libraries. If using python2.7 or pypy you need to install enum34, trollius(asyncio), and futures(concurrent.futures), with pip for example. Server and client can be run with pypy.
coveryage.py reports a test coverage of over 90% of code, most of the rest is autogenerate code that is not used yet.
Client: what works: Client: what works:
...@@ -14,9 +17,11 @@ Client: what works: ...@@ -14,9 +17,11 @@ Client: what works:
* creating subscriptions * creating subscriptions
* subscribing to items for data change * subscribing to items for data change
* adding nodes * adding nodes
* tested servers: freeopcua C++, freeopcua Python, prosys
* method call * method call
Tested servers: freeopcua C++, freeopcua Python, prosys
Client: what is not implemented yet Client: what is not implemented yet
* removing nodes * removing nodes
* subscribing to events * subscribing to events
...@@ -24,23 +29,22 @@ Client: what is not implemented yet ...@@ -24,23 +29,22 @@ Client: what is not implemented yet
* certificate handling * certificate handling
* user and password * user and password
in addition testing against more servers should be done
Server: what works: Server: what works:
* creating channel and sessions * creating channel and sessions
* read/set attributes and browse * read/set attributes and browse
* gettings nodes by path and nodeids * gettings nodes by path and nodeids
* autogenerate addres space from spec * autogenerate addres space from spec
* adding nodes to address space * adding nodes to address space
* tested client: freeopcua C++, freeopcua Python, uaexpert, prosys
* datachange subscriptions * datachange subscriptions
* methods * methods
Tested clients: freeopcua C++, freeopcua Python, uaexpert, prosys, quickopc
Server: what is not implemented Server: what is not implemented
* events * events
* security (users, certificates, etc) * security (users, certificates, etc)
* removing nodes * removing nodes
* adding missing modify methods
Example client code: Example client code:
...@@ -80,17 +84,23 @@ Example server code: ...@@ -80,17 +84,23 @@ Example server code:
from opcua import ua, Server from opcua import ua, Server
server = Server() server = Server()
server.set_endpoint("opc.tcp://localhost:4841/freeopcua/server/") server.set_endpoint("opc.tcp://localhost:4841/freeopcua/server/")
server.set_server_name("FreeOpcUa Example Server") server.set_server_name("FreeOpcUa Example Server")
server.start() uri = "http://examples.freeopcua.github.io"
idx = server.register_namespace(uri)
objects = server.get_objects_node() objects = server.get_objects_node()
myfolder = objects.add_folder(2, "myfolder") myfolder = objects.add_folder(idx, "myfolder")
myvar = myfolder.add_variable(2, "myvar", 6.7) myvar = myfolder.add_variable(idx, "myvar", 6.7)
server.start()
... ...
``` ```
# Development # Development
Code follows PEP8 apart for line lengths and autogenerate class and enums that keep camel case from XML definition.
## Running tests: ## Running tests:
python tests.py python tests.py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment