Skip to main content

o6-ncc

Your OPC UA information model describes the machine. ncc turns that model into code you can build an application around: C source for open62541 and Python namespace packages for o6\Python.

Types, instances, references, custom datatypes: the XML has already done the introductions. Let the compiler handle the repetitive declarations while you write the behavior that makes your application useful. There are better ways to spend an afternoon than copying NodeIds.

From information model to application

Keep the NodeSet as the source of truth for your model. Generate the code, connect it to your SDK, and keep application logic in your own modules. When the model changes, regenerate its output.

# Build the model's address space with open62541.
ncc c MyMachine.NodeSet2.xml -e Opc.Ua.NodeSet2.xml \
    --shortname mymachine -o generated/c

# Generate a namespace package for o6\Python.
ncc python MyMachine.NodeSet2.xml -e ns0 \
    --shortname mymachine -o generated/python

The C output gives your server an initializer to call. The Python output gives your application a namespace package to import and use. Dependencies stay explicit: C generation takes XML paths; Python generation accepts bundled model names or custom XML declarations with package locations.

Make open62541 development flow

  • Generate address spaces: turn one or more NodeSet XML files into C source and headers, with a named server initializer.
  • Bring your custom types: generate C structs and datatype tables from BSD definitions and NodeId CSVs, plus NodeId headers for application code.
  • Generate a complete model: ncc c model coordinates address-space code, datatype tables, and NodeId constants in one command.
  • Put generation in the build: the supplied CMake helper tracks model inputs, regenerates changed outputs, and carries include paths and link dependencies through a model target.

Change the model. Build the project. Get back to the interesting part.

Make o6\Python models feel at home

  • Generate organized packages: reference types, datatypes, variable types, object types, and instances have their own modules.
  • Keep editors in the loop: datatype .pyi stubs provide signatures for completion and static analysis.
  • Carry initial values into code: supported XML values become Python expressions, including nested structures, arrays, enums, unions, and composite OPC UA values.
  • Use companion specifications offline: bundled dependency XML is available through names such as ns0, di, and machinery.
  • Fit your project layout: declare where custom dependency packages belong and generate the corresponding imports.

Work with your model as Python classes: generated object and variable types preserve the model's inheritance and expose child nodes as typed attributes. The structure you designed in the NodeSet is ready to use in application code.

Inspect before you integrate

A reference graph occasionally needs a picture. Occasionally, it needs a very large picture.

# Inspect nodes, namespace URIs, and references as JSON.
ncc inventory MyMachine.NodeSet2.xml -e ns0 -o inventory.json

# Visualize the model with Graphviz.
ncc graphviz MyMachine.NodeSet2.xml -e ns0 -o model.dot

Inventory and Graphviz work independently of the chosen language backend. Graphviz supports DOT output, optional PDF/SVG/PNG rendering, and a selectable root node for focused diagrams. Shell completion covers commands, options, and dependency names in bash, zsh, fish, and PowerShell. cncc and pyncc are also available as shortcuts for ncc c and ncc python.

SDK compatibility

Generated code SDK baseline
C address spaces and datatype tables open62541 1.5 and later
Python namespace packages o6\Python 3.0.0 and later

Neither SDK is needed to generate code. Your application uses the corresponding SDK to compile or run the generated output; the compiler is not an application runtime dependency.

Model features can require SDK configuration—for example, UA_ENABLE_XML_ENCODING in open62541 preserves XML initial values. Consult your SDK's documentation for its configuration and runtime APIs.

SDK documentation

License

Developed by o6-Automation GmbH.

The compiler is licensed under the Mozilla Public License 2.0. Bundled NodeSet XML includes MIT-licensed material and retains its upstream notices.

Metadata

Release files for o6-ncc 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for o6-ncc 2.0.0
File Size Uploaded Provenance Actions
o6_ncc-2.0.0.tar.gz 4.1 MB Without provenance Details for o6_ncc-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for o6-ncc 2.0.0
File Interpreter ABI Platform Actions
o6_ncc-2.0.0-py3-none-any.whl Python 3 none any Details for o6_ncc-2.0.0-py3-none-any.whl

Total release size: 8.0 MB

Release files / o6_ncc-2.0.0.tar.gz

Download URL o6_ncc-2.0.0.tar.gz
Size 4.1 MB
Tags Source
SHA-256 checksum
How to use checksums
dde6cd39da59403c77494d4b72eeaab1b9b6077dd40f3535517251ad4828bc12
BLAKE2b-256 checksum
How to use checksums
8db528050c954406a64dfb85d62c698e70ee4db03007187f162c0cdc94bdd6d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / o6_ncc-2.0.0-py3-none-any.whl

Download URL o6_ncc-2.0.0-py3-none-any.whl
Size 3.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0230f24cc4edbf6417e397c45e42149a2fb4a198bac865d8043d82324723b0d2
BLAKE2b-256 checksum
How to use checksums
4f46921f02d4ca0e5b9e44ba868c4bb5512bf0d1d9c2071f25102e03cb8747a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for o6-ncc 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page