Python client API for interacting with the NASA MAAP API
Project description
Python MAAP Client Library
Python client library that abstracts MAAP API calls including CMR querying, algorithm change management, and HySDS job execution. CMR components in this library are largely derived from the pyCMR library.
Setup
Run:
python setup.py install
Or
pip install -e .
Usage
Populate your MAAP base url into a maap.cfg file, using maap.cfg as a template.
Then, run:
$ python
>>> from maap.maap import MAAP
>>> maap = MAAP()
>>> granules = maap.searchGranule(sitename='lope', instrument='uavsar')
>>> for res in granules:
print(res.getDownloadUrl())
res.download()
# results omitted for brevity
Optionally set the MAAP API base URL
Useful for changing the API host during development, you may override the API host using the constructor:
$ python
>>> from maap.maap import MAAP
>>> maap = MAAP(maap_host='custom.maap-project-org')
When left parameter-less, maap-py uses the default setting.
Custom 'Named Attribute' Parameters
Named parameters are recommended as an alternative to CMR's additional attributes as a way to improve usability.
This list of attributes is editable in the maap.cfg indexed_attributes setting. E.g.:
"site_name,Site Name,string"
where:
site_nameis the parameterSite Nameis the CMR attribute namestringis the parameter type
With named attribute parameters, this query:
lidarGranule = maap.searchGranule(instrument='lvis', attribute='string,Site Name,lope')
Simplifies to:
lidarGranule = maap.searchGranule(instrument='lvis', site_name='lope')
Test
python setup.py test
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maap_py-4.2.0.tar.gz.
File metadata
- Download URL: maap_py-4.2.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a6b780f606381a1e531e89d2f5857a730b65bee1efe04888f98d1b71cbc1cf
|
|
| MD5 |
66e21c35f88ce5bf23a747635532f7f9
|
|
| BLAKE2b-256 |
ea76ba194a12f995a1edf927ea87f5d7f7aac78aacee90d019ff6c5a8c9d1e97
|
Provenance
The following attestation bundles were made for maap_py-4.2.0.tar.gz:
Publisher:
build-pipeline.yml on MAAP-Project/maap-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maap_py-4.2.0.tar.gz -
Subject digest:
17a6b780f606381a1e531e89d2f5857a730b65bee1efe04888f98d1b71cbc1cf - Sigstore transparency entry: 185128043
- Sigstore integration time:
-
Permalink:
MAAP-Project/maap-py@8f7e36782c19f2735b2793b78ba1df9383b1f655 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/MAAP-Project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-pipeline.yml@8f7e36782c19f2735b2793b78ba1df9383b1f655 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maap_py-4.2.0-py3-none-any.whl.
File metadata
- Download URL: maap_py-4.2.0-py3-none-any.whl
- Upload date:
- Size: 30.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a76027a893d49dda546a29096a102ccb2fe3f1981f3c98000cffa9cade6861b3
|
|
| MD5 |
37ca14ac79333ce1d1d4bd374949087e
|
|
| BLAKE2b-256 |
b1cc489f27424422daa49b8038650464736aa4a4c2bd554911887a5b13f7125d
|
Provenance
The following attestation bundles were made for maap_py-4.2.0-py3-none-any.whl:
Publisher:
build-pipeline.yml on MAAP-Project/maap-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maap_py-4.2.0-py3-none-any.whl -
Subject digest:
a76027a893d49dda546a29096a102ccb2fe3f1981f3c98000cffa9cade6861b3 - Sigstore transparency entry: 185128044
- Sigstore integration time:
-
Permalink:
MAAP-Project/maap-py@8f7e36782c19f2735b2793b78ba1df9383b1f655 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/MAAP-Project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-pipeline.yml@8f7e36782c19f2735b2793b78ba1df9383b1f655 -
Trigger Event:
push
-
Statement type: