--- id: h5netcdf version: "1.8.1" license: Copyright (c) 2015, h5netcdf developers All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are… (full text in the JSON record) license_treatment: permissive maintenance: active --- # h5netcdf — netCDF4 via h5py License: permissive · Maintenance: active · Downloads: 5.2M/mo ## What it is and what it does h5netcdf is a Python interface to the netCDF4 file format that reads and writes HDF5 files directly via h5py, h5pyd, or the pure-Python Pyfive backend, without requiring the Unidata netCDF C library. It offers two APIs: a modern hierarchical interface modeled on h5py, and a legacy API designed for compatibility with netCDF4-python. The package supports both NETCDF4 and NETCDF4_CLASSIC formats, unlimited dimensions, groups, and hierarchical variable access. The main appeal is reduced installation friction—if you already have h5py, reading netCDF4 files may be simpler than installing netCDF4-python and its C dependencies. It also provides a pure-Python reading path via Pyfive, useful in restricted or hard-to-build environments. The package has been in active development since 2015 and is marked production-stable, with support for Python 3.9 through 3.14. Use it for: - Read and write netCDF4 files in environments where the Unidata netCDF C library is difficult or impossible to install. - Access HDF5 data via the netCDF4 interface when you already have h5py installed, avoiding duplicate binary dependencies. - Use the pure-Python Pyfive backend to read netCDF files in restricted or containerized environments without C compilation. - Migrate from netCDF4-python to h5netcdf using the legacy API for drop-in compatibility with minimal code changes. - Work with hierarchical netCDF data using the modern API's h5py-like syntax for direct group and variable access. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. h5netcdf reads and writes netCDF4 files using h5py or h5pyd backends, bypassing the Unidata netCDF C library and offering an alternative interface to netCDF4-python with optional pure-Python support via Pyfive. Yes. h5netcdf is production-stable, actively maintained, has low install friction, no known vulnerabilities, and a permissive license. Install it if you need netCDF4 support without the Unidata C library, or if you want a pure-Python reading option. The legacy API makes it a low-risk alternative to netCDF4-python for existing code. ## Install pip install h5netcdf uv add h5netcdf poetry add h5netcdf ## Installing h5netcdf Before you install: Low friction: pure Python wheel with only packaging and numpy as runtime dependencies. Actively maintained with recent commits and production-stable status. Optional extras (h5py, h5pyd, pyfive) can be installed separately to avoid forcing a specific HDF5 backend. License in practice: BSD 3-Clause permissive license allows commercial and private use with minimal restrictions—retain copyright notice and disclaimer in distributions. Quickstart: pip install h5netcdf[h5py] import h5netcdf import numpy as np with h5netcdf.File("mydata.nc", "w") as f: f.dimensions = {"x": 5} v = f.create_variable("hello", ("x",), float) v[:] = np.ones(5) Requires h5py (version 3.0+) or h5pyd installed separately; pure-Python Pyfive backend available but optional. Verify before relying: - Whether the reported 4x performance improvement over netCDF4-python holds for typical workflows beyond the single cited case. - Current state of unsupported netCDF operations (rename, delete) and whether patches have been accepted since publication. ## Package facts - License: Copyright (c) 2015, h5netcdf developers All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 5.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags netcdf4 file reader writer, hdf5 netcdf interface, h5py netcdf wrapper, scientific data format python, netcdf without c library, hdf5 hierarchical data, hdf5-netcdf, scientific-data, file-format [View on SkillFed](https://skillfed.io/packages/h5netcdf) · [View on PyPI](https://pypi.org/project/h5netcdf/)