MinMod API
MinMod API to create/update mineral sites.
Quick start
-
Login to MinMod first. You can use the following command:
python -m minmodapi login -u <username> [-e <endpoint>]. By default, the endpoint ishttps://dev.minmod.isi.edu, for production usehttps://minmod.isi.edu. -
Upload mineral sites to MinMod programmatically:
from minmodapi import MinModAPI, merge_deposit_type, replace_site
api = MinModAPI(<endpoint>)
# prepare a mineral site to upload
mineral_site = {
"name": "test_mineral_site",
"source_id": "https://api.cdr.land/v1/docs/documents",
"record_id": "021c30faa880995b3cab0fcdaa9ea2fa895634205ad3977b664f33492b2086052c"
"location_info": {
"country": [],
"state_or_province": []
},
"mineral_inventory": [],
"deposit_type_candidate": [],
"modified_at": "2024-11-15T18:38:01.050553Z",
...
}
# Upload the mineral site. The function automatically determines whether
# to create a new site or update an existing one. If updating, the
# `apply_update` function merges the new site with the existing one.
# For instance, `replace_site` replaces the existing site with the new site.
# This function returns the identifier of the mineral site, or None if the upload fails.
mineral_site_ident = api.upsert_mineral_site(mineral_site, apply_update=replace_site)
# If not None, use `get_browse_link` or `get_api_link` to retrieve the site link.
if mineral_site_ident is not None:
print("LOD link:", mineral_site_ident.get_browse_link())
print("API link:", mineral_site_ident.get_api_link())
Metadata
Release files for minmodapi 1.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| minmodapi-1.3.5.tar.gz | 5.1 kB | Without provenance | Details for minmodapi-1.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minmodapi-1.3.5-py3-none-any.whl | Python 3 | none | any | Details for minmodapi-1.3.5-py3-none-any.whl |
Total release size: 11.1 kB
Release files / minmodapi-1.3.5.tar.gz
| Download URL | minmodapi-1.3.5.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48b4942088aadeb189ae4f652c17c3d88c8905feeffb12085d35ab9d0a6f2f63
|
|
BLAKE2b-256 checksum How to use checksums |
1d79dda41f90e05389e2ba078f1fd637e9db14679cd2457fe1d6d0f462f1827b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.10 Darwin/24.5.0
|
Release files / minmodapi-1.3.5-py3-none-any.whl
| Download URL | minmodapi-1.3.5-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d6723c2a9c2b5a6a472b79efccf34d494ea8bf21330bf328ef94bc317c13908
|
|
BLAKE2b-256 checksum How to use checksums |
0eebe0aca7fc1df0c7fe641028754edb0832850d05d85606ca68b49806d78091
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.10 Darwin/24.5.0
|
Security for minmodapi 1.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.