Skip to content

lawref.a3_io

Safe import/export adapters for A3 decision tables.

These adapters do not decide anything. They only translate DMN/CSV/XLSX into the canonical law.decision/0.1 JSON surface and then hand it to a3. Spreadsheet formulas are rejected before any cell value is inspected.

Attributes

NameDescription
DMN_NSNo description.
LAW_NSNo description.
PKG_REL_NSNo description.
REL_NSNo description.
SHEET_NSNo description.

Classes

NameDescription
ImportError_No description.

Functions

NameDescription
export_dmnCanonical A3 table -> deterministic DMN 1.5 profile XML.
import_csvCSV -> A3 using a mandatory explicit typed mapping.
import_dmnDMN 1.5 decision table -> canonical A3 source + import report.
import_fileNo description.
import_xlsxXLSX -> A3 without an office/calculation engine.
mapping_bool_defaultsNo description.

DMN_NSattributemodule attribute#

DMN_NS = 'https://www.omg.org/spec/DMN/20230324/MODEL/'

LAW_NSattributemodule attribute#

LAW_NS = 'urn:law-dsl:a3:dmn:0.1'

PKG_REL_NSattributemodule attribute#

PKG_REL_NS = 'http://schemas.openxmlformats.org/package/2006/relationships'

REL_NSattributemodule attribute#

REL_NS = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'

SHEET_NSattributemodule attribute#

SHEET_NS = 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'

ImportError_class#

class ImportError_(code: str, message: str, diagnostics: list[dict] | None = None)

Bases: ValueError

codeattributeinstance attribute#

code = code

diagnosticsattributeinstance attribute#

diagnostics = diagnostics or []

messageattributeinstance attribute#

message = message

export_dmnfunction#

def export_dmn(source: dict) -> bytes

Canonical A3 table -> deterministic DMN 1.5 profile XML.

import_csvfunction#

def import_csv(data: bytes, mapping: dict, uri: str = 'memory:table.csv') -> dict

CSV -> A3 using a mandatory explicit typed mapping.

import_dmnfunction#

def import_dmn(data: bytes, uri: str = 'memory:table.dmn') -> dict

DMN 1.5 decision table -> canonical A3 source + import report.

import_filefunction#

def import_file(path: Path, mapping: dict | None = None) -> dict

import_xlsxfunction#

def import_xlsx(data: bytes, mapping: dict, uri: str = 'memory:table.xlsx') -> dict

XLSX -> A3 without an office/calculation engine.

Every worksheet is scanned for <f> first. A cached <v> beside it cannot make the workbook acceptable.

mapping_bool_defaultsfunction#

def mapping_bool_defaults() -> dict[str, bool]

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.