Passed
Pull Request — master (#372)
by
unknown
02:33
created

client-file   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A read_file() 0 8 2
1
import asyncio
2
from asyncua import Client
3
4
async def read_file():
5
    """ read file example """
6
7
    url = "opc.tcp://10.0.0.199:4840"
8
    async with Client(url=url) as client:
9
        node = client.get_node("ns=2;s=NameOfNode")
10
        contents = await client.read_file(node)
11
        print(contents)
12
13
asyncio.run(read_file())
14