ARPA-SIMC / dballe

Fast on-disk database for meteorological observed and forecast data.
Other
19 stars 6 forks source link

export_to_file missed in python api documentation #182

Closed pat1 closed 5 years ago

pat1 commented 5 years ago

export_to_file is cited in documentation https://arpa-simc.github.io/dballe/python/dballe_db.html?highlight=export_to_file but I cannot find any documentation.

spanezz commented 5 years ago

export_to_file is not documented as is deprecated, now that the python API has bindings for dballe.Exporter. I now documented how to export on query_messages, and for reference here is an example:

    exporter = dballe.Exporter("BUFR")
    with open("file.bufr", "wb") as outfile:
        for cur in tr.query_messages(...):
            outfile.write(exporter.to_binary(cur.message))

The dballe.Exporter documentation should have all the information for the arguments that can customize the export encoding.