pyxsd.batch¶
Sequential parsing of explicitly identified local XML files.
Records are frozen, but a contained Document remains mutable.
Exceptions¶
First failed input in raise mode; inspect |
Classes¶
Caller label and local path, anchored when constructed. |
|
Expected input failure, without a live exception or traceback. |
|
One input's result with a snapshot of its validation issues. |
Functions¶
|
Parse in caller order, lazily, without retaining earlier outcomes. |
Module Contents¶
- class pyxsd.batch.DocumentSource¶
Caller label and local path, anchored when constructed.
- path: str | os.PathLike[str]¶
- class pyxsd.batch.InputFailure¶
Expected input failure, without a live exception or traceback.
- kind: Literal['io', 'malformed_xml']¶
- class pyxsd.batch.ParseOutcome¶
One input’s result with a snapshot of its validation issues.
- source: DocumentSource¶
- status: Literal['valid', 'invalid', 'input_error']¶
- document: pyxsd.document.Document | None¶
- issues: tuple[pyxsd.validation.ValidationIssue, ...]¶
- error: InputFailure | None¶
- exception pyxsd.batch.BatchParseError(outcome)¶
First failed input in raise mode; inspect
outcome.- Parameters:
outcome (ParseOutcome)
- outcome¶
- pyxsd.batch.iter_parse(schema, sources, *, errors='raise')¶
Parse in caller order, lazily, without retaining earlier outcomes.
Configuration and schema checks run on first iteration. Expected input failures stop with BatchParseError by default; report mode yields them. Do not parse concurrently or reentrantly on this Schema.
- Parameters:
schema (pyxsd.schema.Schema)
sources (collections.abc.Iterable[DocumentSource])
errors (Literal['raise', 'report'])
- Return type: