Repository navigation
StrunzRetriever
The StrunzRetriever class in the openmindat package is designed for querying nickel-strunz-10 classification data based on different standards.
Create an instance of the StrunzRetriever class and use its methods to retrieve data.
from openmindat import StrunzRetriever
sr = StrunzRetriever()
sr.subclasses().saveto("/path/to/directory", "StrunzSubClasses")Determines the amount of results that can be queried for each page.
-
PAGE_SIZE(int): number of results per page. - Returns: self
sr = StrunzRetriever() sr.page_size(1500) sr.save()
Sets the search query to it's base results.
- Returns: self
- Example Usage:
sr.retrieve()
Sets the search to be based off of a given id.
-
ID(int): id to search by - Returns: self
- Example Usage:
sr.id(3)
Sets the search to return nickel-strunz-10 class standards.
- Returns: self
- Example Usage:
sr.classes()
Sets the search to return nickel-strunz-10 subclass standards.
- Returns: self
- Example Usage:
sr.subclasses()
Sets the search to return nickel-strunz-10 family classifications.
- Returns: self
- Example Usage:
sr.families()
Executes the query and saves the results to a specified directory.
-
OUTDIR(str): Directory path. -
FILE_NAME(str): file name. - Returns: None
Executes the query and saves the results to the current directory.
-
FILE_NAME(str): file name - Returns: None
Executes the query and saves the results to an object.
- Returns: Dictionary
For more details, please refer to the Mindat API documentation.