def _get_message_keys(self): """Creates a generator of all the keys in the message.""" keys_itr = gribapi.grib_keys_iterator_new(self._message_id) gribapi.grib_skip_computed(keys_itr) while gribapi.grib_keys_iterator_next(keys_itr): yield gribapi.grib_keys_iterator_get_name(keys_itr) gribapi.grib_keys_iterator_delete(keys_itr)