eccodes
Python interface to the ecCodes GRIB and BUFR decoder/encoder
What it is and what it does
eccodes is a Python interface to the ECMWF ecCodes library, which decodes and encodes GRIB and BUFR files—the standard formats for meteorological and oceanographic data. It supports GRIB 1 and 2, BUFR 3 and 4, and works on Linux and macOS with tested support for modern Python versions (3.9–3.14) and PyPy3. The package ships as a pure wheel on PyPI with the ecCodes binary library included, meaning no external compilation is required for installation.
The library offers both low-level and high-level interfaces. The low-level API provides direct access to GRIB and BUFR message fields via key-value lookups, while a newer high-level BUFR interface simplifies common operations. By default, the wheel is twice as slow as a compiled version, but an optional build step using the ecCodes source headers can match native performance. The package uses findlibs to locate system libraries when needed, with environment variables available to control the search path.
Use it for:
- Extract meteorological variables (temperature, pressure, wind) from GRIB forecast or analysis files for weather modeling or analysis workflows.
- Convert between GRIB 1 and GRIB 2 formats, or validate GRIB/BUFR file structure and metadata.
- Decode BUFR observation data from weather stations or satellites for quality control or assimilation into data pipelines.
- Build data ingestion tools that read multiple GRIB/BUFR files and extract specific fields for downstream analysis or visualization.
- Integrate meteorological data processing into scientific Python stacks alongside numpy and other analysis libraries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reads and writes GRIB and BUFR meteorological data files via Python bindings to the ECMWF ecCodes C library.
Yes. The package is actively maintained, has low install friction, carries no security vulnerabilities, and is licensed permissively. Install it if you work with GRIB or BUFR files. The only caveat is Windows support is untested—verify compatibility for your specific Windows environment before relying on it in production.
Install
eccodes on PyPI
pip
pip install eccodesuv
uv add eccodespoetry
poetry add eccodesInstalling eccodes
Before you install
Low friction: pure-wheel installation on PyPI with no compilation required by default. Maintenance is active with a recent release (114 days ago) and ongoing commits. The package depends on numpy, attrs, cffi, and findlibs—all stable, widely-used libraries.
License in practice
Licensed under Apache License Version 2.0, a permissive license that allows commercial and private use with minimal restrictions. No notable licensing constraints for most use cases.
Quickstart
pip install eccodes
import eccodes
# Read a GRIB file
with open('data.grib', 'rb') as f:
msg_id = eccodes.codes_grib_new_from_file(f, eccodes.CODES_PRODUCT_GRIB)
value = eccodes.codes_get(msg_id, 'shortName')
eccodes.codes_release(msg_id)
The ecCodes C library must be available on the system. PyPI wheels include it by default on Linux and macOS (via eccodeslib dependency); on Windows, verify the binary is bundled or set ECCODES_PYTHON_USE_FINDLIBS=1 to use an external installation.
Verify before relying
- Whether Windows support has improved since the description notes it as 'untested'
- Performance characteristics of the pure-wheel vs. compiled modes in practice
- Availability and stability of the eccodeslib dependency on all supported platforms
Package facts
| License | Apache License Version 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — numpy, attrs, cffi, findlibs |
| Maintenance | actively maintained — 114 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,301,211/month — #4,085 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: eccodes-2.47.0-py3-none-any.whl
Keywords: ecCodes, GRIB, BUFR
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
cfgribcfgrib maps GRIB meteorological data files to…
permissive · top 5,000 on PyPI
eccodeslibeccodeslib provides Python bindings to decode…
unclear · top 5,000 on PyPI
pdbufrpdbufr reads BUFR (Binary Universal Form for…
permissive · top 15,000 on PyPI
pygribReads and writes GRIB meteorological data files…
permissive · top 15,000 on PyPI
ecmwf-api-clientPython client for accessing ECMWF's IFS…
permissive · top 15,000 on PyPI
ecmwf-opendataDownloads ECMWF open meteorological data using…
permissive · top 15,000 on PyPI
ecmwf-datastores-clientPython client for the ECMWF Data Stores Service…
permissive · top 15,000 on PyPI
earthkit-meteoComputes meteorological quantities (potential…
permissive · top 15,000 on PyPI
earthkit-dataearthkit-data provides a unified Python…
permissive · top 15,000 on PyPI
pyEDFlibpyEDFlib reads and writes EDF+/BDF+ biomedical…
permissive · top 15,000 on PyPI