A Python client for EUROCONTROL PRISME / Network Manager (NM)
trajectory and airspace-profile data stored in Oracle.
Read the docs »
·
Report Bug
·
Request Feature
Table of Contents
eurocontrolpy provides an object-oriented Python interface to EUROCONTROL
PRISME / NM data. It ships two interchangeable backends that expose the same
method surface:
| Class | Backend | Returns |
|---|---|---|
EUROCONTROLpy |
SQLAlchemy + python-oracledb | pandas DataFrames |
EUROCONTROLSpark |
PySpark + Oracle JDBC | Spark DataFrames |
Key capabilities:
- Flights —
flights_tidy,adrr_flights_tidy - Airspace profiles —
airspace_profiles_tidy,flights_airspace_profiles_tidy - Point profiles & model trajectories —
point_profiles_tidy,export_model_trajectory - SO6 segment export —
generate_so6 - Airspace geometries —
acc_sf,ansp_sf,es_sf,fir_sf(GeoDataFrames, SQLAlchemy only) - H3 hexagon polyfill —
polyfill_h3(pandas or Spark UDF) - IATA seasons —
season_iata,iata_season_for_date - OurAirports —
airports_oa(no DB required)
Core
Optional
—
EUROCONTROLSparkbackend— airspace geometry methods
— hexagon polyfill
— accurate geodesic distances
- Python ≥ 3.8
- Access to the EUROCONTROL PRISME / NM Oracle database
- Credentials in environment variables:
export PRU_DEV_USR="your_user"
export PRU_DEV_PWD="your_password"
export PRU_DEV_DBNAME="hostname:port/servicename"pip install eurocontrolpyInstall optional extras as needed:
# Airspace geometries
pip install "eurocontrolpy[geo_shapes]"
# H3 polyfill
pip install "eurocontrolpy[h3]"
# PySpark backend
pip install "eurocontrolpy[spark]"
# Everything at once
pip install "eurocontrolpy[geo,geo_shapes,h3,spark]"From source:
git clone https://github.com/eurocontrol/eurocontrolpy.git
cd eurocontrolpy
pip install -e ".[dev]"from eurocontrolpy import EUROCONTROLpy
ec = EUROCONTROLpy() # reads PRU_DEV_* environment variables
# Flight list for one day
flights = ec.flights_tidy("2024-07-01", "2024-07-02")
# Point profiles
traj = ec.point_profiles_tidy("2024-07-01", "2024-07-02", profile="CTFM")
# SO6 segment export
so6 = ec.generate_so6(traj)
# FIR geometries + H3 polyfill at resolution 4
firs = ec.fir_sf(cfmu_airac=517)
h3_df = ec.polyfill_h3(firs, resolution=4)from eurocontrolpy import EUROCONTROLSpark, build_spark_oracle_session
spark, url, props = build_spark_oracle_session(jar_path="jars/ojdbc8.jar")
ec = EUROCONTROLSpark(spark=spark, url=url, props=props)
# All methods are identical — return type is Spark DataFrame instead of pandas
flights = ec.flights_tidy("2024-07-01", "2024-07-02")
flights.show(5)
# H3 polyfill runs as a distributed UDF on Spark workers
from eurocontrolpy import EUROCONTROLpy
ec_py = EUROCONTROLpy()
firs = ec_py.fir_sf(517) # geometry fetched via pandas
spark_h3 = ec.polyfill_h3(firs, resolution=4) # polyfill on Spark
spark_h3.show(5)
spark.stop()Full API reference and more examples: eurocontrol.github.io/eurocontrolpy
- Oracle connection via environment variables
- Flights, airspace profiles and point profile queries
- SO6 segment export
- SQLAlchemy / pandas backend (
EUROCONTROLpy) - ADRR flight list format
- Airspace geometries with geopandas (
acc_sf,ansp_sf,es_sf,fir_sf) - H3 hexagon polyfill (
polyfill_h3) — pandas and Spark UDF variants - IATA season helpers
- Sphinx documentation with GitHub Actions auto-deploy
- Async query execution
See the open issues for proposed features and known issues.
Contributions are welcome. Please fork the repository and open a pull request.
- Fork the project
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push the branch (
git push origin feature/my-feature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for details.
Enrico Spinielli — original concept, R package architecture, data model
Aviation Intelligence Unit · EUROCONTROL
✉ enrico.spinielli@eurocontrol.int
Quinten Goens — Python port, SQLAlchemy backend, H3 polyfill, documentation
Aviation Intelligence Unit · EUROCONTROL
✉ quinten.goens@eurocontrol.int
Project: github.com/eurocontrol/eurocontrolpy
- Performance Review Unit (PRU)
- EUROCONTROL
- The eurocontrol R package from which this library was ported