Python library to parse OAG/IATA MVT flight movement messages
Project description
MVT Parser Library
Python library to parse OAG/IATA MVT (Movement) flight messages.
mvt_parser_lib allows you to read and interpret MVT/MVA/DIV flight movement messages, extract flight details, delays, passenger info, and all relevant expressions defined in the OAG standard.
Features
- Parse MVT, MVA, DIV messages.
- Extract flight identification, scheduled/actual/estimated times.
- Parse delays, passenger counts, reclearance, fuel, weights, and other expressions.
- Handles corrections (COR) and revisions (REV).
- Easy-to-use Python API.
- Ready for unit testing, CI/CD, and PyPI deployment.
Installation
Recommended: use a virtual environment:
# Navigate to project folder
cd mvt_parser_lib
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
# source venv/bin/activate
# Install locally in editable mode
python -m pip install -e .
# For development/testing, install pytest
python -m pip install pytest
Testing
Run the test suite:
python -m pytest tests/
Usage
from mvt_parser import MVTParser
raw_msg = """
MVT
BA100/27.PPVMU.LTN
AD1200/1210 EA1300 CDG
DL72/0015/0020
PX145/12
RC0945 LHR
FLD27
CRT0800
TOF6400
"""
parser = MVTParser()
msg = parser.parse(raw_msg)
# Access parsed data
print(msg.flight_number) # BA100
print(msg.actual_departure) # MovementTime(primary='1200', secondary='1210')
print(msg.passenger_info.total) # 145
Available Parsed Fields
- Flight Info:
flight_number,scheduled_day,aircraft_registration,airport_of_movement - Times:
actual_departure,actual_arrival,estimated_departure,estimated_arrival,estimated_onblock - Delays:
delays(reason codes and durations) - Passenger Info:
passenger_info(total passengers, infants) - Reclearance:
reclearance - Flight Leg / Crew:
flight_leg_date,crew_report_time - Aircraft Weights / Fuel:
takeoff_fuel,takeoff_weight,zero_fuel_weight - Other / Unknown lines:
unknown_lines
Testing
Run unit tests with pytest:
# Make sure virtual environment is activated
pytest tests
Development
- Use
pip install -e .for editable mode while developing. - Run examples in
examples/run_parser.py. - Ensure
.gitignoreexcludes virtual environments, build artifacts, and IDE files.
Contribution
- Fork the repo and create a branch for your feature.
- Write unit tests for any new functionality.
- Submit a pull request with clear description and examples.
License
This project is licensed under the MIT License. See LICENSE for details.
References
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mvt_parser-0.1.0.tar.gz.
File metadata
- Download URL: mvt_parser-0.1.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fcbb0414ed3474506770a2c50f0d522e00d2c6e0a3ba81fabe0cd59f9306ff2
|
|
| MD5 |
708c5c37b8521f1f469779835613c9d3
|
|
| BLAKE2b-256 |
247b149c479b6d89e50010e6bfefe526f2074678399fee6345c8ab33a1485e43
|
Provenance
The following attestation bundles were made for mvt_parser-0.1.0.tar.gz:
Publisher:
publish.yml on noredgaras/mvt_parser_lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mvt_parser-0.1.0.tar.gz -
Subject digest:
2fcbb0414ed3474506770a2c50f0d522e00d2c6e0a3ba81fabe0cd59f9306ff2 - Sigstore transparency entry: 1225039620
- Sigstore integration time:
-
Permalink:
noredgaras/mvt_parser_lib@d50c3e620f116341e02b02a6c4a48b0d0486fa82 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/noredgaras
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d50c3e620f116341e02b02a6c4a48b0d0486fa82 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mvt_parser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mvt_parser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e871c45dfbf1d019cbcf079eb226cd7a27bc96a0d775e30ce6735731adc134f7
|
|
| MD5 |
4e94fa4dd19eb33f981cae769320814c
|
|
| BLAKE2b-256 |
e6998a423e993553b4c3586f4b4173ef6cedf1bc2c168a05030f7524e41d2778
|
Provenance
The following attestation bundles were made for mvt_parser-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on noredgaras/mvt_parser_lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mvt_parser-0.1.0-py3-none-any.whl -
Subject digest:
e871c45dfbf1d019cbcf079eb226cd7a27bc96a0d775e30ce6735731adc134f7 - Sigstore transparency entry: 1225039699
- Sigstore integration time:
-
Permalink:
noredgaras/mvt_parser_lib@d50c3e620f116341e02b02a6c4a48b0d0486fa82 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/noredgaras
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d50c3e620f116341e02b02a6c4a48b0d0486fa82 -
Trigger Event:
release
-
Statement type: