Skip to content

GeomaterialDictRetriever

CorylC edited this page May 2, 2024 · 2 revisions

GeomaterialDictRetriever Class Documentation

Overview

The GeomaterialDictRetriever class in the openmindat package is designed for querying Geomaterial data from the Mindat API.

Usage

Create an instance of the GeomaterialDictRetriever class and use its methods to retrieve data.

Example

from openmindat import GeomaterialDictRetriever

Gdr = GeomaterialDictRetriever()
Gdr.saveto("/path/to/directory", "geoDict")

Methods

saveto(OUTDIR, FILE_NAME)

Executes the query and saves the results to a specified directory.

  • OUTDIR (str): Directory path.
  • FILE_NAME (str): file name.
  • Returns: None

save(FILE_NAME)

Executes the query and saves the results to the current directory.

  • FILE_NAME (str): file name
  • Returns: None

get_dict()

Executes the query and saves the results to an object.

  • Returns: Dictionary

Additional Information

For more details, please refer to the Mindat API documentation.

Back to Top