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_name
is the parameterSite Name
is the CMR attribute namestring
is 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
File details
Details for the file maap_py-4.1.0.tar.gz
.
File metadata
- Download URL: maap_py-4.1.0.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 610a701e9686a2190474d2e1e4081de3c3eafd9d691bfed9c1a9167f76fb7dce |
|
MD5 | 4b7d70a48a7f30e06fc626026567d186 |
|
BLAKE2b-256 | 14b0a2f0552acb2a06829844ad7dbffeef1301c86449586aa9590e1ff830b8b3 |
File details
Details for the file maap_py-4.1.0-py3-none-any.whl
.
File metadata
- Download URL: maap_py-4.1.0-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6433f44a22dc1291d4c3e3f4508203d95f1346ffd5e3e952140e0a1d22145143 |
|
MD5 | 7346c8f593089608af495d45d15fb4f6 |
|
BLAKE2b-256 | 26b631b317ca4277825445fdc7ff3a947783563954744e4a9a1ef0d4b5445fd8 |