An alpha version for OpenMindat package
Project description
OpenMindat Python Package
This is a test version of the OpenMindat Python package, designed to facilitate querying and retrieving data on minerals and geomaterials from the Mindat API. It provides classes for detailed queries based on various attributes like IMA status, keywords, and specific geomaterial properties.
GitHub Reposity: OpenMindat Python Package
Get Started
Install via Pip
foo@bar:~$ pip install openmindat
Import the Package in Python
import openmindat
Use Cases
1. Perform Detailed Queries on Geomaterials
from openmindat import GeomaterialRetriever
gr = GeomaterialRetriever()
gr.density_min(2.0).density_max(5.0).crystal_system("Hexagonal")
gr.elements_exc("Au,Ag")
gr.saveto("/path/to/geomaterials_data")
2. Retrieve IMA-Approved Minerals
from openmindat import MineralsIMARetriever
mir = MineralsIMARetriever()
mir.ima(1).fields("id,name,ima_formula,ima_year")
mir.saveto("/path/to/minerals_data")
3. Search Geomaterials Using Keywords
from openmindat import GeomaterialSearchRetriever
gsr = GeomaterialSearchRetriever()
gsr.geomaterials_search("quartz, green, hexagonal")
gsr.save()
4. Retrieve Localities
from openmindat import LocalitiesRetriever
lr = LocalitiesRetriever()
lr.country("France").txt("mine")
lr.save()
Documentation
-
GitHub Wiki: For comprehensive documentation, visit our GitHub Wiki.
-
Built-in Help:
To explore detailed class and method documentation within the OpenMindat package, use Python's built-in help()
function. This provides direct access to docstrings, showcasing usage examples and parameter details. Example:
from openmindat import GeomaterialRetriever
help(GeomaterialRetriever)
Press q
to exit the help interface.
Contact Us
For further assistance or feedback, feel free to contact the development team at jiyinz@uidaho.edu.
License
Author
Jiyin Zhang
Acknowledgments
- This work is supported by NSF, Award #2126315.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for openmindat-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80d1f4f714dc5080fe85a0c44f61e7c92d6c6658a05d0ce8f1ce58abb53b26e9 |
|
MD5 | 41ef896c3cb94aba48d0ace1e716a077 |
|
BLAKE2b-256 | 1e3d0cef4d994fef4551c3d738fb046663672d2105b0da22647f4803d79f2dba |