write_configuration

ctapointing.database.write_configuration(data, database, collection_name, replace=False, write_to_file=False, filepath=None)

Write a configuration to either database or file.

Parameters:
  • data (dict) – (nested) dictionary of data to write

  • database (str) – name of the database to write to

  • replace (bool) – if True, replace file or database entry

  • write_to_file (bool) – write to database if False, to file if True

  • collection_name (str) – mongo database collection to write to

  • filepath (str or None) – directory to which file gets written

Returns:

result

Return type:

path to output file or database storage result