openquake.engine.export package#

openquake.engine.export.core module#

Functions for getting information about completed jobs and calculation outputs, as well as exporting outputs from the database to various file formats.

exception openquake.engine.export.core.DataStoreExportError[source]#

Bases: Exception

openquake.engine.export.core.LT_PATH_JOIN_TOKEN = '_'#

Used to separate node labels in a logic tree path

openquake.engine.export.core.check_version(dstore)[source]#
Parameters:

dstore – a DataStore instance

Returns:

a message if the stored version is different from the current version

openquake.engine.export.core.export_from_db(output_key, calc_id, datadir, target)[source]#
Parameters:
  • output_key – a pair (ds_key, fmt)

  • calc_id – calculation ID

  • datadir – directory containing the datastore

  • target – directory, temporary when called from the engine server

Returns:

the list of exported path names

openquake.engine.export.core.export_output(dskey, calc_id, datadir, target_dir, export_types)[source]#

Simple UI wrapper around openquake.engine.export.core.export_from_db() yielding a summary of files exported, if any.

openquake.engine.export.core.export_outputs(job_id, target_dir, export_types)[source]#
openquake.engine.export.core.get_outkey(dskey, export_types)[source]#

Extract the first pair (dskey, exptype) found in export

openquake.engine.export.core.makedirs(path)[source]#

Make all of the directories in the path using os.makedirs.

Module contents#

This package contains functionality for querying and exporting calculation results