xerparser
Submodules
Attributes
Classes
This class is a collection of tasks that controls functionalities to search, add, update and delete tasks |
|
Collection of TASKPRED relationship records. |
|
Collection of RSRCCURV resource-curve definition rows. |
|
All records of one non-modeled XER table, in file order. |
|
Container for every non-modeled table in a file, in first-seen order. |
|
One %R row of a generic table. |
|
A resource curve definition (RSRCCURV table). |
|
Package Contents
- xerparser.__description__ = 'Python library for parsing and manipulating Primavera P6 XER files'[source]
- class xerparser.Calendar(params)[source]
- obj_list = []
- clndr_id
- default_flag
- clndr_name
- proj_id
- base_clndr_id
- last_chng_date
- clndr_type
- day_hr_cnt
- week_hr_cnt
- month_hr_cnt
- year_hr_cnt
- rsrc_private
- clndr_data
- working_days
- exceptions = []
- class xerparser.ActivityCode(params)[source]
- obj_list = []
- actv_code_id
- parent_actv_code_id
- actv_code_type_id
- actv_code_name
- short_name
- seq_num
- color
- total_assignments = 0
- property type
- class xerparser.ActType(params)[source]
- obj_list = []
- actv_code_type_id
- actv_short_len
- seq_num
- actv_code_type
- proj_id
- wbs_id
- actv_code_type_scope
- super_flag
- class xerparser.OBS(params)[source]
- obj_list = []
- obs_id
- parent_obs_id
- guid
- seq_num
- obs_name
- obs_descr
- class xerparser.Project(params, data)[source]
- proj_id
- fy_start_month_num
- rsrc_self_add_flag
- allow_complete_flag
- rsrc_multi_assign_flag
- checkout_flag
- project_flag
- step_complete_flag
- cost_qty_recalc_flag
- batch_sum_flag
- name_sep_char
- def_complete_pct_type
- proj_short_name
- acct_id
- orig_proj_id
- source_proj_id
- base_type_id
- clndr_id
- sum_base_proj_id
- task_code_base
- task_code_step
- priority_num
- wbs_max_sum_level
- strgy_priority_num
- last_checksum
- critical_drtn_hr_cnt
- def_cost_per_qty
- last_recalc_date
- plan_start_date
- plan_end_date
- scd_end_date
- last_tasksum_date
- fcst_start_date
- def_duration_type
- task_code_prefix
- guid
- def_qty_type
- add_by_name
- web_local_root_path
- proj_url
- def_rate_type
- add_act_remain_flag
- act_this_per_link_flag
- def_task_type
- act_pct_link_flag
- critical_path_type
- task_code_prefix_flag
- def_rollup_dates_flag
- use_project_baseline_flag
- rem_target_link_flag
- reset_planned_flag
- allow_neg_act_flag
- sum_assign_level
- last_fin_dates_id
- last_baseline_update_date
- cr_external_key
- apply_actuals_date
- location_id
- loaded_scope_level
- export_flag
- new_fin_dates_id
- baselines_to_export
- baseline_names_to_export
- next_data_date
- close_period_flag
- sum_refresh_date
- trsrcsum_loaded
- fintmpl_id
- sumtask_loaded
- data
- checkout_date
- checkout_user_id
- chng_eff_cmp_pct_flag
- control_updates_flag
- hist_interval
- hist_level
- intg_proj_type
- last_level_date
- last_schedule_date
- msp_managed_flag
- px_enable_publication_flag
- px_last_update_date
- px_priority
- risk_level
- sum_data_date
- sum_only_flag
- ts_rsrc_vs_inact_actv_flag
- property id
- property activities
- property wbss
- class xerparser.RCatType(params)[source]
- obj_list = []
- rsrc_catg_type_id
- seq_num
- rsrc_catg_short_len
- rsrc_catg_type
- super_flag
- class xerparser.RCatVal(params)[source]
- obj_list = []
- rsrc_catg_id
- rsrc_catg_type_id
- rsrc_catg_short_name
- rsrc_catg_name
- parent_rsrc_catg_id
- seq_num
- class xerparser.Resource(params)[source]
- obj_list = []
- rsrc_id
- parent_rsrc_id
- clndr_id
- role_id
- shift_id
- user_id
- pobs_id
- guid
- rsrc_seq_num
- email_addr
- employee_code
- office_phone
- other_phone
- rsrc_name
- rsrc_short_name
- rsrc_title_name
- def_qty_per_hr
- cost_qty_type
- ot_factor
- active_flag
- auto_compute_act_flag
- def_cost_qty_link_flag
- ot_flag
- curr_id
- unit_id
- rsrc_type
- location_id
- rsrc_notes
- load_tasks_flag
- level_flag
- last_checksum
- timesheet_flag
- ts_approve_user_id
- xfer_complete_day_cnt
- xfer_notstart_day_cnt
- property parent
- class xerparser.ResourceRate(params)[source]
- obj_list = []
- rsrc_rate_id
- rsrc_id
- max_qty_per_hr
- cost_per_qty
- start_date
- shift_period_id
- cost_per_qty2
- cost_per_qty3
- cost_per_qty4
- cost_per_qty5
- class xerparser.ResourceCat(params)[source]
- obj_list = []
- rsrc_id
- rsrc_catg_type_id
- rsrc_catg_id
- class xerparser.SchedOption(params)[source]
- obj_list = []
- schedoptions_id
- proj_id
- sched_outer_depend_type
- sched_open_critical_flag
- sched_lag_early_start_flag
- sched_retained_logic
- sched_setplantoforecast
- sched_float_type
- sched_calendar_on_relationship_lag
- sched_use_expect_end_flag
- sched_progress_override
- level_float_thrs_cnt
- level_outer_assign_flag
- level_outer_assign_priority
- level_over_alloc_pct
- level_within_float_flag
- level_keep_sched_date_flag
- level_all_rsrc_flag
- sched_use_project_end_date_for_float
- enable_multiple_longest_path_calc
- limit_multiple_longest_path_calc
- max_multiple_longest_path
- use_total_float_multiple_longest_paths
- key_activity_for_multiple_longest_paths
- LevelPriorityList
- class xerparser.Task(params, data)[source]
- obj_list = []
- task_id
- proj_id
- wbs_id
- clndr_id
- phys_complete_pct
- rev_fdbk_flag
- est_wt
- lock_plan_flag
- auto_compute_act_flag
- complete_pct_type
- task_type
- duration_type
- status_code
- task_code
- task_name
- rsrc_id
- total_float_hr_cnt
- free_float_hr_cnt
- remain_drtn_hr_cnt
- act_work_qty
- remain_work_qty
- target_work_qty
- target_drtn_hr_cnt
- target_equip_qty
- act_equip_qty
- remain_equip_qty
- cstr_date
- act_start_date
- act_end_date
- late_start_date
- late_end_date
- expect_end_date
- early_start_date
- early_end_date
- restart_date
- reend_date
- target_start_date
- target_end_date
- rem_late_start_date
- rem_late_end_date
- cstr_type
- priority_type
- suspend_date
- resume_date
- float_path
- float_path_order
- guid
- tmpl_guid
- cstr_date2
- cstr_type2
- driving_path_flag
- act_this_per_work_qty
- act_this_per_equip_qty
- create_user
- update_user
- location_id
- calendar
- data
- review_end_date
- review_type
- property id
- property totalint
- property resources
- property steps
- property activitycodes
- property duration
- property constraints
- property start_date
- property end_date
- property successors
- property predecessors
- class xerparser.TaskActv(params, data)[source]
- obj_list = []
- task_id
- actv_code_type_id
- actv_code_id
- proj_id
- data
- class xerparser.TaskPred(params)[source]
- obj_list = []
- task_pred_id
- task_id
- pred_task_id
- proj_id
- pred_proj_id
- pred_type
- lag_hr_cnt
- float_path
- aref
- arls
- comments
- classmethod create(task_id, pred_task_id, pred_type='PR_FS', lag_hr_cnt=None, proj_id=None, pred_proj_id=None, comments=None, task_pred_id=None)[source]
Build a new TaskPred from typed values (editing API).
Values are normalized the same way the reader normalizes parsed rows, so a created record writes back identically to a read one.
- class xerparser.UDFType(params)[source]
- udf_type_id = None
- table_name = None
- udf_type_name = None
- udf_type_label = None
- logical_data_type = None
- super_flag = None
- indicator_expression = None
- summary_indicator_expression = None
- export_flag
- class xerparser.UDFValue(params)[source]
- udf_code_id = None
- udf_type_id = None
- fk_id = None
- proj_id = None
- udf_number = None
- udf_text = None
- udf_date
- class xerparser.WBS(params, data=None)[source]
- obj_list = []
- wbs_id
- proj_id
- obs_id
- seq_num
- est_wt
- proj_node_flag
- sum_data_flag
- status_code
- wbs_short_name
- wbs_name
- phase_id
- parent_wbs_id
- ev_user_pct
- ev_etc_user_value
- orig_cost
- indep_remain_total_cost
- ann_dscnt_rate_pct
- dscnt_period_type
- indep_remain_work_qty
- anticip_start_date
- anticip_end_date
- ev_compute_type
- ev_etc_compute_type
- guid
- tmpl_guid
- plan_open_state
- data = None
- status_reviewer
- property activities
- class xerparser.Currency(params)[source]
- obj_list = []
- curr_id
- decimal_digit_cnt
- curr_symbol
- decimal_symbol
- digit_group_symbol
- pos_curr_fmt_type
- neg_curr_fmt_type
- curr_type
- curr_short_name
- group_digit_cnt
- base_exch_rate
- class xerparser.TaskRsrc(params, data=None)[source]
- taskrsrc_id
- task_id
- proj_id
- cost_qty_link_flag
- role_id
- acct_id
- rsrc_id
- pobs_id
- skill_level
- remain_qty
- target_qty
- remain_qty_per_hr
- target_lag_drtn_hr_cnt
- target_qty_per_hr
- act_ot_qty
- act_reg_qty
- relag_drtn_hr_cnt
- ot_factor
- cost_per_qty
- target_cost
- act_reg_cost
- act_ot_cost
- remain_cost
- act_start_date
- act_end_date
- restart_date
- reend_date
- target_start_date
- target_end_date
- rem_late_start_date
- rem_late_end_date
- rollup_dates_flag
- target_crv
- remain_crv
- actual_crv
- ts_pend_act_end_flag
- guid
- rate_type
- act_this_per_cost
- act_this_per_qty
- curv_id
- rsrc_type
- cost_per_qty_source_type
- create_user
- create_date
- cbs_id
- has_rsrchours
- taskrsrc_sum_id
- data = None
- pend_act_ot_qty
- pend_act_reg_qty
- pend_complete_pct
- pend_remain_qty
- prior_ts_act_of_qty
- prior_ts_act_reg_qty
- property resource
- class xerparser.Role(params)[source]
- obj_list = []
- role_id
- parent_role_id
- seq_num
- role_name
- role_short_name
- pobs_id
- def_cost_qty_link_flag
- cost_qty_type
- role_descr
- last_checksum
- class xerparser.Account(params)[source]
- acct_id
- parent_acct_id
- acct_seq_num
- acct_name
- acct_short_name
- acct_descr
- class xerparser.RoleRate(params)[source]
- obj_list = []
- role_rate_id
- role_id
- cost_per_qty
- cost_per_qty2
- cost_per_qty3
- cost_per_qty4
- cost_per_qty5
- class xerparser.PCatType(params)[source]
- obj_list = []
- proj_catg_type_id
- seq_num
- proj_catg_short_len
- proj_catg_type
- export_flag
- max_proj_catg_wt
- proj_catg_type_wt
- super_flag
- class xerparser.PCatVal(params)[source]
- proj_catg_id
- proj_catg_type_id
- seq_num
- proj_catg_short_name
- parent_proj_catg_id
- proj_catg_name
- proj_catg_wt
- class xerparser.TaskProc(params)[source]
- complete_flag
- complete_pct
- proc_descr
- proc_id
- proc_name
- proc_wt
- proj_id
- seq_num
- task_id
- class xerparser.Tasks[source]
This class is a collection of tasks that controls functionalities to search, add, update and delete tasks
- index = 0
- data = None
- property activities: List[xerparser.model.classes.task.Task]
- property count
- property has_no_successor
- property has_no_predecessor
- property constraints
- class xerparser.Predecessors[source]
Collection of TASKPRED relationship records.
Editing API:
add_relationship(),remove_relationship()andreplace_relationship()modify the collection in place; a subsequentwriteXERwrites the edited relationships back.- PRED_TYPES = ('PR_FS', 'PR_SS', 'PR_FF', 'PR_SF')
- index = 0
- task_pred = []
- find_by_id(code_id) xerparser.model.classes.taskpred.TaskPred[source]
- add_relationship(task_id, pred_task_id, pred_type='PR_FS', lag_hr_cnt=None, comments=None, proj_id=None, pred_proj_id=None, tasks=None)[source]
Add a relationship and return the new TaskPred.
- Parameters:
task_id – id of the successor activity.
pred_task_id – id of the predecessor activity.
pred_type – one of PR_FS, PR_SS, PR_FF, PR_SF (default PR_FS).
lag_hr_cnt – lag in hours; negative for leads. Optional.
comments – optional comment text.
proj_id – project of the successor; derived from the task when a Tasks collection is available (the Reader wires one).
pred_proj_id – project of the predecessor. Defaults to
proj_id; set it explicitly for cross-project links.tasks – Tasks collection used for validation/project lookup. Optional when the Reader wired one automatically.
- Returns:
The appended TaskPred relationship.
- Raises:
ValueError – on an unknown pred_type, non-numeric lag, unknown task, duplicate relationship, or missing project context.
- remove_relationship(rel)[source]
Remove a relationship (TaskPred instance or task_pred_id).
- Raises:
ValueError – if the relationship is not in this collection.
- replace_relationship(rel, task_id=None, pred_task_id=None, pred_type=None, lag_hr_cnt=None, comments=None, tasks=None)[source]
Atomically re-route a relationship.
Builds the replacement first (so validation failures leave the collection untouched), then swaps it for
rel(TaskPred instance or task_pred_id). Unspecified fields are inherited from the old relationship.
- property relations: List[xerparser.model.classes.taskpred.TaskPred]
- property leads
- property finish_to_start: List[xerparser.model.classes.taskpred.TaskPred]
- get_successors(act_id) List[xerparser.model.classes.taskpred.TaskPred][source]
- get_predecessors(act_id) List[xerparser.model.classes.taskpred.TaskPred][source]
- class xerparser.Projects[source]
- index = 0
- find_by_id(id) xerparser.model.classes.project.Project[source]
- class xerparser.WBSs(data=None)[source]
- index = 0
- data = None
- get_by_project(id) List[xerparser.model.classes.wbs.WBS][source]
- __next__() xerparser.model.classes.wbs.WBS[source]
- class xerparser.Resources[source]
- index = 0
- get_resource_by_id(id) xerparser.model.classes.rsrc.Resource[source]
- get_parent(id) xerparser.model.classes.rsrc.Resource[source]
- class xerparser.ActivityCodes[source]
- index = 0
- find_by_id(id) xerparser.model.classes.activitycode.ActivityCode[source]
- class xerparser.ActTypes[source]
- index = 0
- find_by_id(id) xerparser.model.classes.acttype.ActType[source]
- class xerparser.Calendars[source]
- index = 0
- find_by_id(id) xerparser.model.classes.calendar.Calendar[source]
- class xerparser.Currencies[source]
- index = 0
- find_by_id(id) xerparser.model.classes.currency.Currency[source]
- property count
- class xerparser.OBSs[source]
- index = 0
- find_by_id(id) xerparser.model.classes.obs.OBS[source]
- property count
- __next__() xerparser.model.classes.obs.OBS[source]
- class xerparser.RCatTypes[source]
- index = 0
- find_by_id(id) xerparser.model.classes.rcattype.RCatType[source]
- property count
- class xerparser.RCatVals[source]
- index = 0
- find_by_id(id) xerparser.model.classes.rcatval.RCatVal[source]
- property count
- class xerparser.RoleRates[source]
- index = 0
- find_by_id(id) xerparser.model.classes.rolerate.RoleRate[source]
- property count
- class xerparser.Roles[source]
- index = 0
- find_by_id(id) xerparser.model.classes.role.Role[source]
- property count
- __next__() xerparser.model.classes.role.Role[source]
- class xerparser.ResourceCurves[source]
- index = 0
- find_by_id(id) xerparser.model.classes.rsrccurv.ResourceCurve[source]
- property count
- class xerparser.RsrcCurves[source]
Collection of RSRCCURV resource-curve definition rows.
- index = 0
- property count
- class xerparser.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).
- name
- property headers
- property records
- property raw_rows
- 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.
- class xerparser.XerTables[source]
Container for every non-modeled table in a file, in first-seen order.
- property table_names
- class xerparser.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.RsrcCurv(params)[source]
A resource curve definition (RSRCCURV table).
The percentage usage data for a curve lives in RSRCCURVDATA rows that reference the curve by curv_id (see xerparser.model.rsrccurves).
- obj_list = []
- curv_data
- curv_id
- curv_name
- default_flag
- class xerparser.ResourceRates[source]
- index = 0
- find_by_id(id) xerparser.model.classes.rsrcrate.ResourceRate[source]
- property count
- class xerparser.ResourceCategories[source]
- index = 0
- find_by_id(id) xerparser.model.classes.rsrcrcat.ResourceCat[source]
- property count
- class xerparser.SchedOptions[source]
- index = 0
- find_by_id(id) xerparser.model.classes.schedoption.SchedOption[source]
- property count
- class xerparser.ActivityResources[source]
- index = 0
- find_by_id(id) xerparser.model.classes.taskrsrc.TaskRsrc[source]
- find_by_rsrc_id(id) xerparser.model.classes.taskrsrc.TaskRsrc[source]
- property count
- class xerparser.UDFValues[source]
- index = 0
- find_by_id(id) xerparser.model.classes.udfvalue.UDFValue[source]
- property count
- class xerparser.UDFTypes[source]
- index = 0
- find_by_id(id) xerparser.model.classes.udftype.UDFType[source]
- property count
- class xerparser.TaskActvs[source]
- index = 0
- find_by_code_id(id) xerparser.model.classes.taskactv.TaskActv[source]
- find_by_activity_id(id) xerparser.model.classes.taskactv.TaskActv[source]
- class xerparser.PCatTypes[source]
- index = 0
- find_by_id(id) xerparser.model.classes.pcattype.PCatType[source]
- class xerparser.PCatVals[source]
- index = 0
- find_by_id(id) xerparser.model.classes.pcatval.PCatVal[source]
- property count
- class xerparser.TaskProcs[source]
- index = 0
- find_by_id(id) xerparser.model.classes.taskproc.TaskProc[source]
- property count