Pure Python parser for Microsoft Project files (MPP/XML) with JSON export.
No Java required - directly parses the binary MPP format using olefile.
pip install olefile# Parse MPP file to JSON
python src/msp_export.py project.mpp output.json
# Parse with pretty printing
python src/msp_export.py project.mpp output.json --pretty
# Parse MS Project XML format
python src/msp_export.py project.xml output.json- Binary MPP Parsing: Reads MPP14+ files (MS Project 2010 and later)
- XML Support: Full MS Project XML format support
- JSON Export: Structured output with tasks, resources, assignments, and more
| Entity | Fields |
|---|---|
| Tasks | Name, ID, dates, duration, work, hierarchy, priority, constraints |
| Resources | Name, type (Work/Material/Cost), rates |
| Assignments | Task-resource links, work hours, allocation units |
| Predecessors | Link types (FS, SS, FF, SF), lag |
| Calendars | Working days, exceptions (holidays) |
| Agile | Board columns, sprints |
from src.mpp_reader import MPPReader
reader = MPPReader("project.mpp")
project = reader.read()
print(f"Project: {project.title}")
print(f"Tasks: {len(project.tasks)}")
print(f"Resources: {len(project.resources)}")
# Get resource totals
totals = project.get_resource_totals()
for name, hours in sorted(totals.items(), key=lambda x: -x[1]):
print(f" {name}: {hours:.1f}h"){
"project": {
"title": "Downtown Bank",
"start_date": "2025-01-06T00:00:00",
"finish_date": "2025-03-15T00:00:00"
},
"summary": {
"task_count": 50,
"resource_count": 10,
"total_hours": 1500.0
},
"tasks": [...],
"resources": [...],
"assignments": [...],
"predecessors": [...],
"resource_totals": {"Civil Foreman": 500.0, ...}
}| Format | Extension | Support |
|---|---|---|
| MPP Binary | .mpp, .mpt |
MPP14+ (Project 2010+) |
| MS Project XML | .xml |
Full support |
- MPP files older than Project 2010 may not parse correctly
- Time-phased data (daily work breakdown) not extracted from binary format
- No write support (read-only)
- Pattern Discovery - Reverse-engineering methodology
- Field Mapping - Binary offset documentation
- Project Status - Implementation status
MIT