Spec¶
The structure of the 835 and the columns of each table. See The spec for the guide.
Spec ¶
The loop structure, element definitions and tables of a file format.
builtin
staticmethod
¶
builtin(version: str = '5010') -> Spec
The built-in 835 spec of version, "5010" (the default) or
"4010"; raises ValueError for any other version.
from_json
staticmethod
¶
from_json(json: str) -> Spec
The spec described by json; raises SpecError with the core message
when it is not valid.
patch ¶
patch(patch: str | dict[str, Any]) -> Spec
A new spec with patch (a dict or JSON text) merged over this one;
raises SpecError when the result is not valid.
schema ¶
schema() -> builtins.dict[builtins.str, pyarrow.Schema]
The schema of every table of the spec, by name, in table order: one
pyarrow.Schema per table, with the column names and Arrow types the
tables of a parse with this spec have. A reference column (such as
claim in services) holds the row of a row in another table, and
its field metadata names that table under the key oxedi.parent.
Needs pyarrow.
SpecError ¶
Bases: ValueError
A spec that cannot be loaded or patched; the message names the rule, the loop and key, and the datum.