cmip6_data_citation_generator.io_dcg API¶
-
cmip6_data_citation_generator.io_dcg.load_and_validate_yaml(yaml_to_read, schema=<class 'cmip6_data_citation_generator.validators.CitationSchema'>)¶ Load yaml from file and validate using schema
Parameters: - yaml_to_read (str) – File to read the yaml from
- schema (
marshmallow.Schema) – Schema to use to validate the loaded yaml
Returns: Loaded dictionary which has been validated by
schemaReturn type: dict
-
cmip6_data_citation_generator.io_dcg.validate_and_return_raw_dict(raw_dict, schema=<class 'cmip6_data_citation_generator.validators.CitationSchema'>)¶ Return dictionary validated using the
CitationSchemaParameters: - raw_dict (dict) – Raw dictionary to load
- schema (
marshmallow.Schema) – Schema to use to validate the dictionary
Returns: Loaded dictionary which has been validated by
schemaReturn type: dict
-
cmip6_data_citation_generator.io_dcg.write_json(json_dict, path)¶ Write json file from input dictionary to path
Parameters: - json_dict (dict) – Dictionary containing the json to write
- path (str) – Path to write to