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: exceptions.Exception

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

Used to separate node labels in a logic tree path

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]
  • 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
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


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

openquake.engine.export.core.zipfiles(fnames, archive)[source]

Build a zip archive from the given file names.

  • fnames – list of path names
  • archive – path of the archive

Module contents

This package contains functionality for querying and exporting calculation results