skillfed

eccodes

Python interface to the ecCodes GRIB and BUFR decoder/encoder

eccodes v2.47.0 1.3M downloads/30d#4,085 on PyPI137
Permissive license Apache License Version 2.0 Active released

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 eccodes

uv

uv add eccodes

poetry

poetry add eccodes

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

grib file reader pythonbufr decoder encodermeteorological data formatecCodes python bindingsweather data file processinggrib 1 grib 2 supportbufr 3 bufr 4 files
meteorological-datagrib-bufrscientific-computing

More Information Analysis packages