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
| Name | Description |
|---|---|
DMN_NS | No description. |
LAW_NS | No description. |
PKG_REL_NS | No description. |
REL_NS | No description. |
SHEET_NS | No description. |
Classes
| Name | Description |
|---|---|
ImportError_ | No description. |
Functions
| Name | Description |
|---|---|
export_dmn | Canonical A3 table -> deterministic DMN 1.5 profile XML. |
import_csv | CSV -> A3 using a mandatory explicit typed mapping. |
import_dmn | DMN 1.5 decision table -> canonical A3 source + import report. |
import_file | No description. |
import_xlsx | XLSX -> A3 without an office/calculation engine. |
mapping_bool_defaults | No 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
export_dmnfunction#
def export_dmn(source: dict) -> bytesCanonical A3 table -> deterministic DMN 1.5 profile XML.
import_csvfunction#
def import_csv(data: bytes, mapping: dict, uri: str = 'memory:table.csv') -> dictCSV -> A3 using a mandatory explicit typed mapping.
import_dmnfunction#
def import_dmn(data: bytes, uri: str = 'memory:table.dmn') -> dictDMN 1.5 decision table -> canonical A3 source + import report.
import_filefunction#
def import_file(path: Path, mapping: dict | None = None) -> dictimport_xlsxfunction#
def import_xlsx(data: bytes, mapping: dict, uri: str = 'memory:table.xlsx') -> dictXLSX -> 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.