-
Notifications
You must be signed in to change notification settings - Fork 2
DanaRetriever
CorylC edited this page May 12, 2024
·
1 revision
The DanaRetriever
class in the openmindat
package is designed for querying Dana-8 classification data based on different standards.
Create an instance of the DanaRetriever
class and use its methods to retrieve data.
from openmindat import DanaRetriever
dr = DanaRetriever()
dr.families().saveto("/path/to/directory", "DanaFamilies")
Determines the amount of results that can be queried for each page.
-
PAGE_SIZE
(int): number of results per page. - Returns: self
dr = DanaRetriever()
dr.page_size(1500)
dr.save()
Sets the search query to it's base results.
- Returns: self
- Example Usage:
dr.retrieve()
Sets the search to be based off of a given id.
-
ID
(int): id to search by - Returns: self
- Example Usage:
dr.id(3)
Sets the search to return dana-8 groups standards.
- Returns: self
- Example Usage:
dr.groups()
Sets the search to return dana-8 subgroup standards.
- Returns: self
- Example Usage:
dr.subgroups()
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.