Skip to main content

Model-driven OPC UA servers in pure Python — one Design file, a complete server. Compatible with the quasar framework.

Project description

kilonova

CI PyPI docs

What is this?

Describe your device once in a declarative XML model and kilonova serves it as a complete, standards-compliant OPC UA server — in pure Python, with no code generation, no compiler and no build step. kilonova is fully compatible with Design files from the quasar framework: it produces the same address space (same ns=2 string NodeIds, same dotted parent.child addressing), so quasar ecosystem tools — Cacophony/WinCC OA address generation, UaoForQuasar clients, plain OPC UA clients — work against it unmodified.

Built for the jobs where a server must exist now: device simulators, test rigs, FAT/SAT stand-ins, CI test doubles, edge gateways for network-attached hardware, and reference implementations while the C++ server is still being written.

A kilonova is the luminous flash of a neutron-star merger — a lighter, faster transient in the nova family. This kilonova is the pure-Python engine of the quasarnova family: successor of MilkyWay (the 2021 pure-Python prototype), rebuilt from scratch on asyncua 2.x.

Basic usage mode

  1. Install (Python ≥ 3.10): pip install kilonova
  2. Run your existing quasar server's design, unchanged: kilonova run --design Design/Design.xml --config bin/config.xml
  3. Point any OPC UA client at opc.tcp://host:4841 — the address space is quasar's.
  4. Dump a running server's address space (uasak_dump-style NodeSet2): kilonova dump --endpoint opc.tcp://127.0.0.1:4841 --output dump.xml

Device logic is plain Python (see doc/DeviceLogic.md):

from kilonova import Server

server = Server("Design.xml", config_path="config.xml")

@server.read("sca1.adc")                 # source variable: runs inside the client read
async def read_adc(obj):
    return await hardware.read_adc()

@server.read("sca1.temperature")         # plain def: kilonova runs it in its thread
def read_temperature(obj):               # pool, so blocking drivers cannot stall
    return driver.read_temperature()     # the server

@server.method("sca1.reset")             # method handler
async def reset(obj):
    await obj.setOnline(0)               # generated setter, quasar naming

async with server:
    ...

What works

All 12 cases of the upstream quasar framework's own public CI test suite pass against the reference nodesets (cache/source/calculated variables, methods incl. arguments, config entries and restrictions, singleVariableNode, design/config instantiation, StandardMetaData) — checked on every commit on Linux/macOS/Windows, Python 3.10–3.14, and re-run nightly against upstream master. Beyond the suite, kilonova was probed against live C++ servers built from real production designs on both C++ backends: two designs at full structural parity, a third surfacing genuine cross-backend differences (kilonova sides with one backend on each). Details: doc/Parity.md.

Limitations

  • Device logic is registered per address at runtime — there is no generated D<Class> skeleton (that is the point).
  • Design-mandated children are instantiated unconditionally; C++ device logic may create some conditionally.
  • Security: user/password logon and Basic256Sha256 policies via ServerConfig.xml; client-certificate trust lists are not supported yet.
  • Values live in asyncua's address space; extreme write rates were not a design goal.

Documentation

Heritage

quasarnova builds on the lineage of the open-source quasar framework, developed at CERN and running large-scale control systems for more than a decade. quasarnova is an independent project and is not affiliated with or endorsed by CERN. The Design-driven approach and the MilkyWay prototype are due to the upstream quasar project and its authors (Piotr Nikiel and the quasar team).

Interface stability

From 1.0.0, kilonova follows semantic versioning. The public API is kilonova.Server (constructor arguments, objects, the method/read/write decorators, offload), kilonova.Design, QuasarObject (set_cv/get_cv/generated setters) and the exceptions in kilonova.errors. Anything imported from other modules is internal. Breaking changes get a deprecation release first.

Contact: GitHub Issues · Discussions

License: BSD-2-Clause. © the quasarnova team.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kilonova-1.1.0.tar.gz (69.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kilonova-1.1.0-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file kilonova-1.1.0.tar.gz.

File metadata

  • Download URL: kilonova-1.1.0.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kilonova-1.1.0.tar.gz
Algorithm Hash digest
SHA256 86781369d7e420e7b709c4ea347277b4c8db2e0bac7e4958b499a17f2dabcbe2
MD5 a310a113da8f3ed3a08752afa9563846
BLAKE2b-256 a369a8d74df67f24f3ea304394d347a23ebc5104cd6b25831add74a51f7da8b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for kilonova-1.1.0.tar.gz:

Publisher: release.yml on quasarnova-team/kilonova

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kilonova-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: kilonova-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kilonova-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a95ec35b5cacaa5df46f648a4f24462db4eef0e31013fd3ec6896d01006e33cf
MD5 31e243f23d65a62ca3035ffeee22067a
BLAKE2b-256 6907dcc2a59381d11c796b445acc6642f313cbd9a6c9528f209e1cd9074af10e

See more details on using hashes here.

Provenance

The following attestation bundles were made for kilonova-1.1.0-py3-none-any.whl:

Publisher: release.yml on quasarnova-team/kilonova

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page