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.
Run:
$ python setup.py install
Or
$ pip install -e .
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 brevityNamed 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 parameter,Site Nameis the CMR attribute name, andstringis 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')python setup.py test