xerparser.model.classes.xer_table
Generic storage for XER tables that have no dedicated model class.
PyP6Xer models the commonly used P6 tables with typed classes. Every other
table in an export (PROJCOST, WBSSTEP, TASKMEMO, …) used to be silently
dropped on read. XerTable/XerTables preserve those records
losslessly — original headers, column order and row values — and expose
them with dict- and attribute-style access, so a parse followed by a
write round-trips any table the library has no typed model for.
Classes
One %R row of a generic table. |
|
All records of one non-modeled XER table, in file order. |
|
Container for every non-modeled table in a file, in first-seen order. |
Module Contents
- class xerparser.model.classes.xer_table.XerRecord(table, headers, values)[source]
One %R row of a generic table.
Supports attribute access (
record.task_id), mapping access (record['task_id']) and.get()— missing columns yieldNoneso older schemas (short rows) never raise.
- class xerparser.model.classes.xer_table.XerTable(name)[source]
All records of one non-modeled XER table, in file order.
Handles files where the same table appears in several blocks with different header sets (each block is preserved separately).
- find_by_id(id)[source]
Best-effort lookup by the table’s own id column.
Uses the header that matches the table name when present (e.g.
wbs_step_idfor WBSSTEP), otherwise the most plausible non-foreign-key*_idcolumn. Returns None when the table has no usable id column (e.g. TASKFDBK) or no record matches.