It's far, far simpler for users to simply use eccodes[1], particularly as implemented in xarray[2].
[1]: https://github.com/ecmwf/eccodes [2]: https://docs.xarray.dev/en/stable/index.html
[1]: https://github.com/ecmwf/eccodes [2]: https://docs.xarray.dev/en/stable/index.html