Skip to content

ncc python quickstart

ncc python MyModel.NodeSet2.xml \
            --shortname mymodel \
            -e ns0 \
            -o ./generated

This compiles MyModel.NodeSet2.xml into the Python package generated/mymodel/, using the bundled standard OPC UA model (ns0) to resolve dependencies. --shortname mymodel sets the package and namespace name. The generated modules contain the model's types and instances; empty categories are omitted.

Use it with o6\Python

import o6
from generated import mymodel

The generated package runs with a compatible o6\Python runtime; ncc is only needed for generation. Model imports and server configuration are covered in the o6\Python documentation.

Keep handwritten code outside generated/mymodel/: regeneration overwrites generated files and removes additional .py and .pyi files in that directory.

See dependencies and naming, the command reference, or generated packages for details.